Given the spectrum of a time series vector this function will return its Empirical Wavelet Transformed spectrum.

get_ewt_spectrum(
  spectrum,
  npeaks = 3,
  fraction_min_peak_height = 0.1,
  min_peak_distance = 1,
  sampling_rate = 100
)

Arguments

spectrum

FFT spectrum as a two dimensional data frame with columns names as freq and pdf respectively n.freq x 2.

npeaks

Number of peaks to be captured.

fraction_min_peak_height

Minimum height (relative to maximum peak height) a peak has to have. Specified as fraction between 0 and 1.

min_peak_distance

The minimum distance (in indices) peaks. have to have to be counted.

sampling_rate

Sampling rate of the signal (by default it is 100 Hz).

Value

Emprical wavelet transformed spectrum of dimension n.freq x (npeaks + 1).