User Tools

Site Tools


visual3d:documentation:pipeline:event_commands:event_copy

Event Copy

To make a copy of an event label, you can use a pipeline command or you can select the event in the data tree using the right mouse button.

Interactive selection from the data tree:

copyeventmenu.jpg]

From the Edit Events Dialog

editeventsdlg.jpg

Pipeline command:

Event_Copy /Event_Name= The name of the original event /New_Event_Name= The name to be given to the new event /Frame_Offset= The frame offset from the Event_Frame /Time_Offset= The time offset from the Event Frame /Percent_Offset= An offset from the Event Frame as a percentage of the ranged defined by the Event_Sequence /Event_Sequence= Sequence of Events that defines the ranges /Exclude_Events= An inclusive Event that excludes the range /Event_Instance= The instance of the existing event to copy. /Range_Instance= The instance of the existing event to copy. /Start_At_Event= Start of Range to Find the Event (legacy-superceded by Event_Sequence) /End_At_Event= End of Range to Find the Event (legacy-superceded by Event_Sequence) ;

Copy_Event

The name of the Legacy command. Visual3D should continue to recognize this command.

Event Copy Dialog

As of Version 5 this dialog is complicated. Interaction with the dialog is described here.

copyeventlabeldlgex1.jpg

Frame_Offset

Frame offset can be a number or an expression.

For example, if the offset is defined by a Metric signal in the Processed folder labeled SHIFT.

/Frame_Offset= METRIC::PROCESSED::SHIFT

Time_Offset

Time offset can be a number or an expression.

For example, if the offset is defined by a Metric signal in the Processed folder labeled SHIFT.

/Time_Offset= METRIC::PROCESSED::SHIFT For example, to create an event 1 second prior to an existing event.

/Time_Offset= -1.0

Percent_Offset

The percent offset can be a number or an expression.

The percent is the percentage of the range within the Event_Sequence.

For example, if the offset is defined by a Metric signal in the Processed folder labeled PERCENT.

/Percent_Offset= METRIC::PROCESSED::PERCENT

Event Instance

Event_Instance=0 → copy all instances of the Event

Event_Instance=n → copy the nth instance of the Event

if n<1 count instances from the last Event; e.g. -1 = last instance

Range Instance

Range_Instance=0 → use all instances of the Range

Range_Instance=n → use the nth instance of the Range

if n<1 count instances from the last Range; e.g. -1 = last range

Example_Event_At_Midstance

Given that stance phase is defined by the labels RON and ROFF

The following command will create an event mid way between RON and ROFF.

Event_Copy /EVENT_NAME=RON /NEW_EVENT_NAME=MID_STANCE ! /FRAME_OFFSET= ! /TIME_OFFSET= /PERCENT_OFFSET=50 ! /EVENT_INSTANCE=0 ! /RANGE_INSTANCE=0 /EVENT_SEQUENCE=RON+ROFF ! /EXCLUDE_EVENTS= ! /START_AT_EVENT= ! /END_AT_EVENT= ; copyeventlabeldlgex1.jpg

This command will use all instances of a range defined by the Event_Sequence and Exclude Event, and will use every occurrence of the Event_Name within this sequence.

Example - Copying the last event in the sequence

The event sequence used in the event_copy command includes the first event, but not the last event. This idiosyncratic behavior was introduced to handle sequences that had the same event label name at each end of the sequence.

In order to copy the last event, you need to select the first event and an offset of 100%

For example, given a sequence of events A-B-C and you want to copy Event C and name it C2.

Event_Copy /EVENT_NAME=A /NEW_EVENT_NAME=C2 !/FRAME_OFFSET= ! /TIME_OFFSET= /PERCENT_OFFSET=100 ! /EVENT_INSTANCE=0 ! /RANGE_INSTANCE=0 /EVENT_SEQUENCE=A+B+C ! /EXCLUDE_EVENTS= ! /START_AT_EVENT= ! /END_AT_EVENT= ;

Example - Create an Event based on a time threshold between 2 Events

For example, create an event (BAD) if the time between two events (RHS to RHS) exceeds a threshold.

! Define an Event Sequence Event_Define_Event_Sequence /EVENT_SEQUENCE_NAME=STRIDE /EVENT_SEQUENCE=RHS+RHS ! /EXCLUDE_EVENTS= ! /INSIDE_OF_SEQUENCE= ! /OFFSET_FROM_START= ! /OFFSET_FROM_END= ! /OFFSET_BY=PERCENT /EVENT_SEQUENCE_INSTANCE=0 ; ! Compute the times of the Event_Sequence Metric_Time_Between_Events /RESULT_METRIC_NAME=STRIDE_TIME ! /RESULT_METRIC_FOLDER=PROCESSED /EVENT_SEQUENCE=STRIDE /EXCLUDE_EVENTS= /GENERATE_MEAN_AND_STDDEV=FALSE ! /APPEND_TO_EXISTING_VALUES=FALSE ; ! Create a binary signal from the stride time and threshold (4 in this case) Evaluate_Expression /EXPRESSION=(METRIC::PROCESSED::STRIDE_TIME>4) ! /SIGNAL_TYPES= ! /SIGNAL_FOLDER=ORIGINAL ! /SIGNAL_NAMES= /RESULT_TYPES=METRIC ! /RESULT_FOLDERS=PROCESSED /RESULT_NAME=STRIDE_TIME_BINARY ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE ; ! Create a pipeline parameter from the binary signal Set_Pipeline_Parameter_To_Data_Value /SIGNAL_TYPES=METRIC /SIGNAL_FOLDER=PROCESSED /SIGNAL_NAMES=STRIDE_TIME_BINARY ! /SIGNAL_COMPONENTS=ALL_COMPONENTS /PARAMETER_NAME=INSTANCE ; ! Create indices for a for each loop Get_Pipeline_Parameter_Count /PARAMETER_NAME=NUMCOUNT /PARAMETER_VALUE=::INSTANCE ; Set_Pipeline_Parameter_From_For_Loop /PARAMETER_NAME=COUNT /PARAMETER_INDEX_START=1 /PARAMETER_INDEX_END=::NUMCOUNT /PARAMETER_INDEX_STEP=1 ! /PARAMETER_INDEX_TYPE=INTEGER ; For_Each /ITERATION_PARAMETER_NAME=INDEX /ITEMS=::COUNT ; ! If the binary signal is 1 execute event copy Expression_Loop /ITERATION_PARAMETER_NAME=TEST /EXPRESSION=METRIC::PROCESSED::STRIDE_TIME_BINARY[&::INDEX&] /AS_INTEGER=true ; Event_Copy /EVENT_NAME=RHS /NEW_EVENT_NAME=BAD ! /EVENT_INSTANCE=0 /RANGE_INSTANCE=::INDEX /EVENT_SEQUENCE=STRIDE_TIME ! /EXCLUDE_EVENTS= ! /START_AT_EVENT= ! /END_AT_EVENT= /FRAME_OFFSET=10 ! /TIME_OFFSET= ! /PERCENT_OFFSET= ; Expression_Loop_End /ITERATION_PARAMETER_NAME=TEST ; End_For_Each /ITERATION_PARAMETER_NAME=INDEX ;

visual3d/documentation/pipeline/event_commands/event_copy.txt · Last modified: 2024/07/17 11:45 by sgranger