do_resampleNIR: Resample data to new Wavelengths

View source: R/gen_coreDataManip.r

do_resampleNIRR Documentation

Resample data to new Wavelengths

Description

Resample the data in the provided dataset to new, possibly evenly spaced, wavelengths.

Usage

do_resampleNIR(
  dataset,
  targetWls = NULL,
  tby = 0.5,
  method = getstn()$gen_resample_method
)

Arguments

dataset

An object of class 'aquap_data' as produced e.g. by gfd.

targetWls

Numeric vector, the target wavelengths. If left at the default NULL, an evenly spaced vector from the lowest to the highest available wavelength is automatically generated as the target wavelengths to be resampled to.

tby

Numeric length one, the spacing in nm of the automatically generated target wavelength. Only applies if targetWls is left at NULL.

method

The resampling method. For details see interp1. Defaults to 'cubic'; the default can be changed in the settings.r file (parameter gen_resample_method).

Details

If nothing is provided for the argument targetWls, an evenly spaced vector from the lowest to the highest available wavelength is automatically generated as the target wavelengths to be resampled to.

Value

The resampled dataset.

See Also

Other Data pre-treatment functions: [,aquap_data-method, do_addNoise(), do_avg(), do_blowup(), do_detrend(), do_emsc(), do_gapDer(), do_msc(), do_sgolay(), dpt_modules, selectWls(), ssc()

Examples

## Not run: 
fd <- gfd()
fdR <- do_resampleNIR(fd)

## End(Not run)

bpollner/aquap2 documentation built on March 29, 2024, 7:33 a.m.