Learn R Programming

photobiology (version 0.12.0)

range_check_Tfr: Internal utility range-check functions

Description

Functions used in the different check_spct() methods.

Usage

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)

Arguments

x

Spectral object to check.

strict.range

logical indicating the stringency of the test.

Details

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.