Skip to contents

Retrieves the baseline retained by preprocess or correct_baseline when called with attach_baseline = TRUE. This function does not estimate a baseline itself.

Usage

get_baseline(x)

Arguments

x

A chromatogram, or a list of chromatograms, returned by preprocess or correct_baseline with attach_baseline = TRUE.

Value

A matrix of the same dimensions as x containing the estimated baseline, or a list of such matrices if x is a list.

Details

The baseline is dropped by correct_rt, which warps the signal along the time axis, and by subtract_blanks, after which it no longer describes the signal. Retrieve it before either step. crop_chroms keeps it, cropped to match.

See also

Examples

data(Sa)
pr <- preprocess(Sa[[1]], dim1 = seq(10, 18.66, by = .01),
                 dim2 = seq(200, 318, by = 2), attach_baseline = TRUE)
bl <- get_baseline(pr)