calculate_wavelets

calculate_wavelets(sfreq: float, f_high: float, f_low: float, n_samples: int, k0: int = 6)[source][source]

Calculate Morlet wavelets for a range of frequencies.

Parameters:
  • sfreq (float) – The sampling frequency.

  • f_high (float) – The highest frequency to compute the scaleogram for.

  • f_low (float) – The lowest frequency to compute the scaleogram for.

  • n_samples (int) – The number of samples.

  • k0 (int) – The wavelet parameter. Indicates the center frequency of the wavelet.

Returns:

  • daughter (ndarray) – The wavelets.

  • period (ndarray) – The periods.

Examples

>>> daughter, period = calculate_wavelets(1000, 100, 2, 1000)
>>> daughter.shape
(29, 1001)
>>> period.shape
(29,)