User Tools

Site Tools


visual3d:documentation:pipeline:event_commands:event_threshold

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:event_commands:event_threshold [2025/02/27 17:44] – [Event Threshold] wikisysopvisual3d:documentation:pipeline:event_commands:event_threshold [2025/04/29 13:39] (current) – [Dialog] wikisysop
Line 1: Line 1:
 ====== Event Threshold ====== ====== Event Threshold ======
  
-==== Overview ==== +===== Overview ===== 
-The **Event_Threshold** command is used to detect threshold crossings in biomechanical signals and label events accordingly. This command provides extensive control over event placement by allowing users to define frame or time offsets, include or exclude sequences, and refine detections using component selection and event constraints.+The **Event_Threshold** command is used to detect threshold crossings (when signal crosses a specified value) in signals and label events accordingly. This command provides extensive control over event placement by allowing users to define frame or time offsets, include or exclude sequences, and refine detections using component selection and event constraints.
  
-**Place an event label at the frame where a signal crosses a specified value. The event is created at the frame satisfying the criteria.**+This command is particularly useful for defining critical events based on signal thresholds, such as peak force occurrences, velocity changes, or acceleration-based triggers.
  
-**This is a complicated command because there are so many options.**+**Note**: The threshold parameter specified can be a number, a PROCESSED METRIC, or an expression.
  
-==== Command Syntax ====+===== Pipeline Command ====
 +The command below is as seen on the Visual3D application, it has many parameters as there are many options to manipulate this command.
  
 <code> <code>
 Event_Threshold Event_Threshold
-/RESULT_EVENT_NAME=  The name to be given to the threshold event +/RESULT_EVENT_NAME= 
-! /Signal_TypesThe type of signal to be evaluated +! /SIGNAL_TYPES
-! /SIGNAL_NAMESThe name of the signal to be evaluated +! /SIGNAL_FOLDER=ORIGINAL 
-! /Signal_FolderThe name of the signal folder +! /SIGNAL_NAMES
-! /SIGNAL_COMPONENTS= Use these components of the signal (May also be modified using Select_X, Select_Y, Select_Z parameters) +! /SIGNAL_COMPONENTS= 
-! /FRAME_OFFSET=  The frame offset from the threshold crossing where the event label is to be placed +! /FRAME_OFFSET=0 
-! /TIME_OFFSET= The time offset from the threshold crossing where the event label is to be placed +! /TIME_OFFSET= 
-! /EVENT_SEQUENCE= A sequence of events to perform the command within (for example: RHS+RHS) +! /EVENT_SEQUENCE= 
-! /EXCLUDE_EVENTS= An that falls within an EVENT_SEQUENCE event may be specified to exclude a sequence from the calculations +! /EXCLUDE_EVENTS= 
-! /EVENT_SEQUENCE_INSTANCE= Instance of event sequence +! /EVENT_SEQUENCE_INSTANCE=0 
-! /EVENT_SUBSEQUENCE=A subsequence of events to perform the command within (for example: LTO+LHS) +! /EVENT_SUBSEQUENCE= 
-! /SUBSEQUENCE_EXCLUDE_EVENTS=An event that falls within an EVENT_SUBSEQUENCE may be specified to exclude a subsequence from the calculations +! /SUBSEQUENCE_EXCLUDE_EVENTS= 
-! /EVENT_SUBSEQUENCE_INSTANCE= Instance of event subsequence +! /EVENT_SUBSEQUENCE_INSTANCE=0 
-! /EVENT_INSTANCE= There may be several instances of an event crossing satisfying the criteria.  +! /EVENT_INSTANCE=0 
- A value of results in all crossing being assigned a label.  +! /THRESHOLD= 
- A positive number indicates the event (in sequence) to select.  +! /ON_ASCENT= 
- A negative number indicates the event starting from the last event and progressing to the first event. +! /ON_DESCENT= 
-! /SELECT_X= (True or False)Use this component of the signal +! /FRAME_WINDOW=8 
-! /SELECT_Y= (True or False)Use this component of the signal +! /ENSURE_FRAMES_BEFORE=FALSE 
-! /SELECT_Z= (True or False)Use this component of the signal +! /ENSURE_FRAMES_AFTER=FALSE 
-! /SELECT_RESIDUAL= (True or False) Use this component of the signal +;
-! /START_AT_EVENT= The search begins from the start event +
-! /END_AT_EVENT= The search ends at the end event +
-! /THRESHOLD= The value after which the event label is to be placed +
-! /ON_ASCENT=  (True or False) Determine the threshold when the signal is passing up through the threshold +
-! /ON_DESCENT= (True or False) Determine the threshold when the signal is passing down through the threshold +
-! /Frame_WindowThe range of frames of data that must satisfy the threshold crossing. Used by the "Ensure" variable +
-! /ENSURE_FRAMES_BEFORE=  (True or False)Radius frames of data before crossing must lie on the same side of the threshold +
-! /ENSURE_FRAMES_AFTER= (True or False)Radius frames of data after crossing must lie on the same side of the threshold+
 </code> </code>
-{{:EventThresholdDialog_v5.jpg}}| 
  
 +===== Command Parameters =====
 +The following table shows the command parameters and descriptions:
  
-==== THRESHOLD Parameter ====+|**Parameter**     |**Description**| 
 +|**/RESULT_EVENT_NAME=**|The name assigned to the detected threshold event.| 
 +|**!/SIGNAL_TYPES=**|The type of signal to evaluate (i.e. Analog, Link Model Based, etc.)| 
 +|**!/SIGNAL_FOLDER=ORIGINAL**|The folder containing the signal.| 
 +|**!/SIGNAL_NAMES=**|Specifies the signal to be analyzed.| 
 +|**!/SIGNAL_COMPONENTS=**|Defines which signal components should be analyzed.| 
 +|**!/FRAME_OFFSET=0**|Shifts the event forward or backward by a specified number of frames.| 
 +|**!/TIME_OFFSET=**|Shifts the event forward or backward by a specified time in seconds.| 
 +|**!/EVENT_SEQUENCE=**|Sequence of events within which the command is performed (i.e. RHS + RHS).| 
 +|**!/EXCLUDE_EVENTS=**|Events to be excluded from sequence.| 
 +|**!/EVENT_SEQUENCE_INSTANCE=0**|Which instance of an event sequence to use.| 
 +|**!/EVENT_SUBSEQUENCE=**|Subsequence of events to analyze (i.e. LTO + LHS).| 
 +|**!/SUBSEQUENCE_EXCLUDE_EVENTS=**|Events to exclude from the subsequence.| 
 +|**!/EVENT_SUBSEQUENCE_INSTANCE=0**|Instance of the event subsequence to analyze.| 
 +|**!/EVENT_INSTANCE=**|Determines how many event occurrences to consider (0 for all, positive for sequential selection, negative for reverse selection).| 
 +|**!/THRESHOLD=**|Threshold value to trigger event detection.| 
 +|**!/ON_ASCENT=**|Determine if the event is detected when the signal crosses the threshold in an upward direction.| 
 +|**!/ON_DESCENT=**|Determines if the event is detected when the signal crosses the threshold in a downward direction.| 
 +|**!/FRAME_WINDOW=8**|The range of frames that must satisfy the threshold crossing condition.| 
 +|**!/ENSURE_FRAMES_BEFORE=FALSE**| (True or False) Radius frames of data before crossing must lie on the same side of the threshold.| 
 +|**!/ENSURE_FRAMES_AFTER=FALSE**|(True or False) Radius frames of data after crossing must lie on the same side of the threshold.|
  
-The Threshold parameter can be:+===== 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.
  
-**a number** +{{:visual3d:documentation:pipeline:event_commands:event_thr_dialog.png?400|}}
-**a PROCESSED METRIC** +
-**an expression**+
  
-For example:+  * **New Event Label Name**Name to assign event that reaches threshold value. 
 +  * **Signal Component**: Direction of signal to use (X, Y, Z, ALL) 
 +  * **Frame Window**: Number of frames to check for threshold condition. 
 +  * **Frame Offset**: Shift event by a specified number of frames. 
 +  * **Time Offset**: Shift event by time (in seconds). 
 +  * **Threshold**: Value the signal must cross to trigger the event. 
 +  * **Event Instance**: Specify which instance of the event to label. (0 = all) 
 +  * **Label on Ascent/Descent**: Choose to place event when threshold is cross in an increasing signal (ascent) or decreasing signal (descent). 
 +  * **Ensure Window Before/After**: Full frame window is available before or after detected point to avoid errors. 
 +  * **Event Sequence**: Specify range in which to search for threshold crossings. 
 +  * **Event Subsequence**: Specify subrange in which to search for threshold crossings.
  
-**a number**\\ 
-/Threshold= 1 
  
-**a PROCESSED METRIC**\\ 
-If a METRIC value is stored in the PROCESSED folder, the Event_Threshold command will recognize and use the signal based only on the signal name.\\ 
-Given a METRIC signal named THRESH stored in the PROCESSED folder, you can specify the parameter as:\\ 
-/Threshold= THRESH 
  
-**an expression**\\ 
-It is also possible to use expressions, but when using expressions you must use the full signal name. 
  
-Given a METRIC signals THRESH that is stored in a folder labeled TEST\\ +===== Examples ===== 
-/ThresholdMETRIC::TEST::THRESH+The following examples will go through the use of the Event_Threshold command in the Visual3D application.
  
-But you can also elaborate this expression, such as\\ +==== Example 1: Detecting Peak Ground Reaction Force ==== 
-/Threshold= 1.0 + 0.2 * METRIC::TEST::THRESH+This example uses the **Event_Threshold** command to detect the event Max_GRF when the vertical ground reaction force (GRF_Z) crosses 1000N in the ascending direction:
  
-==== Example ==== +<code> 
- +Event_Threshold 
-**Create events using the Event_Threshold command**: **FP3_Y and FP3_Y_ENSURE**+/RESULT_EVENT_NAMEMax_GRF 
 +/SIGNAL_TYPES=FORCE 
 +! /SIGNAL_FOLDER=ORIGINAL 
 +/SIGNAL_NAMES=GRF_Z 
 +! /SIGNAL_COMPONENTS= 
 +! /FRAME_OFFSET=
 +! /TIME_OFFSET= 
 +! /EVENT_SEQUENCE
 +! /EXCLUDE_EVENTS= 
 +! /EVENT_SEQUENCE_INSTANCE=0 
 +! /EVENT_SUBSEQUENCE= 
 +! /SUBSEQUENCE_EXCLUDE_EVENTS= 
 +! /EVENT_SUBSEQUENCE_INSTANCE=0 
 +! /EVENT_INSTANCE=0 
 +/THRESHOLD= 1000 
 +/ON_ASCENT= TRUE 
 +! /ON_DESCENT= 
 +! /FRAME_WINDOW=8 
 +! /ENSURE_FRAMES_BEFORE=FALSE 
 +! /ENSURE_FRAMES_AFTER=FALSE 
 +
 +</code>
  
-The event **FP3_Y_ENSURE** will use the Ensure Window After option on the dialog box.+==== Example 2: Maintaining Event Window after Threshold Closing ==== 
 +In this example, the events **FP3_Y** and **FP3_Y_ENSURE** are created using the command. The event **FP3_Y_ENSURE** will use the "Ensure Window Afteroption within the dialog box, which guarantees that the event window remains open for a specified duration after the triggering condition is met
  
-**Make sure to:**\\ +To ensure correct functionality of the example, the following must be done
-1) Import the SIGNAL_TYPE/FOLDER or enter these parameters manually into the text editor\\ +  Import the SIGNAL_TYPE/FOLDER or enter these parameters manually into the text editor. 
-2) Only one signal component may be specified at a time\\ +  - Specify only one signal component at a time. 
-3) Select label on Ascent/Descent - if neither are selected no events will be created\\+  One of either **ON_ASCENT** or **ON_DESCENT** must be selected, if neither option is selected then no events will be created. In this example, we will chose to label on Ascent.
  
 <code> <code>
Line 112: Line 149:
 /ENSURE_FRAMES_AFTER= FALSE /ENSURE_FRAMES_AFTER= FALSE
 ; ;
-</code> 
-{{:EventThreshold_FP3_Y.jpg}}| 
  
-<code> 
 Event_Threshold Event_Threshold
 /RESULT_EVENT_NAME= FP3_Y_ENSURE /RESULT_EVENT_NAME= FP3_Y_ENSURE
Line 145: Line 179:
 ; ;
 </code> </code>
-{{:EventThreshold_FP3_Y_Ensure.jpg}}| 
  
-=== Example - Result ===+=== Result === 
 +After running this pipeline, you will notice 3 events have been created: 
 +  * 2 instances of **FP3_Y**, crosses the threshold (0.05) two times during the trial. 
 +  * 1 instance of **FP3_Y_ENSURE**, crosses the threshold (0.05) and stays above the threshold for the frame window (25) one time during the trial.
  
-Three events should be created:+{{:EventThreshold_FP3_Y_Ensure_Graph.jpg}}
  
-2 Instances of **FP3_Y** -The FP3_Y signal crosses the threshold (0.05) two times during the trial 
  
-1 Instance of **FP3_Y_ENSURE** -The FP3_Y signal crosses the threshold (0.05) and stays above the threshold for the frame window (25) one time during the trial  |{{:EventThreshold_FP3_Y_Ensure_Graph.jpg}}  |+===== Notes =====
  
-==== Visual3D Versions supporting Subject Prefixes ====+=== Visual3D Versions supporting Subject Prefixes ===
  
 When defining events for subjects that use a prefix to define the data belonging to that subject, event labels will also have the prefix of the subject the events belong to. When defining events for subjects that use a prefix to define the data belonging to that subject, event labels will also have the prefix of the subject the events belong to.
visual3d/documentation/pipeline/event_commands/event_threshold.1740678256.txt.gz · Last modified: 2025/02/27 17:44 by wikisysop