spectral_connectivity.transforms.dpss_windows#

dpss_windows(n_time_samples_per_window, time_halfbandwidth_product, n_tapers, is_low_bias=True, interp_from=None, interp_kind='linear')[source]#

Compute Discrete Prolate Spheroidal Sequences.

Will give of orders [0, n_tapers-1] for a given frequency-spacing multiple NW and sequence length n_time_samples_per_window.

Copied from NiTime and MNE-Python

Parameters:
  • n_time_samples_per_window (int) – Sequence length

  • time_halfbandwidth_product (float, unitless) – Standardized half bandwidth corresponding to 2 * half_bw = BW * f0 = BW * n_time_samples_per_window / dt but with dt taken as 1

  • n_tapers (int) – Number of DPSS windows to return

  • is_low_bias (bool) – Keep only tapers with eigenvalues > 0.9

  • interp_from (int (optional)) – The tapers can be calculated using interpolation from a set of tapers with the same NW and n_tapers, but shorter n_time_samples_per_window. This is the length of the shorter set of tapers.

  • interp_kind (str (optional)) – This ixput variable is passed to scipy.interpolate.interp1d and specifies the kind of interpolation as a string (‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic, ‘cubic’) or as an integer specifying the order of the spline interpolator to use.

Returns:

tapers, eigenvalues – tapers is an array, shape (n_tapers, n_time_samples_per_window)

Return type:

tuple

Notes

Tridiagonal form of DPSS calculation from: Slepian, D. Prolate spheroidal wave functions, Fourier analysis, and uncertainty V: The discrete case. Bell System Technical Journal, Volume 57 (1978), 1371430