visual3d:documentation:pipeline:event_commands:event_copy
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:pipeline:event_commands:event_copy [2024/06/19 12:49] – sgranger | visual3d:documentation:pipeline:event_commands:event_copy [2025/02/26 17:04] (current) – wikisysop | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{{{{{{{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. | + | ====== Event Copy ====== |
- | ===== interactive selection from the data tree: ===== | + | ==== Overview |
+ | The **Event_Copy** command allows users to __create a new event by copying an existing event and applying optional modifications__. Users can specify an offset for the copied event in terms of frames, time or percentage of a defined range. Additionally, | ||
- | copyeventmenu.jpg] | + | This command is particularly useful for scenarios where new events |
- | ===== from the edit events | + | |
- | editeventsdlg.jpg | + | The functionality of this command |
- | ===== pipeline | + | |
- | **event_copy** | + | {{: |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | /[[visual3d:documentation: | + | |
- | /[[visual3d: | + | |
- | /[[visual3d:documentation: | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | ==== copy_event ==== | + | |
- | the name of the legacy command. visual3d should continue to recognize this command. | ||
- | ===== event copy dialog ===== | ||
- | as of version 5 this dialog | + | ==== Pipeline Command ==== |
+ | The command below is the command as seen in the Visual3D application. | ||
- | copyeventlabeldlgex1.jpg | + | < |
+ | / | ||
+ | / | ||
+ | !/ | ||
+ | !/ | ||
+ | !/ | ||
+ | !/ | ||
+ | !/ | ||
+ | !/ | ||
+ | !/ | ||
+ | !/ | ||
+ | !/ | ||
+ | </ | ||
- | ===== frame_offset ===== | + | ==== Command Parameters |
+ | The following table shows the command parameters and descriptions: | ||
- | frame offset can be a number or an expression. | + | |**Parameter** |
+ | |**/ | ||
+ | |**/ | ||
+ | |**!/ | ||
+ | |**!/ | ||
+ | |**!/ | ||
+ | |**!/ | ||
+ | |**!/ | ||
+ | |**!/ | ||
+ | |**!/ | ||
+ | |**!/ | ||
+ | |**!/ | ||
+ | |**!/ | ||
- | for example, if the offset is defined by a metric signal in the processed folder labeled shift. | ||
- | **/ | + | ==== Dialog |
- | ===== time_offset ===== | + | The command can be edited in a text editor or in a dialog form. To edit in the dialog pop up form either click on the Edit button in the pipeline workshop or double-click on the pipeline command. The dialog is shown below. |
- | 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. | + | * **Optional- Select Range Instance**: |
+ | When set to 0, copies all instances of the event. When set to n, copy the //n//th instance of the event. | ||
+ | If n<1, count instances from the last event; e.g. -1 = last instance. | ||
- | **/ | + | |
- | for example, | + | When set to 0, it means all occurrences of the event will be processed. When **Interpret Event Instance As List** is checked, the event is treated as a list rather than a single value. |
- | **/ | + | ==== Examples |
- | ===== percent_offset ===== | + | The following examples will go through the use of the **Event_Copy** command in the Visual3D application. |
- | the percent offset can be a number or an expression. | + | === Example 1: Event_At_Midstance === |
- | the percent | + | The stance phase of the gait cycle is the period when the foot is in contact with the ground, it is defined by the labels RON and ROFF. The following command will create an event mid way between RON and ROFF. |
- | for example, if the offset is defined by a metric signal in the processed folder labeled percent. | + | < |
+ | Event_Copy | ||
+ | / | ||
+ | / | ||
+ | !/ | ||
+ | !/ | ||
+ | / | ||
+ | !/ | ||
+ | !/ | ||
+ | / | ||
+ | !/ | ||
+ | !/ | ||
+ | !/ | ||
+ | ; | ||
+ | </ | ||
- | **/ | + | The dialog corresponding to the example command is shown below: |
- | ===== event instance ===== | + | |
- | event_instance=0 -> copy all instances of the event | + | {{: |
- | event_instance=n -> copy the nth instance | + | This command will use all instances of a range defined by the **Event_Sequence** and **Exclude_Event**, |
- | if n<1 count instances from the last event; e.g. -1 = last instance | + | === Example 2: Copying |
- | ===== range instance ===== | + | 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. |
- | range_instance=0 -> use all instances of the range | + | 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. |
- | range_instance=n -> use the nth instance of the range | + | < |
+ | Event_Copy | ||
+ | / | ||
+ | / | ||
+ | !/ | ||
+ | !/ | ||
+ | / | ||
+ | !/ | ||
+ | !/ | ||
+ | / | ||
+ | !/ | ||
+ | !/ | ||
+ | !/ | ||
+ | ; | ||
+ | </code> | ||
- | if n<1 count instances from the last range; e.g. -1 = last range | ||
- | ===== example_event_at_midstance ===== | + | === Example 3: Create an Event based on a time threshold between 2 Events |
+ | In this example, an event named BAD is created if the time between two events (RHS-> RHS) exceeds a threshold. The following is the breakdown of the command: | ||
+ | - Define a Stride: the time between two consecutive RHS. | ||
+ | - Measure Stride Time: Calculates the duration of each STRIDE. | ||
+ | - Identify Long Strides: Checks if any STRIDE duration is longer than 4 seconds, if this is the case, it is flagged. | ||
+ | - Mark as " | ||
- | given that stance phase is defined by the labels ron and roff | + | < |
+ | ! Define an Event Sequence | ||
+ | Event_Define_Event_Sequence | ||
+ | / | ||
+ | / | ||
+ | !/ | ||
+ | !/ | ||
+ | !/ | ||
+ | !/ | ||
+ | !/ | ||
+ | / | ||
+ | ; | ||
- | the following command will create an event mid way between ron and roff. | + | ! Compute |
+ | Metric_Time_Between_Events | ||
+ | / | ||
+ | !/ | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | !/ | ||
+ | ; | ||
- | **event_copy** | + | ! Create a binary signal from the stride time and threshold (4 in this case) |
- | / | + | Evaluate_Expression |
- | /new_event_name=mid_stance | + | /EXPRESSION=(METRIC:: |
- | ! /frame_offset= | + | !/SIGNAL_TYPES= |
- | ! /time_offset= | + | !/SIGNAL_FOLDER=ORIGINAL |
- | / | + | !/SIGNAL_NAMES= |
- | ! /event_instance=0 | + | /RESULT_TYPES=METRIC |
- | ! /range_instance=0 | + | !/RESULT_FOLDERS=PROCESSED |
- | / | + | /RESULT_NAME=STRIDE_TIME_BINARY |
- | ! /exclude_events= | + | !/APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE |
- | ! /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. | + | ! Create |
+ | Set_Pipeline_Parameter_To_Data_Value | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | !/ | ||
+ | / | ||
+ | ; | ||
- | ===== example - copying the last event in the sequence ===== | + | ! Create indices for a for each loop |
+ | **Get_Pipeline_Parameter_Count** | ||
+ | / | ||
+ | / | ||
+ | ; | ||
- | 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. | + | Set_Pipeline_Parameter_From_For_Loop |
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | !/ | ||
+ | ; | ||
- | in order to copy the last event, you need to select the first event and an offset of 100% | + | For_Each |
+ | / | ||
+ | / | ||
+ | ; | ||
- | for example, given a sequence of events a-b-c and you want to copy event c and name it c2. | + | ! If the binary signal is 1 execute |
+ | Expression_Loop | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
- | event_copy | + | Event_Copy |
- | /event_name=a | + | /EVENT_NAME=RHS |
- | /new_event_name=c2 | + | /NEW_EVENT_NAME=BAD |
- | !/frame_offset= | + | !/EVENT_INSTANCE=0 |
- | ! /time_offset= | + | /RANGE_INSTANCE=::INDEX |
- | /percent_offset=100 | + | /EVENT_SEQUENCE=STRIDE_TIME |
- | ! /event_instance=0 | + | !/EXCLUDE_EVENTS= |
- | ! /range_instance=0 | + | !/START_AT_EVENT= |
- | /event_sequence=a+b+c | + | !/END_AT_EVENT= |
- | ! /exclude_events= | + | /FRAME_OFFSET=10 |
- | ! /start_at_event= | + | !/TIME_OFFSET= |
- | ! /end_at_event= | + | !/PERCENT_OFFSET= |
- | **;** | + | ; |
- | ===== example - create an event based on a time threshold between 2 events | + | |
+ | Expression_Loop_End | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | End_For_Each | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | ==== Notes ==== | ||
+ | * The / | ||
+ | * Offset values (Frame_Offset, | ||
- | 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** | ||
- | / | ||
- | / | ||
- | ! / | ||
- | ! / | ||
- | ! / | ||
- | ! / | ||
- | ! / | ||
- | / | ||
- | **;** | ||
- | ! compute the times of the event_sequence | ||
- | **metric_time_between_events** | ||
- | / | ||
- | ! / | ||
- | / | ||
- | / | ||
- | / | ||
- | ! / | ||
- | **;** | ||
- | ! create a binary signal from the stride time and threshold (4 in this case) | ||
- | **evaluate_expression** | ||
- | / | ||
- | ! / | ||
- | ! / | ||
- | ! / | ||
- | / | ||
- | ! / | ||
- | / | ||
- | ! / | ||
- | **;** | ||
- | ! create a pipeline parameter from the binary signal | ||
- | **set_pipeline_parameter_to_data_value** | ||
- | / | ||
- | / | ||
- | / | ||
- | ! / | ||
- | / | ||
- | **;** | ||
- | ! create indices for a for each loop | ||
- | **get_pipeline_parameter_count** | ||
- | / | ||
- | / | ||
- | **;** | ||
- | **set_pipeline_parameter_from_for_loop** | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | ! / | ||
- | **;** | ||
- | **for_each** | ||
- | / | ||
- | / | ||
- | **;** | ||
- | ! if the binary signal is 1 execute event copy | ||
- | **expression_loop** | ||
- | / | ||
- | / | ||
- | / | ||
- | **;** | ||
- | **event_copy** | ||
- | / | ||
- | / | ||
- | ! / | ||
- | / | ||
- | / | ||
- | ! / | ||
- | ! / | ||
- | ! / | ||
- | / | ||
- | ! / | ||
- | ! / | ||
- | **;** | ||
- | **expression_loop_end** | ||
- | / | ||
- | **;** | ||
- | **end_for_each** | ||
- | / | ||
- | **;** | ||
- | }}}}}}}} |
visual3d/documentation/pipeline/event_commands/event_copy.1718801373.txt.gz · Last modified: 2024/06/19 12:49 by sgranger