Create annotations for segments that likely contain muscle artifacts.
Detects data segments containing activity in the frequency range given by
filter_freq whose envelope magnitude exceeds the specified z-score
threshold, when summed across channels and divided by sqrt(n_channels).
False-positive transient peaks are prevented by low-pass filtering the
resulting z-score time series at 4 Hz. Only operates on a single channel
type, if ch_type is None it will select the first type in the list
mag, grad, eeg.
See [1] for background on choosing
filter_freq and threshold.
RawData to estimate segments with muscle artifacts.
floatThe threshold in z-scores for marking segments as containing muscle activity artifacts.
NoneThe type of sensors to use. If None it will take the first type in
mag, grad, eeg.
float | NoneThe shortest allowed duration of “good data” (in seconds) between
adjacent annotations; shorter segments will be incorporated into the
surrounding annotations.``None`` is equivalent to 0.
Default is 0.1.
The lower and upper frequencies of the band-pass filter.
Default is (110, 140).
int | NoneThe number of jobs to run in parallel. If -1, it is set
to the number of CPU cores. Requires the joblib package.
None (default) is a marker for ‘unset’ that will be interpreted
as n_jobs=1 (sequential execution) unless the call is performed under
a joblib.parallel_backend() context manager that sets another
value for n_jobs.
str | int | NoneControl verbosity of the logging output. If None, use the default
verbosity level. See the logging documentation and
mne.verbose() for details. Should only be passed as a keyword
argument.
mne.AnnotationsPeriods with muscle artifacts annotated as BAD_muscle.
arrayZ-score values averaged across channels for each sample.
References
mne.preprocessing.annotate_muscle_zscore#