Learn R Programming

rcaiman (version 2.0.1)

test_lens_coef: Test lens projection function

Description

Verify that a lens projection maps zenith 0 deg to 0 and 90 to 1.

Usage

test_lens_coef(lens_coef)

Value

Invisibly returns TRUE if all checks pass; otherwise an error is thrown.

Arguments

lens_coef

numeric vector. Polynomial coefficients of the lens projection function. See lens().

Details

The package tolerate a number very close to 1 at 90 deg but not exactly 1 as long as it is greater than 1. See testthat::expect_equal() for tolerance details.

When the test fails at "Test that lens projection function does not predict values barely below one", the best practice is to manually edit the last coefficient (e.g., change -0.0296 to -0.0295).

If the check "works within the 0–1 range" fails, new calibration data may be required.

See Also

calc_relative_radius()

Examples

Run this code
test_lens_coef(lens("Nikon_FCE9"))
test_lens_coef(2/pi)

Run the code above in your browser using DataLab