Skip to contents

Removes linear or polynomial trends from the signal.

Usage

detrendSignal(x, type = c("linear", "constant"), output_assay = "detrended")

Arguments

x

A PhysioExperiment object.

type

Type of detrending: "linear" or "constant" (mean removal).

output_assay

Name for the output assay. Default is "detrended".

Value

A PhysioExperiment object with a new assay named output_assay containing detrended data. For "constant" type, the channel mean is subtracted. For "linear" type, a least-squares linear fit is removed.

References

Oppenheim, A.V. & Willsky, A.S. (1997). "Signals and Systems." 2nd ed. Prentice Hall.

See also

detrendSignals() for the alternative detrending implementation with polynomial support, butterworthFilter() for highpass filtering as an alternative to detrending.