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
EpochsorRaw.- Parameters:
- inst
Raw|Epochs Instance from which to extract global field power (GFP) peaks.
- picks
str|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 ininfo['bads']will be included if their names or indices are explicitly provided.- return_all
bool If True, the returned
ChDatainstance will include all channels. If False (default), the returnedChDatainstance will only include channels used for GFP computation (i.epicks).- min_peak_distance
int 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.- tmin
float Start time of the raw data to use in seconds (must be >= 0).
- tmax
float|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_annotation
bool Whether to omit bad segments from the data before fitting. If
True(default), annotated segments whose description begins with'bad'are omitted. IfFalse, no rejection based on annotations is performed.Has no effect if
instis not amne.io.Rawobject.- verbose
int|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.
- inst
- Returns:
- ch_data
ChData Samples at global field power peaks.
- ch_data
Notes
The Global Field Power (GFP) peaks are extracted with
scipy.signal.find_peaks(). Only thedistanceargument is filled with the value provided inmin_peak_distance. The other arguments are set to their default values.