wsmooth {RGCxGC}R Documentation

Two-dimensional smoothing

Description

'wsmooth' weighted whittaker smoothing.

Usage

wsmooth(chromatogram, penalty = 1, lambda = 1, min_int = 0)

Arguments

chromatogram

raw_GCxGC or preproc_GCxGC object with name and mod_time slots.

penalty

an integer of the order of the penalty. Only penalty of first (penalty = 1) and second (penalty = 2) order are allowed. By default, the smooth function is performed with first penalty order.

lambda

smoothing parameter: larger values lead to more smoothing.

min_int

minimum intensity value. The smoothing routine usually creates low intensity artifacts which can obscure other compounds signals. The min intensity value replace signals bellow the given value with 0. For quadrupole mass detector this artifacts may range from 0-100, while for TOF mass analyzers it can be 0-1e3.

Details

This function takes a raw two-dimensional chromatogram and performs the weighted wittaker smoothing. It smooths the signal with linear or quadratic penalty, depending on the provided penalty, along side the first dimension, based on Whittaker smoother (Eilers 2003).

References

Eilers PH (2003). “A perfect smoother.” Analytical Chemistry, 75(14), 3631–3636.

Examples


chrom_name <- system.file("extdata", "08GB.cdf", package = "RGCxGC")
chrom_2D <- read_chrom(chrom_name, 5L)
chrom_smooth <- wsmooth(chrom_2D, penalty = 1, lambda = 1e1)
plot(chrom_smooth, nlevels = 150,
           color.palette = colorRamps::matlab.like,
           main = expression(paste(lambda, "= 10, penalty = 1")) )
# Remove intensities bellow 1.75e5 (too high)    
chrom_smooth2 <- wsmooth(chrom_2D, penalty = 1,
                         lambda = 1e1, min_int = 1.75e5)
plot(chrom_smooth2, nlevels = 150,
           color.palette = colorRamps::matlab.like,
           main = expression(paste(lambda,
            "= 10, penalty = 1, min_int = 1.75e5")) )

[Package RGCxGC version 1.2.0 Index]