spectralAnalysis (version 4.3.3)

wavelengthAlign: Wavelength align spectral data

Description

Align SpectraInTime objects with differing wavelength axes to a common wavelength axis using cubic spline interpolation.

Usage

wavelengthAlign(ref, toAlign)

# S4 method for SpectraInTime,SpectraInTime wavelengthAlign(ref, toAlign)

# S4 method for SpectraInTime,list wavelengthAlign(ref, toAlign)

Value

List of aligned SpectraInTime objects, including the reference object.

one or a list of SpectraInTime-class

Arguments

ref

SpectraInTime-class object with the reference wavelength vector

toAlign

SpectraInTime-class object(s) to be aligned. This can either be a single SpectraInTime object or a list of SpectraInTime objects. In case of a list, all objects in the list should have the same wavelength axis.

Examples

Run this code

  spectra             <-  getSpectraInTimeExample()
  listOfSpectra       <-  getListOfSpectraExample()
  
# Dummy alignment of spectrum with itself:
  ex1                 <-  wavelengthAlign( ref = spectra , toAlign = spectra )
# Alignment of list of spectra with a reference spectrum:
  ex2                 <-  wavelengthAlign( ref = spectra , toAlign = listOfSpectra )

Run the code above in your browser using DataLab