Global Normalized Signal Mean
Language: | English • français • italiano • português • español |
---|
This command will compute the mean signal from a collection of signal traces. Each trace is time normalized to the specified Event_Sequence. Note that the Output signal is a P2D Signal. The resulting signal, therefore, is stored in the GLOBAL_WORKSPACE.
There are options within this command for calculating means:
- calculate the mean for all traces from all active files
- 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
- For more than one cmo workspace. If the CMO Workspace is active (either motion files or globals then process the per CMO mean). In other words the mean value computed from the cmo library is the mean of the mean values from each cmo file. For example, if one cmo file has 10 signal traces and another cmo file has 1 signal trace, each cmo file contributes the same weight (i.e. each file contributes one mean signal trace).
The details for the above command options are discussed in the next section.
Pipeline Command
The details for the command are:
- Global_Normalized_Signal_Mean
- /SIGNAL_TYPES=LINK_MODEL_BASED+LINK_MODEL_BASED
- /SIGNAL_NAMES=RKNEE_ANGLE+LKNEE_ANGLE
- /SIGNAL_FOLDER=ORIGINAL+ORIGINAL
- /SIGNAL_COMPONENTS=X+X
- /START_LABEL=
- /END_LABEL=
- /EVENT_SEQUENCE= RHS+RHS++LHS+LHS
- ! /EXCLUDE_EVENTS=
- /RESULT_NAME=KNEE_FLEXION
- ! /RESULT_FOLDER=ORIGINAL
- /NORMALIZE_POINTS=101
- /CREATE_STANDARD_DEVIATION=TRUE
- ! /CALCULATE_PER_FILE=FALSE
- ;
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 Workspace is active (either motion files or globals, then process the per CMO mean). In other words the mean value computed from the cmo library is the mean of the mean values from each cmo file. For example, if one cmo file has 10 signal traces and another cmo file has 1 signal trace, each cmo file contributes the same weight (i.e. each file contributes one mean signal trace).
Resulting Signals
The resulting signal is a P2D signal and is stored in the GLOBAL_WORKSPACE.
If CALCULATE_PER_FILE=true a P2D signal is also stored with each C3D file.
Interactive Dialog
Several pipeline command have an interactive dialog that will allow you to set parameters via the dialog. For some parameters, you may still have to make changes via the text editor. The dialog for Global_Normalized_Signal_Mean is found below.
Examples
Below are a few examples using this command.
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 a 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 secton.
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 cmo 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 /JOINTS=ANKLE+KNEE+HIP /START_EVENT=HS /END_EVENT=HS ;
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:string::yes ! META_PARAM= JOINTS:string::yes ! META_PARAM= START_EVENT:string::yes ! META_PARAM= END_EVENT:string::yes ! END_META ! Loop for the joint angles that are passed to the meta-command For_Each /ITERATION_PARAMETER_NAME=INDEX1 /ITEMS=::JOINTS ; ! Loop for the Components - X, Y, and Z For_Each /ITERATION_PARAMETER_NAME=INDEX2 /ITEMS=X+Y+Z ; ! Create the Global_Normalized_Signal_Mean using the joint parameter and the type parameter for the Left and Right sides Global_Normalized_Signal_Mean /SIGNAL_TYPES=LINK_MODEL_BASED+LINK_MODEL_BASED /SIGNAL_NAMES=R&::INDEX1&_&::TYPE+L&::INDEX1&_&::TYPE /SIGNAL_FOLDER=ORIGINAL+ORIGINAL /SIGNAL_COMPONENTS=::INDEX2+::INDEX2 /START_LABEL=R&::START_EVENT+L&::END_EVENT /END_LABEL=R&::START_EVENT+L&::END_EVENT ! /EVENT_SEQUENCE= ! /EXCLUDE_EVENTS= /RESULT_NAME=::INDEX1&_&::TYPE&_&::INDEX2 ! /RESULT_FOLDER=ORIGINAL ! /NORMALIZE_POINTS=101 ! /CREATE_STANDARD_DEVIATION=FALSE ! /CALCULATE_PER_FILE=FALSE ; ! End of component loop End_For_Each /ITERATION_PARAMETER_NAME=INDEX2 ; ! End of the joint loop End_For_Each /ITERATION_PARAMETER_NAME=INDEX1 ;
Exporting the Global Normalized Signal Mean
The signal is stored in the Global Workspace, so it is necessary to make GLOBAL the active file before the export command. In addition, the resulting signal is a P2D file. The components for a P2D signal are different. Below is an example script that will export to ASCII the resulting P2D file.
! Select GLOBAL as the active Select_Active_File /FILE_NAME= GLOBAL ! /QUERY= ; ! 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 /FILE_NAME= /SIGNAL_TYPES=P2D /SIGNAL_NAMES=KNEE_ANGLE_X /SIGNAL_FOLDER=ORIGINAL /SIGNAL_COMPONENTS=ALL ! /START_LABEL= ! /END_LABEL= ! /Event_Sequence= ! /Exclude_Events= ! /USE_POINT_RATE=FALSE ! /NORMALIZE_DATA=FALSE ! /NORMALIZE_POINTS=101 ! /EXPORT_MEAN_AND_STD_DEV=FALSE ! /USE_P2D_FORMAT=FALSE ;