User Tools

Site Tools


visual3d:documentation:pipeline:signal_commands:signal_management_commands

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:signal_commands:signal_management_commands [2024/07/03 17:30] – removed sgrangervisual3d:documentation:pipeline:signal_commands:signal_management_commands [2024/07/17 15:46] (current) – created sgranger
Line 1: Line 1:
 +====== Signal Management Commands ======
 +
 +==== Contents ====
 +
 +
 +
 +  * [[#Signal_Management|1 Signal Management]]
 +    * [[#Global_Normalized_Signal_Mean|1.1 Global_Normalized_Signal_Mean]]
 +      * [[#Meta-Command_-_Create_Global_Means_For_Left_Right|1.1.1 Meta-Command - Create_Global_Means_For_Left_Right]]
 +    * [[#Find_Representative_Signal|1.2 Find Representative Signal]]
 +    * [[#Merge_Data|1.3 Merge_Data]]
 +    * [[#Copy_Folder|1.4 Copy_Folder]]
 +    * [[#Rename_Folder|1.5 Rename_Folder]]
 +    * [[#Delete_Folder|1.6 Delete_Folder]]
 +    * [[#Remove_Signals|1.7 Remove_Signals]]
 +    * [[#Rename_Signals|1.8 Rename_Signals]]
 +
 +
 +==== Signal Management ====
 +
 +=== Global_Normalized_Signal_Mean ===
 +
 +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: the Global_Normalized_Signal_Mean command only works on one component at at time for each signal. (You must select either Y, Y or Z as the SIGNAL_COMPONENTS.)
 +
 +First add the Global_Normalized_Signal_Mean command to the pipeline. Double click on the command to launch the dialog.
 +
 +{{:GMSM_1.jpg}}
 +
 +select the RKNEE_ANGLE Signal and the event sequence (e.g RHS to RHS) and select **Add A New Signal**
 +
 +{{:GNSM_2.jpg}}
 +
 +select the LKNEE_ANGLE Signal and the event sequence (e.g LHS to LHS) and select **Add A New Signal**
 +
 +{{:GNSM_3.jpg}}
 +
 +Enter the **P2D Result Signal Name** and click **Create Standard Deviation** Button {{:GNSM_4.jpg}}
 +
 +When you select **OK** the text representation of the command should be as follows:
 +
 +<code>
 +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 
 +;
 +</code>
 +
 +**Note:** If **CALCULATE_PER_FILE=FALSE** Signals from all active files are used to compute the mean.
 +
 +**Note:** If **CALCULATE_PER_FILE=TRUE** The mean value is computed for Signals from each active files. The global mean value is then the mean value of the mean values.
 +
 +**Note:** The Output signal is a P2D Signal, which is associated with every file. The resulting signal, therefore, is stored in the GLOBAL_WORKPACE
 +
 +== Meta-Command - Create_Global_Means_For_Left_Right ==
 +
 +A Meta-Command can be created for processing all 3 components of a number of model based signals using one pipeline command.
 +
 +Let the original cmo file contain the following signals: **RANKLE_ANGLE**, **RKNEE_ANGLE**, **RHIP_ANGLE**, **LANKLE_ANGLE**, **LKNEE_ANGLE**, and **LHIP_ANGLE**.
 +
 +Let the events for heel strike be labeled **LHS** and **RHS**. The mean signal should be computed from heel strike to heel strike.
 +
 +The Pipeline call for the Meta-Command below is:
 +
 +<code>
 +Create_Global_Means_For_Left_Right
 +
 +/TYPE=ANGLE
 +/JOINTS=ANKLE+KNEE+HIP
 +/START_EVENT=HS
 +/END_EVENT=HS
 +;
 +</code>
 +
 +The Meta-Command, which should be placed in the Meta_Command folder within the Plugins folder is as follows:
 +
 +<code>
 +! 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 
 +
 +! Create a Global_Normalized_Signal_Mean event for left and right sides with common labels (e.g.RHS and LHS) 
 +
 +For_Each /ITERATION_PARAMETER_NAME=INDEX1 
 +/ITEMS=::JOINTS
 +
 +
 +For_Each 
 +/ITERATION_PARAMETER_NAME=INDEX2 
 +/ITEMS=X+Y+Z 
 +
 +
 +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_For_Each 
 +/ITERATION_PARAMETER_NAME=INDEX2 
 +
 +
 +End_For_Each 
 +/ITERATION_PARAMETER_NAME=INDEX1 
 +;
 +</code>
 +
 +=== Find Representative Signal ===
 +
 +Find the signal that is most representative of a set of signals. This implementation is based on the following article:
 +
 +Shadmehr R and Mussa-Ivaldi FA (1994) **Adaptive Representation of Dynamics during Learning of a Motor Task**. J. Neuroscience 14(5), pp 3208-3224.
 +
 +**Note:** that there is an error in the appendix that we have accounted for.
 +
 +For example, to find the representative Knee Flexion Angle over the range RHS to RHS.
 +
 +<code>
 +Find_Representative_Signal
 +/SIGNAL_TYPES=LINK_MODEL_BASED 
 +/SIGNAL_NAMES=RKNEE_ANGLE 
 +/SIGNAL_FOLDER=ORIGINAL 
 +/SIGNAL_COMPONENTS=X 
 +/EVENT_SEQUENCE=RHS+RHS 
 +! /EXCLUDE_EVENTS= 
 +! /NORMALIZE_RESULT_POINTS= 
 +/RESULT_NAME=RKNEE_ANGLE_REP 
 +! /RESULT_FOLDER=ORIGINAL 
 +;
 +</code>
 +
 +=== Merge_Data ===
 +
 +Merges data from more than one data name into a single signal either by **APPEND_TO_END** (appending one signal to the end of another signal) or by **MERGE_AS_NEW_COMPONENTS** (treat each original signal as a component of the new signal)
 +
 +For example, create a vector from 3 analog signals.
 +
 +<code>
 +Merge_Data
 +/SIGNAL_NAMES=Analog1+Analog2+Analog3
 +/SIGNAL_TYPES=ANALOG+ANALOG+ANALOG 
 +/SIGNAL_FOLDER=ORIGINAL+ORIGINAL+ORIGINAL 
 +/SIGNAL_COMPONENTS=0+0+0 
 +/RESULT_NAME=Vector 
 +/RESULT_TYPE=DERIVED 
 +/RESULT_FOLDER=PROCESSED 
 +/MERGE_TYPE=MERGE_AS_NEW_COMPONENTS 
 +;
 +</code>
 +
 +**Note:** If the Signal_Components parameter is empty, all components of the signals will be used.
 +
 +=== Copy_Folder ===
 +
 +Makes a copy of an existing folder. If the new folder already exists, select whether these signals should be overwritten (replaced).
 +
 +<code>
 +Copy_Folder 
 +/SIGNAL_TYPE= 
 +/EXISTING_FOLDER= 
 +/NEW_FOLDER_NAME= 
 +/OVERWRITE_EXISTING_SIGNALS=FALSE 
 +;
 +</code>
 +
 +=== Rename_Folder ===
 +
 +Rename the specified data tree folder.
 +
 +<code>
 +Rename_Folder 
 +/SIGNAL_TYPE= 
 +/EXISTING_FOLDER= 
 +/NEW_FOLDER_NAME= 
 +;
 +</code>
 +
 +=== Delete_Folder ===
 +
 +Deletes the specified folder. **Note:** that ORIGINAL folders cannot be deleted.
 +
 +<code>
 +Delete_Folder 
 +/SIGNAL_TYPE= 
 +/FOLDER= 
 +;
 +</code>
 +
 +=== Remove_Signals ===
 +
 +Remove a signal from the Workspace. **Note:** that Visual3D will not allow the user to delete ORIGINAL signals.
 +
 +<code>
 +Remove_Signals 
 +/SIGNAL_TYPES= 
 +/SIGNAL_NAMES=  
 +! /SIGNAL_FOLDER=ORIGINAL  
 +;
 +</code>
 +
 +For example, remove one Derived signal and one Metric
 +
 +<code>
 +Remove_Signals
 +/SIGNAL_TYPES=DERIVED+METRIC 
 +/SIGNAL_NAMES=  DERIVED1+METRIC1
 +! /SIGNAL_FOLDER=PROCESSED+PROCESSED
 +;
 +</code>
 +
 +=== Rename_Signals ===
 +
 +Rename a signal in the Workspace.
 +
 +For example, rename a DERIVED signal in all of the ACTIVE files
 +
 +<code>
 +Rename_Signals
 +! /FILE_NAME=
 +/SIGNAL_TYPES=DERIVED 
 +/SIGNAL_NAMES=Derived1
 +/SIGNAL_FOLDER=PROCESSED 
 +/NEW_SIGNAL_NAME=Derived2 
 +! /APPEND_TO_OLD_SIGNAL_NAME=FALSE
 +;
 +</code>
 +
 +
  
visual3d/documentation/pipeline/signal_commands/signal_management_commands.1720027814.txt.gz · Last modified: 2024/07/03 17:30 by sgranger