Functions used in the different check_spct()
methods.
range_check_Tfr(x, strict.range)range_check_Afr(x, strict.range)
range_check_Rfr(x, strict.range)
range_check_A(x, strict.range)
range_check_cps(x, cps.cols, strict.range)
range_check_s.irrad(x, strict.range)
range_check_irrad.mult(x, strict.range)
Spectral object to check.
logical indicating the stringency of the test.
If strict.range
is NULL
or NA
the failed
test is output using message()
, if FALSE
, using
warning()
and if TRUE
, using stop()
. Currently
the test condition and the message text is the same in all cases.
The test is failed only if more than 1/250 spectral values are off-range,
except for cps_spct
objects where 1/100 negative spectral values
are tolerated. The test for off-range values includes a small tolerance
to avoid failure in cases of loss of numerical precision.
The criteria are empirical (almost arbitrary) and may be adjusted in future versions. The difficulty is that measured spectral data can be noisy even when valid and error-free.