Smooth, de-trend, and binarise the measurement

binMeas(
  obj,
  smoothK = 3L,
  biasK = 51L,
  peakThr = 0.2,
  polyDeg = 1L,
  biasMet = c("runmed", "lm", "none"),
  binThr = 0.5
)

# S3 method for arcosTS
binMeas(
  obj,
  smoothK = 3L,
  biasK = 51L,
  peakThr = 0.2,
  polyDeg = 1L,
  biasMet = c("runmed", "lm", "none"),
  binThr = 0.5
)

Arguments

obj

an arcosTS object.

smoothK

an integer, length of the short-term median filter, i.e. smoothing, default 3L.

biasK

an integer, length of the long-term median filter, i.e. de-trending, default 51L.

peakThr

a double, threshold for peak detection from signal rescaled to [0,1], default 0.2.

polyDeg

an integer, sets the degree of the polynomial for lm fitting; default 1.

biasMet

method for de-trending, choose from runmed (median filter), lm (linear regression), none, default runmed.

binThr

a double, threshold for signal binarisation, default 0.5.

Value

an arcosTS object.

Details

First a short-term median filter with size smoothK is applied to remove fast noise from the time series. If the de-trending method is set to "none", smoothing is applied on globally rescaled time series. The subsequent de-trending can be performed with a long-term median filter with the size biasK (biasMet = "runmed") or by fitting a polynomial of degree polyDeg (biasMet = "lm").

After de-trending, if the global difference between min/max is greater than the threshold peakThr the signal is rescaled to the [0,1] range.

The final signal is binarised using the binThr threshold. .

Examples

cat("no examples")
#> no examples