philistine.mne.attenuation_iaf

philistine.mne.attenuation_iaf(raws, picks=None, fmin=None, fmax=None, resolution=0.25, average=True, ax=None, savgol=False, window_length=11, polyorder=5, flat_max_r=0.98)[source]

Estimate individual alpha frequency (IAF).

Parameters:
  • raws (list-like of Raw) – Two Raws to calculate IAF from difference (attenuation) in PSD from.
  • 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.
  • savgol (False | 'each' | 'diff') – Use Savitzky-Golay filtering to smooth PSD estimates – either applied to either each PSD estimate or to the difference (i.e. the attenuation estimate).
  • 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.
  • flat_max_r (float) – Maximum (Pearson) correlation allowed when comparing the raw PSD distributions to each other in 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. Note that the sign of the coefficient is ignored.
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 IAFEstimate

Notes

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