visual3d:documentation:emg:processing_tools
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:emg:processing_tools [2024/07/03 17:25] – removed sgranger | visual3d:documentation:emg:processing_tools [2024/07/17 15:45] (current) – created sgranger | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Processing Tools ====== | ||
+ | |||
+ | ==== Introduction ==== | ||
+ | |||
+ | The purpose is to offset trial data to accommodate for any DC shift. Quantifying the EMG background noise based on a " | ||
+ | |||
+ | Find overall mean of trial: | ||
+ | |||
+ | if positive, subtract mean from all values to offset overall average to zero | ||
+ | if negative, add mean to all values to offset overall average to zero. | ||
+ | Rectify trial around the zero baselines | ||
+ | |||
+ | Calculate threshold values for each channel of EMG (level of digitized baseline noise). | ||
+ | |||
+ | Determine noise threshold (i.e., the value determined from the resting EMG values fall below; calculated by passing a ceiling through data at successively higher levels until all data values for the 5 second duration fall below the ceiling. | ||
+ | ==== EMG_Resting_Background ==== | ||
+ | |||
+ | You can remove the background using a Meta-Command (as described below), or you can see [[Visual3D: | ||
+ | |||
+ | ==== EMG_Resting_Background Meta-Command ==== | ||
+ | |||
+ | The following Meta Command can be Cut-and-Paste into a file named **EMG_Resting_Background.v3m** | ||
+ | |||
+ | < | ||
+ | ! BEGIN_META | ||
+ | ! META_CMD_NAME=EMG_Resting_Background | ||
+ | ! META_PARAM= SIGNAL_NAMES: | ||
+ | ! META_PARAM= SIGNAL_FOLDER: | ||
+ | ! META_PARAM= RESULT_FOLDER: | ||
+ | ! END_META | ||
+ | |||
+ | Set_Pipeline_Parameter | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | Set_Pipeline_Parameter | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | ! --------------------------------------------------------------- | ||
+ | ! Offset trial data to accommodate for any DC shift | ||
+ | ! (find overall mean of trial& | ||
+ | ! subtract mean from all values to offset overall average to zero& | ||
+ | ! if negative, add mean to all values to offset overall average to zero). | ||
+ | ! Rectify trial around the zero baselines | ||
+ | ! (all values set to absolute values). | ||
+ | ! --------------------------------------------------------------- | ||
+ | |||
+ | For_Each | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | Metric_Mean | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | End_For_Each | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ! --------------------------------------------------------------- | ||
+ | ! Calculated threshold values for each channel of EMG | ||
+ | ! (level of digitized baseline noise). | ||
+ | ! Apply noise threshold (i.e., the value determined from the | ||
+ | ! resting EMG values fall below). | ||
+ | ! ceiling through data at successively higher levels until | ||
+ | ! all data values for the 5 second duration fall below the ceiling. | ||
+ | ! --------------------------------------------------------------- | ||
+ | |||
+ | Metric_Maximum | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | ==== Madonna EMG Remove Background Meta-Command ==== | ||
+ | |||
+ | The following Meta Command removes the background noise from the EMG signals and can be Cut-and-Paste into a file named **Madonna_EMG_Remove_Background.v3m** | ||
+ | |||
+ | < | ||
+ | ! BEGIN_META | ||
+ | ! META_CMD_NAME=Madonna EMG Remove Background | ||
+ | ! META_PARAM= SIGNAL_NAMES: | ||
+ | ! META_PARAM= SIGNAL_FOLDER: | ||
+ | ! META_PARAM= RESULT_FOLDER: | ||
+ | ! META_PARAM= BACKGROUND_FOLDER: | ||
+ | ! END_META | ||
+ | |||
+ | Set_Pipeline_Parameter | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | Set_Pipeline_Parameter | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ! --------------------------------------------------------------- | ||
+ | ! Remove the EMG background noise | ||
+ | ! --------------------------------------------------------------- | ||
+ | |||
+ | For_Each | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | Set_Data_To_New_Values | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | End_For_Each | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | ==== An example Visual3D Pipeline Command to call these Meta-Commands ==== | ||
+ | |||
+ | In this example, some files are TAGGED as REST, EMG, and GAIT. | ||
+ | |||
+ | < | ||
+ | !Make the Resting Trial the Active File. | ||
+ | |||
+ | For_Each | ||
+ | / | ||
+ | /ITEMS=REST | ||
+ | ; | ||
+ | |||
+ | Select_Active_File | ||
+ | / | ||
+ | !/QUERY= | ||
+ | ; | ||
+ | |||
+ | ! Calculates resting background by calling the EMG_Resting_Background Meta-Command. | ||
+ | EMG_Resting_Background | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | End_For_Each | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ! This loop will remove the resting background from the signals. | ||
+ | For_Each | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | Select_Active_File | ||
+ | / | ||
+ | !/QUERY= | ||
+ | ; | ||
+ | |||
+ | ! Call the EMG_Remove_Background Meta-Command | ||
+ | EMG_Remove_Background | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | End_For_Each | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | |||
visual3d/documentation/emg/processing_tools.1720027517.txt.gz · Last modified: 2024/07/03 17:25 by sgranger