The baseline is estimated by connecting local minima and interpolating from those. The local minima are identified as "the minima in each region of length x" The length of the regions are given in seconds in the region_s parameter.

# S4 method for class 'GCIMSChromatogram'
estimateBaseline(object, rt_length_s)

# S4 method for class 'GCIMSChromatogram'
baseline(object, rt_range = NULL, rt_idx = NULL, .error_if_missing = TRUE)

# S4 method for class 'GCIMSChromatogram'
baseline(object) <- value

Arguments

object

A GCIMSChromatogram object

rt_length_s

The length of the baseline region. It should be comparable or longer than the peak width

rt_range

The minimum and maximum retention times to extract (length 2 vector)

rt_idx

A numeric vector with the retention time indices to extract (or a logical vector of the length of retention time)

.error_if_missing

A logical. If TRUE (default) give an error if baseline is not estimated. Returns NULL otherwise.

value

A vector with a baseline of the same length as intensity(object)

Value

The modified GCIMSChromatogram

Functions

  • baseline(GCIMSChromatogram): Get the baseline

  • baseline(GCIMSChromatogram) <- value: Set the baseline