User Tools

Site Tools


visual3d:documentation:pipeline:metric_commands:metric_time_between_events

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
visual3d:documentation:pipeline:metric_commands:metric_time_between_events [2025/09/19 13:36] wikisysopvisual3d:documentation:pipeline:metric_commands:metric_time_between_events [2025/09/24 19:14] (current) – [Example 2 : There is always the same number of occurrences of E1 and E2] wikisysop
Line 111: Line 111:
 </code> </code>
  
 +
 +====Example 3: Defining Events and Finding Time Between====
 +Here we will create two events within a running trial, one for maximum hip flexion and another for maximum hip extension. We can then use **Metric Time Between Events** to determine how long it takes the subject to go from one event to the next for each stride.  
 +
 +First we will create two new events in our pipeline, one for max left hip flexion and one for minimum left hip flexion.
 +
 +<code>
 +Event_Maximum
 +/RESULT_EVENT_NAME=Max_L_Hip_Flexion
 +/SIGNAL_TYPES=LINK_MODEL_BASED
 +/SIGNAL_FOLDER=ORIGINAL
 +/SIGNAL_NAMES=LHipAngle
 +/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
 +! /FRAME_WINDOW=8
 +! /THRESHOLD=
 +;
 +
 +Event_Minimum
 +/RESULT_EVENT_NAME=Min_L_Hip_Flexion
 +/SIGNAL_TYPES=LINK_MODEL_BASED
 +/SIGNAL_FOLDER=ORIGINAL
 +/SIGNAL_NAMES=LHipAngle
 +/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
 +! /FRAME_WINDOW=8
 +! /THRESHOLD=
 +;
 +</code>
 +
 +Now that these events have been defined we can calculate the time it takes to go from one event to the next for each instance, as well as the average time across all instances. 
 +
 +<code>
 +Metric_Time_Between_Events
 +/RESULT_METRIC_NAME=L_Hip_Flexion_Time
 +! /RESULT_METRIC_FOLDER=PROCESSED
 +/EVENT_SEQUENCE=Min_L_Hip_Flexion+Max_L_Hip_Flexion
 +/EXCLUDE_EVENTS=
 +! /SCALE_FACTOR=1
 +! /GENERATE_MEAN_AND_STDDEV=TRUE
 +! /APPEND_TO_EXISTING_VALUES=FALSE
 +;
 +</code>
 +
 +Once the pipeline has been executed two new folders should appear containing the calculated time values and the average value across all instances.
 +
 +{{:visual3d:documentation:pipeline:metric_commands:flexion_time.png?400|}}{{:visual3d:documentation:pipeline:metric_commands:flexion_time_mean.png?400|}}
 ==== Visual3D Versions supporting Subject Prefixes ==== ==== Visual3D Versions supporting Subject Prefixes ====
  
visual3d/documentation/pipeline/metric_commands/metric_time_between_events.txt · Last modified: 2025/09/24 19:14 by wikisysop