pycrostates.preprocessing.extract_gfp_peaks#

pycrostates.preprocessing.extract_gfp_peaks(inst, picks='eeg', return_all=False, min_peak_distance=1, tmin=None, tmax=None, reject_by_annotation=True, verbose=None)[source]#

Global Field Power (GFP) peaks extraction.

Extract Global Field Power (GFP) peaks from Epochs or Raw.

Parameters:
instRaw | Epochs

Instance from which to extract global field power (GFP) peaks.

picksstr | list | slice | None

Channels to use for GFP computation. Note that all channels selected must have the same type. Slices and lists of integers will be interpreted as channel indices. In lists, channel name strings (e.g. ['Fp1', 'Fp2']) will pick the given channels. Can also be the string values “all” to pick all channels, or “data” to pick data channels. "eeg" (default) will pick all eeg channels. Note that channels in info['bads'] will be included if their names or indices are explicitly provided.

return_allbool

If True, the returned ChData instance will include all channels. If False (default), the returned ChData instance will only include channels used for GFP computation (i.e picks).

min_peak_distanceint

Required minimal horizontal distance ( 1`) in samples between neighboring peaks. Smaller peaks are removed first until the condition is fulfilled for all remaining peaks. Default to ``1.

tminfloat

Start time of the raw data to use in seconds (must be >= 0).

tmaxfloat | None

End time of the raw data to use in seconds (cannot exceed data duration). If None (default), the current end of the data is used.

reject_by_annotationbool

Whether to omit bad segments from the data before fitting. If True (default), annotated segments whose description begins with 'bad' are omitted. If False, no rejection based on annotations is performed.

Has no effect if inst is not a mne.io.Raw object.

verboseint | str | bool | None

Sets the verbosity level. The verbosity increases gradually between "CRITICAL", "ERROR", "WARNING", "INFO" and "DEBUG". If None is provided, the verbosity is set to "WARNING". If a bool is provided, the verbosity is set to "WARNING" for False and to "INFO" for True.

Returns:
ch_dataChData

Samples at global field power peaks.

Notes

The Global Field Power (GFP) peaks are extracted with scipy.signal.find_peaks(). Only the distance argument is filled with the value provided in min_peak_distance. The other arguments are set to their default values.

Examples using pycrostates.preprocessing.extract_gfp_peaks#

Group-level analysis from individual clusters

Group-level analysis from individual clusters

Group level analysis from individual GFP peaks

Group level analysis from individual GFP peaks

Evaluating clustering fits

Evaluating clustering fits

Global Field Power peaks

Global Field Power peaks