wavelengthAlign {spectralAnalysis}R Documentation

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 signature 'SpectraInTime,SpectraInTime'
wavelengthAlign(ref, toAlign)

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

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.

Value

List of aligned SpectraInTime objects, including the reference object.

one or a list of SpectraInTime-class

Examples


  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 )

[Package spectralAnalysis version 4.3.3 Index]