Constructor function for class 'swdft_demod'
new_swdft_demod(x, f0, A_t, Phi_t, fitted, y, y_smooth, smooth, order,
passfreq)
numeric vector
numeric scalar. Frequency to demodulate
extracted amplitude from y_smooth
extracted phase from y_smooth
fitted values
non-smoothed demodulated signal
smoothed demodulated signal
character. Type of smoothing to use, accepts either 'ma', 'double_ma', or 'butterworth' (the default)
moving average parameter if 'smooth' argument equals 'ma' or 'double_ma'. Defaults to 5
numeric frequency used as the passfreq in the low-pass filter
list with the following elements
coefficients. A matrix of parameters, the three columns are: 1. amplitude 2. phase, and 3. frequency. There is only more that one row used when multiple frequencies are fit sequentially.
fitted. fitted values of cosine regression model
residuals. residuals of cosine regression model
data. original signal used to fit cosine regression
list with the filter used ('smooth') and parameters ('order' for 'ma' or 'double_ma', 'passfreq' for butterworth)
list w/ the demodulated signal, and smoothed demodulated signal