Muscle Artifact
Muscle artifacts generally affect a small portion of the data and can often be excluded. However, due to their large amplitude and broad frequency range, detecting and removing them remains a challenge.
The most common approach for detecting muscle artifacts in MEG data involves annotation during pre-processing. This is accomplished using the annotate_muscle_zscore
command from the MNE library. This method works as follows:
Frequency Range: Z-scores are calculated for each magnetometer sensor within the typical frequency range of muscle artifacts (110–140 Hz).
Aggregation: These z-scores are aggregated and normalized by dividing by the square root of the number of sensors.
Thresholding: If the resulting score exceeds a threshold of 15 at any point in the data, that segment is annotated as a muscle artifact.
The parameters for muscle artifact detection in MEGAP are customizable and located in the pipeline_config.cfg
file under the "annotate_muscle"
section:
"annotate_muscle": {
"ch_type": "mag",
"threshold": 15,
"min_length_good": 1,
"filter_freq": [110, 140]
}

Muscle Duration Warning
The annotation period for muscle artifacts is evaluated to ensure that the duration of the affected segments does not exceed a specified percentage of the total data. This threshold is defined in the "warning" section of the pipeline configuration file.
If the annotated period surpasses this predefined percentage, a warning message is generated. This warning is recorded in a text file located in the /warning folder, alerting the user about the significant presence of muscle artifacts in the data.
Last updated