visual3d:tutorials:emg:automatic_emg_events
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:tutorials:emg:automatic_emg_events [2024/06/19 12:54] – sgranger | visual3d:tutorials:emg:automatic_emg_events [2024/10/09 14:42] (current) – Fixed external links. wikisysop | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{{{{{{{\\ | + | ====== Automatic EMG Events ====== |
+ | \\ | ||
- | ===== overview ===== | ||
- | processing motion files with multiple emg signals can become tedious when manually extracting events and identifying points of “rest”. we can manually detect sections of minimal activity within a motion trial to set as a reference threshold. using the data download from [[visual3d: | + | ==== Overview ==== |
- | in this tutorial we will: | + | Processing motion files with multiple EMG signals can become tedious when manually extracting events and identifying points of “rest”. We can manually detect sections of minimal activity within a motion trial to set as a reference threshold. Using the data download from [[Visual3D:Tutorials: |
- | - load emg data into visual 3d | + | In this tutorial we will: |
- | - perform a series of signal filtering commands including: | + | |
- | - bandpass filter | + | |
- | - full-wave rectify | + | |
- | - moving root mean squared (rms) | + | |
- | - teager-kaiser energy operator (tkeo) | + | |
- | - automatically detect low muscle activity | + | |
- | - generate tkeo threshold to perform onset offset detection | + | |
- | - visualize the event detection and demonstrate the effects of changing the meta parameters | + | |
- | ===== preparing for the tutorial ===== | + | - Load EMG data into Visual 3D |
+ | - Perform a series of signal filtering commands including: | ||
+ | - Bandpass filter | ||
+ | - Full-wave rectify | ||
+ | - Moving Root Mean Squared (RMS) | ||
+ | - Teager-Kaiser Energy Operator (TKEO) | ||
+ | - Automatically detect low muscle activity | ||
+ | - Generate TKEO threshold to perform Onset Offset detection | ||
+ | - Visualize | ||
- | **tutorial data download**: files used in this tutorial can be found here: [[[https:// | + | ==== Preparing for the Tutorial ==== |
- | the following pipeline has been provided as a **meta_function**, and you may copy and paste it into your **visual3d x64 > plugins > meta-commands** folder. for more information on meta-commands and how they work, follow see [[visual3d:documentation: | + | **Tutorial data download**: Files used in this tutorial can be found here: [[https:// |
- | **meta-commands download**: meta-command file found here: [[[https:// | + | The following pipeline has been provided as a **meta_function**, |
- | ===== loading data and calling the meta-function ===== | + | **Meta-Commands download**: Meta-Command file found here: [[https:// |
- | open the **trial_1.c3d** file from the tutorial download into visual3d. | + | ==== Loading Data and Calling |
- | to begin the automatic detection, we first need to follow the typical processing procedure for emg signals, going through all signals individually. we will work through the pipeline of **automatic_emg_events**. you may look through | + | Open the **trial_1.c3d** file from the Tutorial download into Visual3D. |
- | to call the meta-command in the pipeline, use the following: | + | To begin the automatic detection, we first need to follow the typical processing procedure for EMG signals, going through all signals individually. We will work through the pipeline of **Automatic_EMG_Events**. You may look through the meta-command file along with this description, |
+ | |||
+ | To call the meta-command in the pipeline, use the following: | ||
< | < | ||
- | automatic_emg_events | + | Automatic_EMG_Events |
- | /signal_names=emg_a+emg_b+emg_c | + | /SIGNAL_NAMES=EMG_A+EMG_B+EMG_C |
- | /thresholdpercent=0.2 | + | /ThresholdPercent=0.2 |
; | ; | ||
</ | </ | ||
- | we can go through the meta-command pipeline itself to see what is being done. we begin by initializing the pipeline as a meta-command. | + | We can go through the meta-command pipeline itself to see what is being done. We begin by initializing the pipeline as a meta-command. |
< | < | ||
- | ! begin_meta | + | ! BEGIN_META |
- | ! meta_cmd_name=automatic_emg_events | + | ! META_CMD_NAME=Automatic_EMG_Events |
- | ! meta_param= signal_names: | + | ! META_PARAM= SIGNAL_NAMES: |
- | ! meta_param= thresholdpercent: | + | ! META_PARAM= ThresholdPercent: |
- | ! meta_highpass= | + | ! META_HIGHPASS= |
- | ! meta_lowpass= | + | ! META_LOWPASS= |
- | ! end_meta | + | ! END_META |
</ | </ | ||
- | ===== processing | + | ==== Processing |
- | this meta command can be used to process | + | This meta command can be used to process |
- | we initialize a for loop to go through all emg signals in the open file. | + | We initialize a for loop to go through all EMG signals in the open file. |
< | < | ||
- | for_each | + | For_Each |
- | /iteration_parameter_name= signal | + | /Iteration_Parameter_Name= SIGNAL |
- | /items= ::signal_names | + | /Items= ::SIGNAL_NAMES |
; | ; | ||
</ | </ | ||
- | now we will look at filtering only at emg data, if you wish to find grfs or **model_based_data**, | + | Now we will look at filtering only at EMG data, if you wish to find GRFs or **model_based_data**, |
- | in the **analog** folder, several sub-folders will be generated in this section of the pipeline, as we go through the different filtering methods. | + | In the **ANALOG** folder, several sub-folders will be generated in this section of the pipeline, as we go through the different filtering methods. |
- | the **processed** data folder is going to contain the data that has gone through a highpass and lowpass filter. | + | The **PROCESSED** data folder is going to contain the data that has gone through a highpass and lowpass filter. |
- | the **envelope** data folder will contain filtered data in order of highpass, rectify, lowpass - this will be used later to help us find a resting period of the signal, with the **thresholdpercent** parameter. | + | The **ENVELOPE** data folder will contain filtered data in order of highpass, rectify, lowpass - this will be used later to help us find a resting period of the signal, with the **ThresholdPercent** parameter. |
- | the **processed_rms** data folder will take the **processed** data and perform moving | + | The **PROCESSED_RMS** data folder will take the **PROCESSED** data and perform moving |
- | the **processed_tkeo** data folder will take the **processed** data and perform | + | The **PROCESSED_TKEO** data folder will take the **PROCESSED** data and perform |
< | < | ||
- | ! highpass | + | ! Highpass |
- | highpass_filter | + | Highpass_Filter |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_folder=original | + | /SIGNAL_FOLDER=ORIGINAL |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | /result_folder=processed | + | /RESULT_FOLDER=PROCESSED |
- | ! /result_suffix= | + | ! /RESULT_SUFFIX= |
- | ! /filter_class=butterworth | + | ! /FILTER_CLASS=BUTTERWORTH |
- | /frequency_cutoff=50 | + | /FREQUENCY_CUTOFF=50 |
- | /num_reflected=0 | + | /NUM_REFLECTED=0 |
- | ! /num_extrapolated=0 | + | ! /NUM_EXTRAPOLATED=0 |
- | /total_buffer_size=100 | + | /TOTAL_BUFFER_SIZE=100 |
- | ! /num_bidirectional_passes=1 | + | ! /NUM_BIDIRECTIONAL_PASSES=1 |
; | ; | ||
</ | </ | ||
< | < | ||
- | ! rectify | + | ! Rectify |
- | rectify | + | Rectify |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | /signal_folder=processed | + | /SIGNAL_FOLDER=PROCESSED |
- | ! /result_names= | + | ! /RESULT_NAMES= |
- | ! /result_types= | + | ! /RESULT_TYPES= |
- | /result_folder=rectify | + | /RESULT_FOLDER=RECTIFY |
- | ! /result_suffix= | + | ! /RESULT_SUFFIX= |
; | ; | ||
</ | </ | ||
< | < | ||
- | lowpass_filter | + | Lowpass_Filter |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_folder=rectify | + | /SIGNAL_FOLDER=RECTIFY |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | /result_folder=envelope | + | /RESULT_FOLDER=ENVELOPE |
- | ! /result_suffix= | + | ! /RESULT_SUFFIX= |
- | ! /filter_class=butterworth | + | ! /FILTER_CLASS=BUTTERWORTH |
- | /frequency_cutoff=10 | + | /FREQUENCY_CUTOFF=10 |
- | /num_reflected=0 | + | /NUM_REFLECTED=0 |
- | ! /num_extrapolated=0 | + | ! /NUM_EXTRAPOLATED=0 |
- | /total_buffer_size=100 | + | /TOTAL_BUFFER_SIZE=100 |
- | ! /num_bidirectional_passes=1 | + | ! /NUM_BIDIRECTIONAL_PASSES=1 |
; | ; | ||
</ | </ | ||
- | next, lowpass | + | Next, Lowpass |
< | < | ||
- | lowpass_filter | + | Lowpass_Filter |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_folder=processed | + | /SIGNAL_FOLDER=PROCESSED |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | /result_folder=processed | + | /RESULT_FOLDER=PROCESSED |
- | ! /result_suffix= | + | ! /RESULT_SUFFIX= |
- | ! /filter_class=butterworth | + | ! /FILTER_CLASS=BUTTERWORTH |
- | /frequency_cutoff=80 | + | /FREQUENCY_CUTOFF=80 |
- | /num_reflected=0 | + | /NUM_REFLECTED=0 |
- | ! /num_extrapolated=0 | + | ! /NUM_EXTRAPOLATED=0 |
- | /total_buffer_size=100 | + | /TOTAL_BUFFER_SIZE=100 |
- | ! /num_bidirectional_passes=1 | + | ! /NUM_BIDIRECTIONAL_PASSES=1 |
; | ; | ||
</ | </ | ||
< | < | ||
- | ! rms filtering: putting | + | ! RMS Filtering: Putting |
- | ! filtering process was used. using the processed | + | ! filtering process was used. Using the PROCESSED |
- | ! to perform | + | ! to perform |
- | moving_rms | + | Moving_RMS |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_folder=processed | + | /SIGNAL_FOLDER=PROCESSED |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | ! /result_types= | + | ! /RESULT_TYPES= |
- | /result_folders=processed_rms | + | /RESULT_FOLDERS=PROCESSED_RMS |
- | ! /result_name= | + | ! /RESULT_NAME= |
- | ! /apply_as_suffix_to_signal_name= | + | ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME= |
- | ! /num_window_frames=3 | + | ! /NUM_WINDOW_FRAMES=3 |
- | ! /if_even_frames_increment_1=false | + | ! /IF_EVEN_FRAMES_INCREMENT_1=FALSE |
; | ; | ||
</ | </ | ||
< | < | ||
- | ! tkeo filtering: putting | + | ! TKEO Filtering: Putting |
- | ! filtering process was used. using the processed | + | ! filtering process was used. Using the PROCESSED |
- | ! to perform | + | ! to perform |
- | teager_kaiser_energy | + | Teager_Kaiser_Energy |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_folder=processed | + | /SIGNAL_FOLDER=PROCESSED |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | !/signal_components= | + | !/SIGNAL_COMPONENTS= |
- | /result_folder=processed_tkeo | + | /RESULT_FOLDER=PROCESSED_TKEO |
- | ! /event_sequence= | + | ! /EVENT_SEQUENCE= |
- | ! /exclude_events= | + | ! /EXCLUDE_EVENTS= |
; | ; | ||
</ | </ | ||
- | ===== detecting low activity signal regions ===== | + | ==== Detecting Low Activity Signal Regions |
- | envelope.png | + | {{:ENVELOPE.png}} |
- | this section will essentially perform on/off detection of the **envelope** signal with an arbitrary baseline that we define with a user-given parameter. | + | This section will essentially perform on/off detection of the **ENVELOPE** signal with an arbitrary baseline that we define with a user-given parameter. |
- | event detection using analog | + | Event detection using Analog |
- | when we run this pipeline section, you can open your **envelope** analog signals and highlight the **ascent** and **descent** events that are associated with each signal. | + | When we run this pipeline section, you can open your **ENVELOPE** analog signals and highlight the **ASCENT** and **DESCENT** events that are associated with each signal. |
- | find maximum | + | Find Maximum |
< | < | ||
- | metric_maximum | + | Metric_Maximum |
- | /result_metric_folder=processed | + | /RESULT_METRIC_FOLDER=PROCESSED |
- | /result_metric_name=::signal&max | + | /RESULT_METRIC_NAME=::SIGNAL&MAX |
- | /apply_as_suffix_to_signal_name=false | + | /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE |
- | /signal_types= analog | + | /SIGNAL_TYPES= ANALOG |
- | /signal_folder=envelope | + | /SIGNAL_FOLDER=ENVELOPE |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | ! /component_sequence= | + | ! /COMPONENT_SEQUENCE= |
- | !/event_sequence= | + | !/EVENT_SEQUENCE= |
- | !/exclude_events= | + | !/EXCLUDE_EVENTS= |
- | ! /generate_mean_and_stddev=true | + | ! /GENERATE_MEAN_AND_STDDEV=TRUE |
- | ! /append_to_existing_values=false | + | ! /APPEND_TO_EXISTING_VALUES=FALSE |
- | ! /create_global_maximum=false | + | ! /CREATE_GLOBAL_MAXIMUM=FALSE |
- | ! /create_trial_maximum=false | + | ! /CREATE_TRIAL_MAXIMUM=FALSE |
; | ; | ||
</ | </ | ||
- | find events | + | Find Events |
< | < | ||
- | ! set threshold | + | ! Set threshold |
- | set_pipeline_parameter_from_expression | + | Set_Pipeline_Parameter_From_Expression |
- | /parameter_name= thresh | + | /PARAMETER_NAME= THRESH |
- | /expression=(metric::processed::&::signal&max)*&::thresholdpercent | + | /EXPRESSION=(METRIC::PROCESSED::&::SIGNAL&MAX)*&::ThresholdPercent |
- | /as_integer=false | + | /AS_INTEGER=FALSE |
; | ; | ||
- | ! find when signal " | + | ! Find when signal " |
- | metric_time_of_threshold_from_event | + | Metric_Time_Of_Threshold_From_Event |
- | /result_event_name=::signal&ascent | + | /RESULT_EVENT_NAME=::SIGNAL&ASCENT |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | /signal_folder=envelope | + | /SIGNAL_FOLDER=ENVELOPE |
- | /signal_components=x | + | /SIGNAL_COMPONENTS=X |
- | ! /frame_offset=0 | + | ! /FRAME_OFFSET=0 |
- | ! /time_offset= | + | ! /TIME_OFFSET= |
- | ! /event_sequence= | + | ! /EVENT_SEQUENCE= |
- | ! /exclude_events= | + | ! /EXCLUDE_EVENTS= |
- | !/event_sequence_instance=0 | + | !/EVENT_SEQUENCE_INSTANCE=0 |
- | ! /event_subsequence= | + | ! /EVENT_SUBSEQUENCE= |
- | ! /subsequence_exclude_events= | + | ! /SUBSEQUENCE_EXCLUDE_EVENTS= |
- | ! /event_subsequence_instance=0 | + | ! /EVENT_SUBSEQUENCE_INSTANCE=0 |
- | /event_instance=0 | + | /EVENT_INSTANCE=0 |
- | /select_x=true | + | /SELECT_X=TRUE |
- | ! /select_y= | + | ! /SELECT_Y= |
- | ! /select_z= | + | ! /SELECT_Z= |
- | ! /select_residual= | + | ! /SELECT_RESIDUAL= |
- | ! /start_at_event= | + | ! /START_AT_EVENT= |
- | ! /end_at_event= | + | ! /END_AT_EVENT= |
- | /threshold=::thresh | + | /THRESHOLD=::THRESH |
- | /on_ascent=true | + | /ON_ASCENT=TRUE |
- | !/on_descent= | + | !/ON_DESCENT= |
- | ! /frame_window=8 | + | ! /FRAME_WINDOW=8 |
- | ! /ensure_frames_before= | + | ! /ENSURE_FRAMES_BEFORE= |
- | ! /ensure_frames_after= | + | ! /ENSURE_FRAMES_AFTER= |
; | ; | ||
- | ! find when signal " | + | ! Find when signal " |
- | metric_time_of_threshold_from_event | + | Metric_Time_Of_Threshold_From_Event |
- | /result_event_name=::signal&descent | + | /RESULT_EVENT_NAME=::SIGNAL&DESCENT |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | /signal_folder=envelope | + | /SIGNAL_FOLDER=ENVELOPE |
- | /signal_components=x | + | /SIGNAL_COMPONENTS=X |
- | ! /frame_offset=0 | + | ! /FRAME_OFFSET=0 |
- | ! /time_offset= | + | ! /TIME_OFFSET= |
- | ! /event_sequence= | + | ! /EVENT_SEQUENCE= |
- | ! /exclude_events= | + | ! /EXCLUDE_EVENTS= |
- | !/event_sequence_instance=0 | + | !/EVENT_SEQUENCE_INSTANCE=0 |
- | ! /event_subsequence= | + | ! /EVENT_SUBSEQUENCE= |
- | ! /subsequence_exclude_events= | + | ! /SUBSEQUENCE_EXCLUDE_EVENTS= |
- | ! /event_subsequence_instance=0 | + | ! /EVENT_SUBSEQUENCE_INSTANCE=0 |
- | /event_instance=0 | + | /EVENT_INSTANCE=0 |
- | /select_x=true | + | /SELECT_X=TRUE |
- | ! /select_y= | + | ! /SELECT_Y= |
- | ! /select_z= | + | ! /SELECT_Z= |
- | ! /select_residual= | + | ! /SELECT_RESIDUAL= |
- | ! /start_at_event= | + | ! /START_AT_EVENT= |
- | ! /end_at_event= | + | ! /END_AT_EVENT= |
- | /threshold=::thresh | + | /THRESHOLD=::THRESH |
- | /on_ascent=false | + | /ON_ASCENT=FALSE |
- | /on_descent=true | + | /ON_DESCENT=TRUE |
- | ! /frame_window=8 | + | ! /FRAME_WINDOW=8 |
- | ! /ensure_frames_before= | + | ! /ENSURE_FRAMES_BEFORE= |
- | ! /ensure_frames_after= | + | ! /ENSURE_FRAMES_AFTER= |
; | ; | ||
</ | </ | ||
- | now define events at the times of " | + | Now define events at the times of " |
< | < | ||
- | event_explicit | + | Event_Explicit |
- | /event_name=::signal&ascent | + | /EVENT_NAME=::SIGNAL&ASCENT |
- | !/frame=1 | + | !/FRAME=1 |
- | /time=metric::processed::&::signal&ascent | + | /TIME=METRIC::PROCESSED::&::SIGNAL&ASCENT |
; | ; | ||
- | event_explicit | + | Event_Explicit |
- | /event_name=::signal&descent | + | /EVENT_NAME=::SIGNAL&DESCENT |
- | !/frame=150 | + | !/FRAME=150 |
- | /time=metric::processed::&::signal&descent | + | /TIME=METRIC::PROCESSED::&::SIGNAL&DESCENT |
; | ; | ||
</ | </ | ||
- | ===== onset/offset detection ===== | + | ==== Onset/Offset Detection |
- | now that we have **ascent** and **descent** events of our emg envelopes, we can consider low activity or “rest” periods to be between descent - ascent events. | + | Now that we have **ASCENT** and **DESCENT** events of our EMG envelopes, we can consider low activity or “rest” periods to be between descent - ascent events. |
- | here we compute the median and standard deviation of the **tkeo** envelope during defined " | + | Here we compute the median and standard deviation of the **TKEO** envelope during defined " |
< | < | ||
- | metric_median | + | Metric_Median |
- | /result_metric_name=_med | + | /RESULT_METRIC_NAME=_MED |
- | /apply_as_suffix_to_signal_name=true | + | /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE |
- | /result_metric_folder=emg_tkeo | + | /RESULT_METRIC_FOLDER=EMG_TKEO |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | /signal_folder=processed_tkeo | + | /SIGNAL_FOLDER=PROCESSED_TKEO |
- | ! /signal_components=all_components | + | ! /SIGNAL_COMPONENTS=ALL_COMPONENTS |
- | /event_sequence=::signal&descent+::signal&ascent | + | /EVENT_SEQUENCE=::SIGNAL&DESCENT+::SIGNAL&ASCENT |
- | /exclude_events= | + | /EXCLUDE_EVENTS= |
- | /generate_mean_and_stddev=true | + | /GENERATE_MEAN_AND_STDDEV=TRUE |
- | ! /append_to_existing_values=false | + | ! /APPEND_TO_EXISTING_VALUES=FALSE |
; | ; | ||
- | metric_stddev | + | Metric_StdDev |
- | /result_metric_name=_sd | + | /RESULT_METRIC_NAME=_SD |
- | /apply_as_suffix_to_signal_name=true | + | /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE |
- | /result_metric_folder=emg_tkeo | + | /RESULT_METRIC_FOLDER=EMG_TKEO |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | /signal_folder=processed_tkeo | + | /SIGNAL_FOLDER=PROCESSED_TKEO |
- | ! /signal_components=all_components | + | ! /SIGNAL_COMPONENTS=ALL_COMPONENTS |
- | /event_sequence=::signal&descent+::signal&ascent | + | /EVENT_SEQUENCE=::SIGNAL&DESCENT+::SIGNAL&ASCENT |
- | /exclude_events= | + | /EXCLUDE_EVENTS= |
- | /generate_mean_and_stddev=true | + | /GENERATE_MEAN_AND_STDDEV=TRUE |
- | ! /append_to_existing_values=false | + | ! /APPEND_TO_EXISTING_VALUES=FALSE |
; | ; | ||
</ | </ | ||
- | identify | + | Identify |
< | < | ||
!of the median + 3 * standard deviation | !of the median + 3 * standard deviation | ||
- | set_pipeline_parameter_from_expression | + | Set_Pipeline_Parameter_From_Expression |
- | /parameter_name= thresh2 | + | /PARAMETER_NAME= THRESH2 |
- | /expression=(metric::emg_tkeo::&::signal&_med_mean)+3*(metric::emg_tkeo::&::signal&_sd_mean) | + | /EXPRESSION=(METRIC::EMG_TKEO::&::SIGNAL&_MED_MEAN)+3*(METRIC::EMG_TKEO::&::SIGNAL&_SD_MEAN) |
- | /as_integer=false | + | /AS_INTEGER=FALSE |
; | ; | ||
- | ! create | + | ! Create |
- | create_target | + | Create_Target |
- | /signal_names=::signal&_threshold | + | /SIGNAL_NAMES=::SIGNAL&_Threshold |
- | ! /signal_description= | + | ! /SIGNAL_DESCRIPTION= |
- | /expression=vector(&::thresh2&, | + | /EXPRESSION=VECTOR(&::THRESH2&, |
- | ! /include_motionfile=true | + | ! /INCLUDE_MOTIONFILE=TRUE |
- | ! /include_calfile=false | + | ! /INCLUDE_CALFILE=FALSE |
; | ; | ||
</ | </ | ||
- | defining | + | Defining |
< | < | ||
- | metric_time_of_threshold_from_event | + | Metric_Time_Of_Threshold_From_Event |
- | /result_event_name=::signal&off | + | /RESULT_EVENT_NAME=::SIGNAL&OFF |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | /signal_folder=processed_tkeo | + | /SIGNAL_FOLDER=PROCESSED_TKEO |
- | /signal_components=x | + | /SIGNAL_COMPONENTS=X |
- | ! /frame_offset=0 | + | ! /FRAME_OFFSET=0 |
- | ! /time_offset= | + | ! /TIME_OFFSET= |
- | ! /event_sequence= | + | ! /EVENT_SEQUENCE= |
- | ! /exclude_events= | + | ! /EXCLUDE_EVENTS= |
- | !/event_sequence_instance=0 | + | !/EVENT_SEQUENCE_INSTANCE=0 |
- | ! /event_subsequence= | + | ! /EVENT_SUBSEQUENCE= |
- | ! /subsequence_exclude_events= | + | ! /SUBSEQUENCE_EXCLUDE_EVENTS= |
- | ! /event_subsequence_instance=0 | + | ! /EVENT_SUBSEQUENCE_INSTANCE=0 |
- | /event_instance=0 | + | /EVENT_INSTANCE=0 |
- | /select_x=true | + | /SELECT_X=TRUE |
- | ! /select_y= | + | ! /SELECT_Y= |
- | ! /select_z= | + | ! /SELECT_Z= |
- | ! /select_residual= | + | ! /SELECT_RESIDUAL= |
- | ! /start_at_event= | + | ! /START_AT_EVENT= |
- | ! /end_at_event= | + | ! /END_AT_EVENT= |
- | /threshold=::thresh2 | + | /THRESHOLD=::THRESH2 |
- | /on_ascent=false | + | /ON_ASCENT=FALSE |
- | /on_descent=true | + | /ON_DESCENT=TRUE |
- | ! /frame_window=8 | + | ! /FRAME_WINDOW=8 |
- | ! /ensure_frames_before= | + | ! /ENSURE_FRAMES_BEFORE= |
- | ! /ensure_frames_after= | + | ! /ENSURE_FRAMES_AFTER= |
; | ; | ||
</ | </ | ||
- | creating | + | Creating |
< | < | ||
- | event_explicit | + | Event_Explicit |
- | /event_name=::signal&off | + | /EVENT_NAME=::SIGNAL&OFF |
- | !/frame=1 | + | !/FRAME=1 |
- | /time=metric::processed::&::signal&off | + | /TIME=METRIC::PROCESSED::&::SIGNAL&OFF |
; | ; | ||
</ | </ | ||
- | defining | + | Defining |
< | < | ||
- | metric_time_of_threshold_from_event | + | Metric_Time_Of_Threshold_From_Event |
- | /result_event_name=::signal&on | + | /RESULT_EVENT_NAME=::SIGNAL&ON |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=::signal | + | /SIGNAL_NAMES=::SIGNAL |
- | /signal_folder=processed_tkeo | + | /SIGNAL_FOLDER=PROCESSED_TKEO |
- | /signal_components=x | + | /SIGNAL_COMPONENTS=X |
- | ! /frame_offset=0 | + | ! /FRAME_OFFSET=0 |
- | ! /time_offset= | + | ! /TIME_OFFSET= |
- | ! /event_sequence= | + | ! /EVENT_SEQUENCE= |
- | ! /exclude_events= | + | ! /EXCLUDE_EVENTS= |
- | !/event_sequence_instance=0 | + | !/EVENT_SEQUENCE_INSTANCE=0 |
- | ! /event_subsequence= | + | ! /EVENT_SUBSEQUENCE= |
- | ! /subsequence_exclude_events= | + | ! /SUBSEQUENCE_EXCLUDE_EVENTS= |
- | ! /event_subsequence_instance=0 | + | ! /EVENT_SUBSEQUENCE_INSTANCE=0 |
- | /event_instance=0 | + | /EVENT_INSTANCE=0 |
- | /select_x=true | + | /SELECT_X=TRUE |
- | ! /select_y= | + | ! /SELECT_Y= |
- | ! /select_z= | + | ! /SELECT_Z= |
- | ! /select_residual= | + | ! /SELECT_RESIDUAL= |
- | ! /start_at_event= | + | ! /START_AT_EVENT= |
- | ! /end_at_event= | + | ! /END_AT_EVENT= |
- | /threshold=::thresh2 | + | /THRESHOLD=::THRESH2 |
- | /on_ascent=true | + | /ON_ASCENT=TRUE |
- | /on_descent=false | + | /ON_DESCENT=FALSE |
- | ! /frame_window=8 | + | ! /FRAME_WINDOW=8 |
- | ! /ensure_frames_before= | + | ! /ENSURE_FRAMES_BEFORE= |
- | ! /ensure_frames_after= | + | ! /ENSURE_FRAMES_AFTER= |
; | ; | ||
</ | </ | ||
- | creating | + | Creating |
< | < | ||
- | event_explicit | + | Event_Explicit |
- | /event_name=::signal&on | + | /EVENT_NAME=::SIGNAL&ON |
- | !/frame=1 | + | !/FRAME=1 |
- | /time=metric::processed::&::signal&on | + | /TIME=METRIC::PROCESSED::&::SIGNAL&ON |
; | ; | ||
</ | </ | ||
- | ===== visualizing event detection ===== | + | ==== Visualizing Event Detection |
- | there we go! we have automatically found onset and offset for all signals, and can look at these events in our data. before | + | There we go! We have automatically found onset and offset for all signals, and can look at these events in our data. Before |
< | < | ||
- | end_for_each | + | End_For_Each |
- | /iteration_parameter_name=signal | + | /Iteration_Parameter_Name=SIGNAL |
; | ; | ||
</ | </ | ||
- | tkeo_new.png | + | {{:TKEO_NEW.png}} |
+ | |||
+ | {{: | ||
- | zoomed.png | + | We can now take a look at our onset and offset detection. |
- | we can now take a look at our onset and offset detection. | + | Select |
- | select a **tkeo** processed signal from the **analog > processed_tkeo** folder | + | Under **EVENT_LABEL > ORIGINAL**, select |
- | under **event_label > original**, select | + | You can see on the signal there are faint pink lines all across the signal, that do not all get highlighted when the events |
- | you can see on the signal | + | We can see from these figures that there are a lot of **ON** and **OFF** detections for the **TKEO** |
- | we can see from these figures that there are a lot of **on** and **off** detections for the **tkeo** signal. this is due to a lot of fluctuation and noise in the signal, and the threshold is passed through many times where there is large muscle activity. | + | If you find the automatic detection is identify data fluctuation that is too low in amplitude for your liking, |
- | if you find the automatic detection is identify data fluctuation that is too low in amplitude for your liking, we can adjust the **thresholdpercent** parameter to change this. for example, this meta-command was re-run on this data using **thresholdpercent | + | ==== References ==== |
- | ===== references ===== | + | 1. [[https:// |
- | 1. [[https://www.sciencedirect.com/science/article/abs/ | + | 2. [[https://ieeexplore.ieee.org/abstract/document/7096455|José A. Biurrun Manresa, Carsten D. Mørch, and Ole K. Andersen, Teager-Kaiser Energy Operator Improves the Detection |
- | 2. [[https:// | + | 3. Solnik S, DeVita P, Rider P, Long B, and Hortobágyi T (2008) Teager–Kaiser Operator |
- | 3. [solnik s, devita p, rider p, long b, and hortobágyi t (2008) teager–kaiser operator improves the accuracy of emg onset detection independent of signal-to-noise ratio, acta bioeng biomech. 2008 ; 10(2): 65–68] | ||
- | }}}}}}}} |
visual3d/tutorials/emg/automatic_emg_events.1718801657.txt.gz · Last modified: 2024/06/19 12:54 by sgranger