splice: "Splicing" and interpolation of spectra

Description Usage Arguments Details Value Author(s) Examples

Description

This method mimicks the "splicing" method available in the ViewSpec Pro software from ASD, which aims at correcting steps in the data.

It removes parts of the spectra defined by the wl vector, and interpolates these parts using a method chosen using the method option.

Usage

1
splice(x, wl)

Arguments

x

a Spectra object

wl

the wavelengths to cut out and interpolate

method

the interpolation method. Available options are "linear", "nearest", "pchip", "cubic", and "spline".

Details

This function is a wrapper around signal::interp1.

Value

an object of same class as x

Author(s)

Pierre Roudier pierre.roudier@gmail.com

Examples

1
2
3
4
data(australia)
spectra(australia) <- sr_no ~ ... ~ 350:2500
oz_spliced <- splice(australia, wl = c(725:1020, 1801:1950), method = "spline")
plot(oz_spliced)

inspectr documentation built on May 2, 2019, 5:45 p.m.