visual3d:documentation:pipeline:signal_commands:divide_signal_by_constant
Table of Contents
Divide_Signal_By_Constant
The Divide Signal By Constant command can be used to divide signals by a constant value. This can be useful in cases such as converting between units or orders of magnitude.
Pipeline Command
The Divide Signal By Constant command can be found in the pipeline workshop within the Signal Math folder as so:
Divide_Signal_By_Constant ! /SIGNAL_TYPES= ! /SIGNAL_FOLDER=ORIGINAL ! /SIGNAL_NAMES= ! /SIGNAL_COMPONENTS= ! /RESULT_TYPES= ! /RESULT_FOLDERS=PROCESSED ! /RESULT_NAME= ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME= ! /CONSTANT=0 ;
Command Parameters
The parameters that can be used to control the command are as follows:
| Signal Types | The type of signal to be divided by the constant |
| Signal Folder | The name of the signal folder |
| Signal Names | The name of each signal to be divided by the constant |
| Signal Components | Which signal components to include in operation |
| Result Types | What type of signal will be produced |
| Result Folders | The name of the resulting folder |
| Result Name | The name of the resulting signal |
| Apply As Suffix To Signal Name | Apply a suffix to the original signal name |
| Constant | The value by which the original signal(s) will be divided |
Dialog
Example: Converting Joint Angle to Radians
Say for some reason you wanted to view a joint angle in radians instead of degrees, this command could be used to do so:
Divide_Signal_By_Constant /SIGNAL_TYPES=LINK_MODEL_BASED ! /SIGNAL_FOLDER=ORIGINAL /SIGNAL_NAMES=LAnkleAngle /SIGNAL_COMPONENTS=X+Y+Z /RESULT_TYPES=Derived ! /RESULT_FOLDERS=PROCESSED /RESULT_NAME=LAnkle_Rad ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME= /CONSTANT=57.3 ;
Example: EMG Normalization
This example shows how a group of EMG signals can be scaled relative to the maximum observed signal by defining the maximum signal and dividing each signal by that value:
Metric_Maximum /RESULT_METRIC_FOLDER=Max_Observed_Signal /RESULT_METRIC_NAME=_MAX /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE /SIGNAL_TYPES=ANALOG /SIGNAL_FOLDER=ENVELOPE ! /SIGNAL_NAMES= /COMPONENT_SEQUENCE=ALL /EVENT_SEQUENCE=start+stop /EXCLUDE_EVENTS= /SEQUENCE_PERCENT_START= /SEQUENCE_PERCENT_END= /GENERATE_MEAN_AND_STDDEV=FALSE ! /GENERATE_MEAN_AND_STDDEV_ACROSS_SUBJECTS=FALSE ! /APPEND_TO_EXISTING_VALUES=FALSE /CREATE_GLOBAL_MAXIMUM=TRUE ! /CREATE_TRIAL_MAXIMUM=FALSE ; For_Each /ITERATION_PARAMETER_NAME=INDEX ! /ITERATION_PARAMETER_COUNT_NAME= /ITEMS=::EMG ; Divide_Signal_By_Constant /SIGNAL_TYPES=ANALOG /SIGNAL_FOLDER=ENVELOPE /SIGNAL_NAMES=::INDEX ! /SIGNAL_COMPONENTS= /RESULT_TYPES=ANALOG /RESULT_FOLDERS=NORMALIZED /RESULT_NAME=::INDEX /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE /CONSTANT=GLOBAL::METRIC::Max_Observed_Signal&:&:&::INDEX&_MAX_MAX ; End_For_Each /ITERATION_PARAMETER_NAME=INDEX ;
visual3d/documentation/pipeline/signal_commands/divide_signal_by_constant.txt · Last modified: by wikisysop

