mne.preprocessing.annotate_movement

mne.preprocessing.annotate_movement(raw, pos, rotation_velocity_limit=None, translation_velocity_limit=None, mean_distance_limit=None)[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.

posarray, shape (N, 10)

The position and quaternion parameters from cHPI fitting. Obtained with mne.chpi functions.

rotation_velocity_limitfloat

Head rotation velocity limit in radians per second.

translation_velocity_limitfloat

Head translation velocity limit in radians per second.

mean_distance_limitfloat

Head position limit from mean recording in meters.

Returns
annotmne.Annotations

Periods with head motion.

hpi_disparray

Head position over time with respect to the mean head pos.