mne.preprocessing.annotate_movement¶
- mne.preprocessing.annotate_movement(raw, pos, rotation_velocity_limit=None, translation_velocity_limit=None, mean_distance_limit=None, use_dev_head_trans='average')[source]¶
Detect segments with movement.
Detects segments periods further from rotation_velocity_limit, translation_velocity_limit and mean_distance_limit. It returns an annotation with the bad segments.
- Parameters
- rawinstance of
Raw
Data to compute head position.
- pos
array
, shape (N, 10) The position and quaternion parameters from cHPI fitting. Obtained with
mne.chpi
functions.- rotation_velocity_limit
float
Head rotation velocity limit in radians per second.
- translation_velocity_limit
float
Head translation velocity limit in radians per second.
- mean_distance_limit
float
Head position limit from mean recording in meters.
- use_dev_head_trans‘average’ (default) | ‘info’
Identify the device to head transform used to define the fixed HPI locations for computing moving distances. If
average
the average device to head transform is computed usingcompute_average_dev_head_t
. Ifinfo
,raw.info['dev_head_t']
is used.
- rawinstance of
- Returns
- annot
mne.Annotations
Periods with head motion.
- hpi_disp
array
Head position over time with respect to the mean head pos.
- annot
See also