convolvewith {colorSpec} | R Documentation |
Convolve each spectrum in a colorSpec object with a kernel
Description
This function convolves each spectrum in a colorSpec object with a kernel of odd length. Its primary purpose is to correct raw spectrometer data (with positive instrumental bandwidth) to have bandwidth=0. Two popular correction kernels for this, with lengths 3 and 5, are built-in options, see Details.
Usage
## S3 method for class 'colorSpec'
convolvewith( x, coeff )
Arguments
x |
a colorSpec object with N wavelengths |
coeff |
a convolution kernel of odd length. The center entry of this vector is taken
as index 0 in the convolution. |
Details
The built-in kernels, 'SS3'
and 'SS5'
, were derived
by Stearns & Stearns under specific hypotheses on the
spectrometer profile, bandpass, and pitch; see References.
Missing values at both ends are filled by copying from the nearest valid value.
The function creates a function calling stats::filter()
and passes that function to applyspec()
.
Value
a colorSpec object with the same dimensions,
wavelength
, quantity
, and organization
.
If coeff
is invalid it is an ERROR and
convolvewith()
returns NULL
.
References
Stearns, E.I., Stearns R.E. An example of a method for correction radiance data for bandpass error. Color Research and Application. 13-4. 257-259. 1988.
Schanda, Janos. CIE Colorimetry, in Colorimetry: Understanding the CIE System. Wiley Interscience. 2007. p. 124.
Oleari, Claudio, Gabriele Simone. Standard Colorimetry: Definitions, Algorithms and Software. John Wiley. 2016. p. 309.
See Also
quantity
,
wavelength
,
linearize
,
applyspec
,
organization