test_lens_coef: Test lens projection function

View source: R/test_lens_coef.R

test_lens_coefR Documentation

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)

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.

Value

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

See Also

calc_relative_radius()

Examples

test_lens_coef(lens("Nikon_FCE9"))
test_lens_coef(2/pi)

rcaiman documentation built on Sept. 9, 2025, 5:42 p.m.