User Tools

Site Tools


visual3d:documentation:pipeline:metric_commands:metric_event_sequence_count

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
visual3d:documentation:pipeline:metric_commands:metric_event_sequence_count [2024/07/16 16:59] – removed sgrangervisual3d:documentation:pipeline:metric_commands:metric_event_sequence_count [2025/09/24 14:26] (current) – [Example: Time_Interval] wikisysop
Line 1: Line 1:
 +====== Metric Event Sequence Count ======
  
 +====Overview====
 +
 +**Metric Event Sequence Count** Creates a metric containing the number of Event Sequences. When a movement or series of movements (like a jump) is defined by an event sequence this command can be used to count the number of repetitions of that movement. The command can be found within the **Pipeline Workshop** under **Metric**.
 +
 +====Pipeline Command====
 +
 +<code>
 +Metric_Event_Sequence_Count
 +! /RESULT_METRIC_FOLDER=The resulting folder of the metric
 +/RESULT_METRIC_NAME= The resulting name of the metric
 +/TIME_INTERVAL= The number of event sequences which occur within a time interval
 +/EVENT_SEQUENCE= The event sequence to search for and count
 +/EXCLUDE_EVENTS= Don't count a sequence that contains this event
 +! /GENERATE_COUNT_TOTAL_IN_GLOBAL=
 +;
 +</code>
 +
 +====Command Parameters====
 +
 +The following table shows the command parameters and descriptions:
 +
 +|**RESULT_METRIC_FOLDER**|**The resulting folder of the metric**|
 +|**RESULT_METRIC_NAME**|**Information about Parameter**|
 +|**TIME_INTERVAL**|**The number of event sequences which occur within a time interval**|
 +|**EVENT_SEQUENCE**|**The event sequence to search for and count**|
 +|**EXCLUDE_EVENTS**|**Don't count a sequence that contains this event**|
 +|**GENERATE_COUNT_TOTAL_IN_GLOBAL**|**Create a global count over the active files**|
 +
 +====Dialog====
 +
 +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.
 +
 +{{:EventsSequenceCountDlg.png}}
 +
 +The dialog box allows you to assign values to the command parameters outlined above.
 +
 +====Example: Time_Interval ====
 +
 +The **Time_Interval** parameter can be used to count the number of events that occur within a specific interval.
 +
 +=== Command Setup ===
 +
 +If a trial is 20 seconds long, and a 5.0 second interval is specified, the result will be 4 metrics. Each metric will contain the number of event sequences which occur within each 5.0 second window.
 +
 +<code>
 +Metric_Event_Sequence_Count
 +! /RESULT_METRIC_FOLDER= PROCESSED
 +/RESULT_METRIC_NAME= LSWING_COUNT_INT
 +/TIME_INTERVAL= 5.0
 +/EVENT_SEQUENCE= The event sequence to search for and count
 +/EXCLUDE_EVENTS= Don't count a sequence that contains this event
 +! /GENERATE_COUNT_TOTAL_IN_GLOBAL= Create a global count over the active files
 +;
 +</code>
 +
 +{{:EventsSequenceCount_Interval.png}}|
 +
 +=== Result ===
 +
 +|**When using a 5 second interval on a 20 second trial, the result will be four metrics (20/5).**\\ \\ (1) The first metric will contain the number of times the sequence occurs during the first 5 seconds of the trial\\ (2) The second metric will contain the number of times the sequence occurs during the 5 - 10 second interval of the trial\\ (3) The third metric will contain the number of times the sequence occurs during the 10 - 15 second interval of the trial\\ (4) The fourth metric will contain the number of times the sequence occurs during the 15 - 20 second interval of the trial\\ \\ **NOTE:** If the event sequence occurs between two intervals (LTO occurs at 4 sec and LHS occurs at 6 sec), this sequence will be included in Interval 1.  |  {{:EventsSequenceCount_Interval_Result.png}}|
 +
 +====Complex Example: Approximating Strides Using Angular Velocity Thresholds====
 +
 +As a subject moves through the gait cycle the angular velocities of their joints and limbs follow a known sequence with each stride. For this example we will identify this sequence for the right shank and use **Metric Event Sequence Count** to approximate the number of strides in a trial. 
 +
 +As a subject walks or runs their knees go through an alternating cycle of flexion and extension. This can be seen through many measurements, including the X component angular velocity of their shank. Here we use the **Event Threshold** command to identify each time that the angular velocity of the subject's right shank crosses 0 and goes from negative to positive or vice versa. 
 +
 +<code>
 +Event_Threshold
 +/RESULT_EVENT_NAME=RSK_Positive
 +/SIGNAL_TYPES=KINETIC_KINEMATIC
 +/SIGNAL_FOLDER=RSK
 +/SIGNAL_NAMES=AngVel
 +/SIGNAL_COMPONENTS=X
 +! /FRAME_OFFSET=0
 +! /TIME_OFFSET=
 +! /EVENT_SEQUENCE=
 +! /EXCLUDE_EVENTS=
 +! /EVENT_SEQUENCE_INSTANCE=0
 +! /EVENT_SUBSEQUENCE=
 +! /SUBSEQUENCE_EXCLUDE_EVENTS=
 +! /EVENT_SUBSEQUENCE_INSTANCE=0
 +! /EVENT_INSTANCE=0
 +/THRESHOLD=0
 +/ON_ASCENT=TRUE
 +/ON_DESCENT=FALSE
 +! /FRAME_WINDOW=8
 +! /ENSURE_FRAMES_BEFORE=FALSE
 +! /ENSURE_FRAMES_AFTER=FALSE
 +;
 +</code>
 +
 +<code>
 +Event_Threshold
 +/RESULT_EVENT_NAME=RSK_Negative
 +/SIGNAL_TYPES=KINETIC_KINEMATIC
 +/SIGNAL_FOLDER=RSK
 +/SIGNAL_NAMES=AngVel
 +/SIGNAL_COMPONENTS=X
 +! /FRAME_OFFSET=0
 +! /TIME_OFFSET=
 +! /EVENT_SEQUENCE=
 +! /EXCLUDE_EVENTS=
 +! /EVENT_SEQUENCE_INSTANCE=0
 +! /EVENT_SUBSEQUENCE=
 +! /SUBSEQUENCE_EXCLUDE_EVENTS=
 +! /EVENT_SUBSEQUENCE_INSTANCE=0
 +! /EVENT_INSTANCE=0
 +/THRESHOLD=0
 +/ON_ASCENT=FALSE
 +/ON_DESCENT=TRUE
 +! /FRAME_WINDOW=8
 +! /ENSURE_FRAMES_BEFORE=FALSE
 +! /ENSURE_FRAMES_AFTER=FALSE
 +;
 +</code>
 +
 +Now, using these events we can use **Metric Event Sequence Count** to count the number of instances in which the right knee goes from flexing into extending and back again, with each of these representing one stride. 
 +
 +<code>
 +Metric_Event_Sequence_Count
 +! /RESULT_METRIC_FOLDER=PROCESSED
 +/RESULT_METRIC_NAME=RSK_flexion_extension
 +! /TIME_INTERVAL=
 +/EVENT_SEQUENCE=RSK_Positive+RSK_Negative
 +/EXCLUDE_EVENTS=
 +! /GENERATE_COUNT_TOTAL_IN_GLOBAL=TRUE
 +;
 +</code>
 +
 +A new folder should now be present in the **METRIC** folder containing a count of the event sequence. This number corresponds to the number of strides taken in a trial, which can be confirmed through further analysis or by watching the trial simulation. 
 +
 +{{:visual3d:documentation:pipeline:metric_commands:rsk_count.png?500|}}
visual3d/documentation/pipeline/metric_commands/metric_event_sequence_count.1721149148.txt.gz · Last modified: 2024/07/16 16:59 by sgranger