spectra

spectra(x: ndarray, dpss: ndarray, sfreq: float, n_fft: int = None) tuple[ndarray, ndarray][source][source]

Compute significant tapered spectra.

Parameters:
  • x (array, shape=(..., n_times)) – Input signal

  • dpss (array, shape=(n_tapers, n_times)) – The tapers

  • sfreq (float) – The sampling frequency

  • n_fft (int | None) – Length of the FFT. If None, the number of samples in the input signal will be used.

Returns:

  • x_mt (array, shape=(..., n_tapers, n_times)) – The tapered spectra

  • freqs (array) – The frequency points in Hz of the spectra

Return type:

tuple[ndarray, ndarray]