Table of Contents
Metric Commands Overview
Metrics are discrete quantitative values of signals such as maximum value, median value, value at a specified frame. In other words, metrics do not have a time-base like other signals. Metrics are stored in the METRIC data type within Visual3D's data tree.
Pipeline commands related to metrics can be divided into four categories:
- Math: common mathematical operations that result in a metric
- Computation: more involved computational processes that are expressed as a single command
- Events: commands related to events, event sequences, or signal values at event frames
- Miscellaneous: all other metric-related commands
Metric Math Commands
| Pipeline Command | Description |
|---|---|
| Metric_Cross_Product | Calculates the cross product of two metric vectors. |
| Metric_Dot_Product | Calculates the dot product of two metric vectors. |
| Metric_Integrate | Integrates a signal between events using the trapezoidal rule. |
| Metric_Maximum | Computes the maximum value of a signal. |
| Metric_Mean | Computes the mean value of a signal. |
| Metric_Median | Computes the median value of a signal. |
| Metric_Minimum | Computes the minimum value of a signal. |
| Metric_Root_Mean_Squared | Computes the Root Mean Squared value of a signal. |
| Metric_StdDev | Computes the standard deviation of a signal. |
| Metric_Sum | Sums the signal components over a range from a Start event to End event. |
Metric Computation Commands
| Pipeline Command | Description |
|---|---|
| Metric_Compute_DFT_Coefficients | This command computes a metric signal containing the Discrete Fourier Transform of a Signal coefficients and the Base Frequency. |
| Metric_Compute_Gait_Signal_Stats | Compute discrete gain metrics that are part of the common cohort of gait parameters. |
| Metric_Compute_Power_From_DFT_Coefficients | he power in a signal computed from its DFT coefficients. |
| Metric_Compute_Temporal_Distance | Computes the Gait Temporal Distance values consistent with the Visual3D report item. Note that the results consist of data from multiple files, so the results are stored in the GLOBAL workspace. |
| Metric_Compute_Volume_of_a_Convex_Hull_Across_Frames | Finds the area or volume of the convex hull, the smallest convex set containing all of the points in a Euclidian space, for a dataset across several frames. See also Compute_Volume_of_a_Convex_Hull for the version of this comand that produces a signal. |
| Metric_Compute_95Confidence_Ellipse | Computes the 95% confidence ellipse, the smallest ellipse that will cover 95 % of the data points, in 2 or more dimensions. |
Metric Event Commands
| Pipeline Command | Description |
|---|---|
| Metric_Event_Count | Creates a metric containing the number of events that occur during a specified time interval or event sequence. |
| Metric_Event_Sequence_Count | Creates a metric containing the number of occurrences for a particular Event Sequence. |
| Metric_Explicit | Creates a metric explicitly, allowing new metrics to be created without input or reference data. |
| Metric_Frames_Between_Events | Computes the number of frames between events (or start and end of a sequence of events) as a metric. |
| Metric_Time_Between_Events | Computes the time between events (or start and end of a sequence of events) as a metric. |
| Metric_Time_of_Maximum_from_Event | Computes the time between an event occurrence and the (local) maximum value of a signal. |
| Metric_Time_of_Minimum_from_Event | Computes the time between an event occurrence and the (local) minimum value of a signal. |
| Metric_Time_of_Global_Maximum_from_Event | Computes the time between an event occurrence and the global maximum value of a signal. |
| Metric_Time_of_Global_Minimum_from_Event | Computes the time between an event occurrence and the global minimum value of a signal. |
| Metric_Time_of_Threshold_from_Event | Computes the time between an event occurrence and a signal crossing a threshold. |
| Metric_Vector_Between_Events | Creates a metric vector between a signal(s) value at a start and an end event. |
| Metric_Signal_Value_At_Event | Stores the value of the specified signal at the specified frame of data. |
| Metric_Signal_Values_in_Sequence | Stores the value of a signal at several events within a sequence, like at heel and toe strikes within a gait sequence. |
Miscellaneous Metric Commands
| Pipeline Command | Description |
|---|---|
| Metric_To_Fit_Signal_To_Line | Fits a signal to a straight line given by the equation Y = mX + b. Creates metrics for Slope (m), Intercept (b), Slope Uncertainty (Sigma m), Intercept Uncertainty (Sigma b), Chi2, and Q (R-squared). |
| Remove_Metrics_By_Threshold | Removes metrics above or below a threshold, allowing you to keep those within the range, or outside the range. |
| Metric_Golf_Swing_Plane | Computes the best fit plane to the trajectory of a TARGET or LANDMARK signal, usually defined within a specific event sequence (e.g., the golf swing phase). The underlying calculation uses Evaluate_Expression's Best Fit Plane method. |
| Metric_From_C3D_Parameter | Used to copy the values of a C3D parameter to a metric. |
Metric Command Examples
This collection of examples gives you an overview of the types of calculations that can be done using metric pipeline commands.
Compute Index from Literature
The first example shows how to compute two metrics from a journal article: stability index (SI) and dynamic postural stability index (DPSI).
Wikstrom EA, Tillman MD, Kline KJ, Borsa PA (2006) Gender and Limb Differences in Dynamic Postural Stability During Landing. Clin J Sport Med. Link
Calculate Knee Angle at Foot Contact for both Left and Right
The second example works with a file containing multiple walking strides for which the events LON and RON have been created, representing the left and right foot contacts with an instrumented treadmill. The example then creates one metric containing the value of the right knee angle at the event RON interleaved with the left knee angle at the event LON.
Meta-Command for Linear Regression
The next example implements a meta-command to compute linear regression.
See also the next example.
Meta-Command for Linear Regression with Event Labels
This example implements a meta-command to compute linear regression using Event_Labels to define the range.
See also the previous example.
Frame Numbers of Events
The final example creates a metric for each of a series of event labels containing the frame number of the event.
