User Tools

Site Tools


visual3d:documentation:emg:processing:normalize_emg_to_generic_global_variable

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:emg:processing:normalize_emg_to_generic_global_variable [2024/06/19 12:47] sgrangervisual3d:documentation:emg:processing:normalize_emg_to_generic_global_variable [2024/07/17 15:45] (current) – created sgranger
Line 1: Line 1:
 +====== Normalize EMG to Generic Global Variable ======
 +
 \\ \\
-**normalizing emg signal to generic global value**\\ +**Normalizing EMG signal to generic GLOBAL Value**\\ 
-typically the scaling factors for emg signals are the result of other data trials (such as mvic trials). individual files in visual3d cannot access the data from other files, so the only way signals can be shared is through the global workspace.\\+Typically the Scaling factors for EMG signals are the result of other data trials (such as MVIC trials). Individual files in Visual3D cannot access the data from other files, so the only way signals can be shared is through the Global Workspace.\\
 \\ \\
-**this tutorial assumes that a global metric has already been created and that metric is used to normalize the emg signals.**\\+**This tutorial assumes that a global metric has already been created and that metric is used to normalize the EMG signals.**\\
  
  
-====== sample files ======+===== Sample Files =====
  
-[[https://www.has-motion.com/download/examples/emg/generic_global_metric.zip|you can download the sample files here.]]+[[https://www.has-motion.com/download/examples/EMG/Generic_Global_Metric.zip|You can download the sample files here.]]
  
-the download contains:+The download contains:
  
-  * emg_norm_global_variable_example.cmz with - +  * EMG_Norm_Global_Variable_Example.cmz with - 
-    * 3 mvc trial +    * 3 MVC trial 
-    * 2 dynamic trials +    * 2 Dynamic Trials 
-  * emg_norm_global_variable.v3s (example pipeline script+  * EMG_Norm_Global_Variable.v3s (Example Pipeline Script
-  * emg_norm_global_variable.v3m (example meta-command+  * EMG_Norm_Global_Variable.v3m (Example Meta-Command
-  * call_emg_norm_global_variable_meta.v3s (example pipeline script calling meta-command)+  * Call_EMG_Norm_Global_Variable_Meta.v3s (Example Pipeline Script calling Meta-Command)
  
-typically emg signals are normalized after they have been processed (ex. linear envelope). in this example, the original signal is normalized. in reality, you should reference the folder which contains your processed emg signal (ex. if you calculated a linear envelope, and the resulting emg signal is stored in a folder called lowpass, change original in the script to lowpass).+Typically EMG signals are normalized after they have been processed (ex. linear envelope). In this example, the original signal is normalized. In reality, you should reference the folder which contains your processed EMG signal (ex. if you calculated a linear envelope, and the resulting EMG signal is stored in a folder called LOWPASS, change ORIGINAL in the script to LOWPASS).
  
-===== example pipeline script =====+==== Example Pipeline Script ====
  
 \\ \\
-assumes there is a previously created global metric called metric::mvc_max::emg_a_max.+Assumes there is a previously created GLOBAL metric called METRIC::MVC_MAX::EMG_A_MAX.
  
 <code> <code>
 ! -------------------------------------------------------------  ! ------------------------------------------------------------- 
-!   normalize+!   Normalize
 ! ------------------------------------------------------------- ! -------------------------------------------------------------
  
-select all files as active+Select All Files as Active
  
-select_active_file +Select_Active_File 
-/file_name=all_files+/File_Name=ALL_FILES
 ; ;
  
-for each emg signal, divide by it's maximum value+For each EMG signal, divide by it's maximum value
  
-for_each +For_Each 
-/iteration_parameter_name=current_signal +/Iteration_Parameter_Name=CURRENT_SIGNAL 
-/items=emg_a+emg_b+emg_c+/Items=EMG_A+EMG_B+EMG_C
 ; ;
  
- ! divide the emg signal by it's maximum value, which was stored in the global workspace + ! Divide the EMG signal by it's maximum value, which was stored in the GLOBAL workspace 
  
- evaluate_expression + Evaluate_Expression 
- /expressionanalog::original::&::current_signal& / global::metric::mvc_max::&::current_signal&_max + /EXPRESSIONANALOG::ORIGINAL::&::CURRENT_SIGNAL& / GLOBAL::METRIC::MVC_MAX::&::CURRENT_SIGNAL&_MAX 
- ! /signal_types+ ! /SIGNAL_TYPES
- ! /signal_folder=original + ! /SIGNAL_FOLDER=ORIGINAL 
- ! /signal_names+ ! /SIGNAL_NAMES
- /result_types=analog + /RESULT_TYPES=ANALOG 
- /result_folders=normalized + /RESULT_FOLDERS=NORMALIZED 
- /result_name=::current_signal + /RESULT_NAME=::CURRENT_SIGNAL 
- ! /apply_as_suffix_to_signal_name=false+ ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
  ;  ;
  
-end_for_each +End_For_Each 
-/iteration_parameter_namecurrent_signal+/Iteration_Parameter_NameCURRENT_SIGNAL
 ; ;
 </code> </code>
  
-===== calling example meta-command =====+==== Calling Example Meta-Command ====
  
-once the example meta-command from the download is placed in your [[visual3d:documentation:pipeline:meta_commands:meta_commands_overview|meta-command folder]], you can call the command using the following syntax:+Once the example Meta-Command from the download is placed in your [[Visual3D:Documentation:Pipeline:Meta_Commands:Meta_Commands_Overview|Meta-Command folder]], you can call the command using the following syntax:
  
 <code> <code>
-emg_norm_global_variable +EMG_Norm_Global_Variable 
-/emg_input_folder=original +/EMG_INPUT_FOLDER=ORIGINAL 
-/emg_output_folder=normalized +/EMG_OUTPUT_FOLDER=NORMALIZED 
-/emg_signal_list=emg_a+emg_b+emg_c +/EMG_SIGNAL_LIST=EMG_A+EMG_B+EMG_C 
-/global_metric_folder=mvc_max +/GLOBAL_METRIC_FOLDER=MVC_MAX 
-/global_metric_suffix=_max+/GLOBAL_METRIC_SUFFIX=_MAX
 ; ;
 </code> </code>
  
-  * **emg_input_folder** should be the emg signals you want to normalized +  * **EMG_INPUT_FOLDER** should be the EMG signals you want to normalized 
-  * **emg_output_folder** should be the resulting emg folder for the normalized signals +  * **EMG_OUTPUT_FOLDER** should be the resulting EMG folder for the normalized signals 
-  * **emg_signal_list** the list of emg signals to normalize +  * **EMG_SIGNAL_LIST** the list of EMG signals to normalize 
-  * **global_metric_folder** should be the name of the folder with the value to normalize to +  * **GLOBAL_METRIC_FOLDER** should be the name of the folder with the value to normalize to 
-  * **global_metric_suffix** should be the suffix for the name of the normalized value (ex. emg_a_max_max is the suffix). this can also be left blank.+  * **GLOBAL_METRIC_SUFFIX** should be the suffix for the name of the normalized value (ex. EMG_A_Max_Max is the suffix). This can also be left blank.
  
  
  
visual3d/documentation/emg/processing/normalize_emg_to_generic_global_variable.1718801264.txt.gz · Last modified: 2024/06/19 12:47 by sgranger