feemgrid: Interpolate FEEMs on a given wavelength grid

View source: R/grid.R

feemgridR Documentation

Interpolate FEEMs on a given wavelength grid

Description

Use interpolation to change the wavelength grid of a single FEEM or unify the grid of a collection of them.

Usage

  feemgrid(x, ...)
  ## S3 method for class 'feem'
feemgrid(
    x, emission, excitation,
    method = c("whittaker", "loess", "kriging", "pchip"), ...
  )
  ## S3 method for class 'feemcube'
feemgrid(
    x, emission, excitation, ..., progress = TRUE
  )
  ## S3 method for class 'list'
feemgrid(
    x, emission, excitation, ..., progress = TRUE
  )

Arguments

x

A feem object, a feemcube, or a list of feem objects.

emission, excitation

Desired wavelength grid, as numeric vectors. Must be specified for a single FEEM. If not specified for a collection of FEEMs, all wavelengths falling in the range of the intersection all wavelengths intervals are chosen.

method

Interpolation method, see feemscatter for details.

...

Passed from generics to feemgrid.feem, then to interpolation methods. See feemscatter for details.

progress

Set to FALSE to disable the progress bar.

Details

The algorithm doesn't know how to distinguish between NAs that haven't been measured and NAs that resulted from combining different wavelength grids, so it tries to interpolate all of them. As a result, leaving large areas of the spectrum undefined (e.g. anti-Stokes area) is not recommended, since it would result in extrapolation and introduce strong artefacts.

Value

An object of the same kind (FEEM object / FEEM cube / list of them) with emission and excitation wavelengths as requested.

See Also

feemscatter

Examples

  data(feems)
  x <- feemscatter(feems$a, rep(25, 4))
  y <- feemgrid(x, seq(240, 600, 5), seq(230, 550, 10))
  plot(plot(x, main = 'Original'    ), split = c(1, 1, 2, 1), more = TRUE)
  plot(plot(y, main = 'Interpolated'), split = c(2, 1, 2, 1))

albatross documentation built on May 29, 2024, 9:10 a.m.