Learn R Programming

uFTIR (version 0.1.4)

wavealign: Methods to resample the wavenumbers

Description

It clips and resamples the wavenumbers of data.x and data.y to a common extent. Typically, it uses the wavenumbers of data.x to resample data.y and then the function clips the largest base on the narrowest.

Usage

wavealign(data.x, data.y)

# S4 method for numeric,SpectralReference wavealign(data.x, data.y)

# S4 method for Tile,SpectralReference wavealign(data.x, data.y)

# S4 method for SpectralReference,Tile wavealign(data.x, data.y)

MosaicGetRef.wavealign(data.x, data.y)

TileRead.wavealign(data.x, data.y)

Arguments

data.x

An object of class SpectralReference or Tile.

data.y

An object of class SpectralReference or Tile. It should be the other one.

Value

  • TileRead.wavealign - An object of class SpectralPack

  • MosaicGetRef.wavealign - The SpectralReference object passed as data.y, resampled to data.x.

Details

There are two methods defined:

  • TileRead.wavealign - This method should be the only one used by the user.

  • MosaicGetRef.wavealign - This method is called internally by mosaic_sam. The method is different since it expect a numeric vector in data.x, which is taken from the wavenumbers slot of a SpectralInfo object. The implication is that, for mosaics, the SpectralReference is always resampled according to the wavenumbers of the mosaics. It was programed this way, since mosaics are not loaded into the memory (R) until they are processed by mosaic_sam.

Examples

Run this code
# NOT RUN {
x <- tile_read(base::system.file("extdata/tile.bsp", package = "uFTIR"))
x <- tile_base_corr(x)
x <- wavealign(x, primpke)
# }

Run the code above in your browser using DataLab