This is useful for generating certain types of baseline "reference spectra".

wl_eval(x, ..., normalize.wl = I)

# S3 method for hyperSpec
wl_eval(x, ..., normalize.wl = I)

# S3 method for numeric
wl_eval(x, ..., normalize.wl = I)

Arguments

x

either hyperSpec object or numeric vector.

...

expressions to be evaluated.

normalize.wl

function to transform the wavelengths before evaluating the polynomial (or other function). Use normalize01() to map the wavelength range to the interval [0, 1].

Value

hyperSpec object containing one spectrum for each expression.

See also

Author

C. Beleites, V. Gegzna

Examples

plot(wl_eval(laser, exp = function(x) exp(-x)))
plot(wl_eval(1000:4000, y = function(x) 1 / log(x)))
plot(wl_eval(300:550, y2 = function(x) x * 2, y3 = function(x) x * 3))