# mne.preprocessing.annotate_flat¶

mne.preprocessing.annotate_flat(raw, bad_percent=5.0, min_duration=0.005, picks=None, verbose=None)[source]

Annotate flat segments of raw data (or add to a bad channel list).

Parameters
rawinstance of Raw

The raw data.

bad_percentfloat

The percentage of the time a channel can be bad. Below this percentage, temporal bad marking (Annotations) will be used. Above this percentage, spatial bad marking (info['bads']) will be used. Defaults to 5 (5%).

min_durationfloat

The minimum duration (sec) to consider as actually flat. For some systems with low bit data representations, adjacent time samples with exactly the same value are not totally uncommon. Defaults to 0.005 (5 ms).

picks

Channels to include. Slices and lists of integers will be interpreted as channel indices. In lists, channel type strings (e.g., ['meg', 'eeg']) will pick channels of those types, channel name strings (e.g., ['MEG0111', 'MEG2623'] will pick the given channels. Can also be the string values “all” to pick all channels, or “data” to pick data channels. None (default) will pick good data channels.

verbose

If not None, override default verbose level (see mne.verbose() and Logging documentation for more). If used, it should be passed as a keyword-argument only.

Returns
annotinstance of Annotations

badslist