Learn R Programming

albatross (version 0.1-1)

feemscatter: Handle scattering signal in FEEMs

Description

Remove or interpolate scattering signal in individual FEEM objects, FEEM cube objects, or lists of them.

Usage

feemscatter(x, …)
  # S3 method for list
feemscatter(x, …)
  # S3 method for feemcube
feemscatter(x, …)
  # S3 method for feem
feemscatter(
    x, widths, method = c("omit", "pchip", "loess"),
    add.zeroes = 30, Raman.shift = 3400, …
  )

Arguments

x

An individual FEEM object, FEEM cube object, or a list of them, to handle the scattering signal in.

widths

A numeric vector of length 4 containing the widths (in nm) of the scattering signal, in the following order:

  1. Rayleigh scattering

  2. Raman scattering

  3. Rayleigh scattering, \(2 \lambda\)

  4. Raman scattering, \(2 \lambda\)

Set a width to \(0\) if you don't want to handle this particular kind of scattering signal.

method

A string choosing how to handle the scattering signal:

"omit"

Replace it with NA

"pchip"

Interpolate it line-by-line using piecewise cubic Hermitean polynomials (pchip).

"loess"

Interpolate it by fitting a locally weighted polynomial surface (loess). In this case the remaining parameters are passed verbatim to loess, which may be used to set parameters such as span.

add.zeroes

Set intensities at \(\lambda_{em} < \lambda_{ex} - \mathtt{add.zeroes}\:\mathrm{nm}\) to \(0\) unless they have been measured. Set to NA to disable this behaviour.

Raman.shift

Raman shift of the scattering signal of water, \(\textrm{cm}^{-1}\).

Passed verbatim from feemscatter generics to feemscatter.feem. If "loess" method is selected, remaining options are passed to loess (the span parameter is of particular interest there).

Value

An object of the same kind (FEEM object / FEEM cube / list of them) with scattering signal handled as requested.

Details

The "pchip" method is implemented as described in the article by Bahram et al., 2006 (see the reference below): each emission spectrum at different excitation wavelengths is considered one by one. The last excitation spectrum (highest emission wavelength) is interpolated first to handle the corner case of extrapolating \(2 \lambda\) scattering near the high end of the emission wavelength range. Zero-valued points are inserted at the lowest emission wavelength (unless the data is already present) to prevent the extrapolation from blowing up.

The "loess" method feeds the whole FEEM except the area to be interpolated to loess, then asks it to predict the remaining part of the spectum.

References

M. Bahram, R. Bro, C. Stedmon, A. Afkhami, Handling of Rayleigh and Raman scatter for PARAFAC modeling of fluorescence data using interpolation, Journal of Chemometrics. 20 (2006) 99-105. 10.1002/cem.978

See Also

feem, feemcube

Examples

Run this code
# NOT RUN {
  data(feems)
  plot(x <- feemscatter(
    feems[[1]], widths = c(25, 25, 20, 20), method = "loess", Raman.shift = 3500,
    span = .03, control = loess.control(trace.hat = 'approximate')
  ))
# }

Run the code above in your browser using DataLab