philistine.mne.savgol_iaf¶
-
philistine.mne.
savgol_iaf
(raw, picks=None, fmin=None, fmax=None, resolution=0.25, average=True, ax=None, window_length=11, polyorder=5, pink_max_r2=0.9)[source]¶ Estimate individual alpha frequency (IAF).
Parameters: - raw (instance of Raw) – The raw data to do these estimations on.
- picks (array-like of int | None) – List of channels to use.
- fmin (int | None) – Lower bound of alpha frequency band. If None, it will be empirically estimated using a polynomial fitting method to determine the edges of the central parabolic peak density, with assumed center of 10 Hz.
- fmax (int | None) – Upper bound of alpha frequency band. If None, it will be empirically estimated using a polynomial fitting method to determine the edges of the central parabolic peak density, with assumed center of 10 Hz.
- resolution (float) – The resolution in the frequency domain for calculating the PSD.
- average (bool) – Whether to average the PSD estimates across channels or provide a separate estimate for each channel. Currently, only True is supported.
- ax (instance of matplotlib Axes | None | False) – Axes to plot PSD analysis into. If None, axes will be created (and plot not shown by default). If False, no plotting will be done.
- window_length (int) – Window length in samples to use for Savitzky-Golay smoothing of PSD when estimating IAF.
- polyorder (int) – Polynomial order to use for Savitzky-Golay smoothing of PSD when estimating IAF.
- pink_max_r2 (float) – Maximum R^2 allowed when comparing the PSD distribution to the pink noise 1/f distribution on the range 1 to 30 Hz. If this threshold is exceeded, then IAF is assumed unclear and None is returned for both PAF and CoG.
Returns: IafEst – Named tuple with fields for the peak alpha frequency (PAF), alpha center of gravity (CoG), and the bounds of the alpha band (as a tuple).
Return type: instance of
collections.namedtuple
called IAFEstimateNotes
Based on method developed by Andrew Corcoran. In addition to appropriate software citation (Zenodo DOI or git commit), please cite:
Corcoran, A. W., Alday, P. M., Schlesewsky, M., & Bornkessel-Schlesewsky, I. (2018). Toward a reliable, automated method of individual alpha frequency (IAF) quantification. Psychophysiology, e13064. doi:10.1111/psyp.13064