visual3d:documentation:pipeline:signal_commands:global_normalized_signal_mean
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:pipeline:signal_commands:global_normalized_signal_mean [2024/06/19 13:38] – removed sgranger | visual3d:documentation:pipeline:signal_commands:global_normalized_signal_mean [2024/11/15 20:57] (current) – Major strides towards pipeline command format. wikisysop | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Global Normalized Signal Mean ===== | ||
+ | |||
+ | This command computes the mean signal from a collection of signal traces, with each trace time-normalized to the specified [[visual3d: | ||
+ | |||
+ | There are options within this command for calculating means: | ||
+ | * for all traces from all active files | ||
+ | * for all Signal traces with each active file. The global mean value is then the mean value of all values across all active c3d files. | ||
+ | * for more than one CMO workspace. The mean value computed for the CMO library is the mean of the mean values from each CMZ file. For example, if one CMZ file has 10 signal traces and another CMZ file has 1 signal trace, each CMZ file contributes the same weight (i.e. each file contributes one mean signal trace). | ||
+ | |||
+ | < | ||
+ | Global_Normalized_Signal_Mean | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | /END_LABEL= | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== Parameters ==== | ||
+ | |||
+ | If **CALCULATE_PER_FILE=false** All signal traces from all active files are used to compute the mean | ||
+ | |||
+ | If **CALCULATE_PER_FILE=true** In addition to the global mean signal the mean value is computed for all Signal traces with each active file. The global mean value is then the mean value of the mean values | ||
+ | |||
+ | If the **CMO Library** is active, it is important to highlight the distinction, | ||
+ | |||
+ | ==== Output ==== | ||
+ | |||
+ | The resulting signal is a [[Visual3D: | ||
+ | |||
+ | If **CALCULATE_PER_FILE=true** then a P2D signal is also stored with each C3D file. | ||
+ | |||
+ | ==== Dialog ==== | ||
+ | |||
+ | The Global_Normalized_Signal_Mean command can also be edited interactively using the following dialog | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ==== Multisubject support ==== | ||
+ | |||
+ | Visual3D supports multiple subjects within the same workspace, and across CMO/Z library workspaces. Older versions of Visual3D will not support the subject prefix extensions of this command. | ||
+ | |||
+ | When using a version of Visual3D [[visual3d: | ||
+ | |||
+ | After v2022.08.1, Visual3D extends these normalized signal mean calculations to be computed for each subject that is identified in the .C3D parameters SUBJECT section. In this way, the a single CMO/Z GLOBAL will contain the normalized mean curve for each subject within the CMO/Z file, prefixed with the subject' | ||
+ | |||
+ | ==== Examples ==== | ||
+ | |||
+ | This command is incredibly useful for summarizing data in your CMZ files and there are a number of ways in which it can be used. | ||
+ | |||
+ | === Example 1: Global Normalized Means for 2 Signals === | ||
+ | |||
+ | This example will time-normalize a signal (in this case Knee Flexion Angle) between events (RHS to RHS) for right knee angles and (LHS to LHS) for left knee angles, and compute the Global mean and standard deviation. | ||
+ | |||
+ | **Note:** this example assumes that Right and Left Knee angles have been created and the events RHS and LHS have been found. | ||
+ | |||
+ | First add the **Global_Normalized_Signal_Mean** command to the pipeline. Double click on the command to launch the dialog. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | In the bottom left-hand section of the dialog, select the **Link_Model_Based** signal type, **RKNEE_ANGLE** signal, and **X** component. Select the event sequence (e.g **RHS** to **RHS**). Click on **Add A New Signal**. The signal will now appear in the middle section of the dialog. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | To add the left knee angle signal, select the **Link_Model_Based** signal type, **LKNEE_ANGLE** signal, and **X** component. Select the event sequence (e.g **LHS** to **LHS**). Click on **Add A New Signal**. The signal will now appear in the middle section of the dialog. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Enter the **P2D Result Signal Name**, in this case **Knee_Angle**. Click on **Create Standard Deviation**. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Click **OK** to close the dialog. The text representation of the command is similar to the example seen in the next section. | ||
+ | |||
+ | === Example 2: Global Normalized Means for more than two signals === | ||
+ | |||
+ | This example will time-normalize several signals at the Hip, Knee, and Ankle for both left and right sides using a meta-command. The means for all 3 components of the each signal will be calculated. | ||
+ | |||
+ | Let the CMZ file contain the following signals: | ||
+ | * RANKLE_ANGLE | ||
+ | * RKNEE_ANGLE | ||
+ | * RHIP_ANGLE | ||
+ | * LANKLE_ANGLE | ||
+ | * LKNEE_ANGLE | ||
+ | * LHIP_ANGLE | ||
+ | |||
+ | The events for heel strike are found and labeled **LHS** and **RHS**. This pipeline command script will call the meta-command **Create_Global_Means_For_Left_Right** to calculate the mean signal from heel strike to heel strike. | ||
+ | |||
+ | < | ||
+ | Create_Global_Means_For_Left_Right | ||
+ | /TYPE=ANGLE | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | The Meta-Command **Create_Global_Means_For_Left_Right** below can be copied and pasted into a text editor and should be placed in the **Meta_Command** folder within the **Plugins** folder is as follows: | ||
+ | |||
+ | < | ||
+ | ! BEGIN_META | ||
+ | ! META_CMD_NAME=Create_Global_Means_For_Left_Right | ||
+ | ! META_PARAM= TYPE: | ||
+ | ! META_PARAM= JOINTS: | ||
+ | ! META_PARAM= START_EVENT: | ||
+ | ! META_PARAM= END_EVENT: | ||
+ | ! END_META | ||
+ | |||
+ | ! Loop for the joint angles that are passed to the meta-command | ||
+ | For_Each | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ! Loop for the Components - X, Y, and Z | ||
+ | For_Each | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ! Create the Global_Normalized_Signal_Mean using the joint parameter and the type parameter for the Left and Right sides | ||
+ | Global_Normalized_Signal_Mean | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | ! End of component loop | ||
+ | End_For_Each | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ! End of the joint loop | ||
+ | End_For_Each | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | ==== Exporting the Global Normalized Signal Mean ==== | ||
+ | |||
+ | The signal is stored in the [[visual3d: | ||
+ | |||
+ | < | ||
+ | ! Select GLOBAL as the active | ||
+ | Select_Active_File | ||
+ | /FILE_NAME= GLOBAL | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | ! Export the Global Normalized Signal Mean to ASCII | ||
+ | ! The ALL signal components will export the normalized time, the mean signal, and the standard deviation | ||
+ | ! Leaving the file_name blank will cause the user to be prompted for a name | ||
+ | Export_Data_To_Ascii_File | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | |||
visual3d/documentation/pipeline/signal_commands/global_normalized_signal_mean.1718804336.txt.gz · Last modified: 2024/06/19 13:38 by sgranger