User Tools

Site Tools


visual3d:documentation:pipeline:metric_commands:remove_metrics_by_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:metric_commands:remove_metrics_by_threshold [2024/07/03 17:29] – removed sgrangervisual3d:documentation:pipeline:metric_commands:remove_metrics_by_threshold [2025/10/02 14:22] (current) – [Example] wikisysop
Line 1: Line 1:
 +====== Remove Metrics By Threshold ======
 +====Overview====
 +The command **Remove Metrics by Threshold** removes metrics above or below a threshold, allowing you to keep those within the range, or outside the range. This can be useful when trying to isolate data within a certain signal range, or when trying to isolate outliers. If a component is removed, all components at that frame are removed. The command can be found within the **Pipeline Workshop** under **Metric**.
  
 +====Pipeline Command====
 +
 +The syntax for the function is as follows:
 +
 +<code>
 +Remove_Metrics_By_Threshold
 +! /METRIC_FOLDERS=
 +/METRIC_NAMES=
 +/METRIC_COMPONENTS=
 +! /REMOVE_METRICS_ABOVE=
 +! /REMOVE_METRICS_BELOW=
 +;
 +</code>
 +
 +====Command Parameters====
 +
 +The following table shows the command parameters seen above and their descriptions:
 +|**Remove_Metrics_By_Threshold**|                                          |
 +|**/Metric_Names=**             |The names of the metrics                  |
 +|**/Metric_Folders=**           |The folders of the metrics                |
 +|**/Metric_Components=**        |The components of the metrics to be tested|
 +|**/Remove_Metrics_Above=**     |An Expression                             |
 +|**/Remove_Metrics_Below=**     |An Expression)                            |
 +
 +====Example: Removing Power Readings Above Threshold====
 +Here **Metric Remove Metrics By Threshold ** is used to look at left ankle power readings at heel strikes and remove instances above a certain threshold. In the case that you are looking at the conditions that cause a certain range of values in a metric it can be useful to make sure that the resulting metric contains only those values, while another contains values outside of that range. 
 +
 +The pipeline command is as follows:
 +
 +<code>
 +Remove_Metrics_By_Threshold
 + /METRIC_FOLDERS=PROCESSED
 +/METRIC_NAMES=LAnklePower_Stride
 +/METRIC_COMPONENTS=X
 +/REMOVE_METRICS_ABOVE=0.7
 +/REMOVE_METRICS_BELOW=0
 +;
 +</code>
 +
 +====Example: Sorting Metric into groups====
 +In other cases, instead of eliminating values outside of a given range you may want to sort your metric into groups according to magnitude. This can be used to eliminate outliers or identify conditions between groups.
 +
 +Here the left ankle power at LON and the right knee power at RON are examined and values within each are sorted into positive and negative groups. This can be done by defining two metrics for each variable, one for the positive group and one for the negative, and appkying the **Remove Metrics By Threshold** command to each group. 
 +
 +The full command is as so:
 +
 +<code>
 +Automatic_Gait_Events
 +! /FRAME_WINDOW=8
 +! /USE_TPR=TRUE
 +! /TPR_EVENT_INSTANCE=1
 +;
 +
 +Metric_Signal_Value_At_Event
 +/SIGNAL_TYPES=LINK_MODEL_BASED
 +! /SIGNAL_FOLDER=ORIGINAL
 +/SIGNAL_NAMES=LAnklePower
 +/RESULT_METRIC_FOLDER=PROCESSED
 +/RESULT_METRIC_NAME=LAnklePower_LON
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
 +/SIGNAL_COMPONENTS=ALL
 +!/COMPONENT_SEQUENCE=
 +/EVENT_NAME=LON
 +! /EVENT_INSTANCE=0
 +! /SCALE_FACTORS=1
 +! /GENERATE_GLOBAL_MEAN_AND_STDDEV=TRUE
 +! /GENERATE_LOCAL_MEAN_AND_STDDEV=TRUE
 +! /APPEND_TO_EXISTING_VALUES=FALSE
 +! /GENERATE_VECTOR_LENGTH_METRIC=FALSE
 +! /RETAIN_NO_DATA_VALUES=FALSE
 +;
 +
 +Metric_Signal_Value_At_Event
 +/SIGNAL_TYPES=LINK_MODEL_BASED
 +! /SIGNAL_FOLDER=ORIGINAL
 +/SIGNAL_NAMES=LAnklePower
 +/RESULT_METRIC_FOLDER=PROCESSED
 +/RESULT_METRIC_NAME=LAnklePower_LON_NEG
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
 +/SIGNAL_COMPONENTS=ALL
 +!/COMPONENT_SEQUENCE=
 +/EVENT_NAME=LON
 +! /EVENT_INSTANCE=0
 +! /SCALE_FACTORS=1
 +! /GENERATE_GLOBAL_MEAN_AND_STDDEV=TRUE
 +! /GENERATE_LOCAL_MEAN_AND_STDDEV=TRUE
 +! /APPEND_TO_EXISTING_VALUES=FALSE
 +! /GENERATE_VECTOR_LENGTH_METRIC=FALSE
 +! /RETAIN_NO_DATA_VALUES=FALSE
 +;
 +
 +Metric_Signal_Value_At_Event
 +/SIGNAL_TYPES=LINK_MODEL_BASED
 +! /SIGNAL_FOLDER=ORIGINAL
 +/SIGNAL_NAMES=RKneePower
 +! /RESULT_METRIC_FOLDER=PROCESSED
 +/RESULT_METRIC_NAME=KNEEPOWER_RON
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
 +! /SIGNAL_COMPONENTS=
 +! /COMPONENT_SEQUENCE=
 +/EVENT_NAME=RON
 +! /EVENT_INSTANCE=0
 +! /SCALE_FACTORS=1
 +! /GENERATE_GLOBAL_MEAN_AND_STDDEV=TRUE
 +! /GENERATE_LOCAL_MEAN_AND_STDDEV=TRUE
 +! /APPEND_TO_EXISTING_VALUES=FALSE
 +! /GENERATE_VECTOR_LENGTH_METRIC=FALSE
 +! /RETAIN_NO_DATA_VALUES=FALSE
 +;
 +
 +Metric_Signal_Value_At_Event
 +/SIGNAL_TYPES=LINK_MODEL_BASED
 +! /SIGNAL_FOLDER=ORIGINAL
 +/SIGNAL_NAMES=RKneePower
 +! /RESULT_METRIC_FOLDER=PROCESSED
 +/RESULT_METRIC_NAME=KNEEPOWER_RON_NEG
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
 +! /SIGNAL_COMPONENTS=
 +! /COMPONENT_SEQUENCE=
 +/EVENT_NAME=RON
 +! /EVENT_INSTANCE=0
 +! /SCALE_FACTORS=1
 +! /GENERATE_GLOBAL_MEAN_AND_STDDEV=TRUE
 +! /GENERATE_LOCAL_MEAN_AND_STDDEV=TRUE
 +! /APPEND_TO_EXISTING_VALUES=FALSE
 +! /GENERATE_VECTOR_LENGTH_METRIC=FALSE
 +! /RETAIN_NO_DATA_VALUES=FALSE
 +;
 +
 +Remove_Metrics_By_Threshold
 + /METRIC_FOLDERS=PROCESSED
 +/METRIC_NAMES=LAnklePower_LON
 +/METRIC_COMPONENTS=X
 +!/REMOVE_METRICS_ABOVE=
 +/REMOVE_METRICS_BELOW=0
 +;
 +
 +Remove_Metrics_By_Threshold
 + /METRIC_FOLDERS=PROCESSED
 +/METRIC_NAMES=LAnklePower_LON_NEG
 +/METRIC_COMPONENTS=X
 +/REMOVE_METRICS_ABOVE=0
 +!/REMOVE_METRICS_BELOW=
 +;
 +
 +Remove_Metrics_By_Threshold
 +! /METRIC_FOLDERS=PROCESSED
 +/METRIC_NAMES=KNEEPOWER_RON
 +/METRIC_COMPONENTS=X
 +! /REMOVE_METRICS_ABOVE=
 + /REMOVE_METRICS_BELOW=0
 +;
 +
 +Remove_Metrics_By_Threshold
 +! /METRIC_FOLDERS=PROCESSED
 +/METRIC_NAMES=KNEEPOWER_RON_NEG
 +/METRIC_COMPONENTS=X
 + /REMOVE_METRICS_ABOVE=0
 +! /REMOVE_METRICS_BELOW=
 +;
 +</code>
 +
 +
 +Prior to removing metrics by threshold the KNEEPOWER_RON metric looked like so:
 +
 +{{:visual3d:documentation:pipeline:metric_commands:knee_ron_before.png?600|}}
 +
 +After the command had been applied the result was as so:
 +
 +{{:visual3d:documentation:pipeline:metric_commands:knee_ron_after.png?600|}}
 +
 +Notice that the X values column now only includes positive values, the negative values are included in a new metric. 
visual3d/documentation/pipeline/metric_commands/remove_metrics_by_threshold.1720027747.txt.gz · Last modified: 2024/07/03 17:29 by sgranger