filter.lomb: Filter and reconstruction of data analysed via spec.lomb

Description Usage Arguments Details Value

View source: R/filterLomb.R

Description

Given an object of class lomb, this function allows the reconstruction of the input signal using (a) a frequency selection of single or multiple frequency (ranges), and/or (b) the most significant peaks in the periodogram.

Usage

1
2
3
4
5
6
7
filter.lomb(
  l = stop("No Lomb-Data"),
  newx = NULL,
  threshold = 6,
  filt = NULL,
  phase = "nextnb"
)

Arguments

l

lomb object

newx

vector of new values at which the restored function is to be evaluated

threshold

statistical threshold in terms of a standard deaviation of the amplidudes. It determines which frequencies are used. Lower values give more frequencies.

filt

vector or matix of frequencies (ranges) in which to select the frequencies

phase

set the method to determine the phase at a given frequency

Details

To properly reconstruct the signal out of the calculated lomb-object, three different methods are available, which are controlled by the filt-argument.

  1. If filt=NULL, the most significant values in the (dense) spectrum are used.

  2. If filt=c(f1, .., fn), the given frequencies are used. The corresponding phase is approximated.

  3. If class(filt)=="matrix", each row of the 2 x n matrix defines a frequency range. With in each range the "significant" frequencies are selected for reconstruction.

Prior to the reconstruction the filter.lomb-function calculates the most significant amplitudes and corresponding phases. As a measure to select the "correct" frequencies, the threshold argument can be adjusted. The corresponding phases of the underlying sine/cosine-waves are estimated by one of the four following methods.

  1. phase=="nextnb"... use the phase of the bin of nearest neighbour.

  2. phase=="lin"... linear interpolation between the two closest bins.

  3. phase=="lockin"... principle of lock-in amplification, also known as quadrature-demodulation technique.

  4. phase=="fit"... non-linear least squares fit with stats::nls

Value

This function returns a list which contains the reconstruction according to the lomb-object and newx for the given data x and y. The returned object contains the following:

x,y

reconstructed signal

f,A,phi

used parameters from the lomb-object

p

corresponding significance values


spectral documentation built on March 29, 2021, 5:10 p.m.