Package ‘photobiology’ defines a system of classes for storing spectral data and accompanying methods and operators. This is the core of a suite of R packages for photobiological calculations.
e_ratio() and q_ratio() compute the ratio based on irradiances, i.e., based on the integral of irradiance for two different wavebands. This is in most cases what we are interested in. Occasionally, we may want to compute ratios based on mean spectral irradiance of the two wavebands. Only when the wavelength range covered by both wavebands is the same, the two approaches yield the same value.
Adding a parameter to switch between the two approaches could be sometimes useful, and simple to implement.
Formal parameter quantity is implemented for all ratio, fraction and normdiff methods where it makes sense. The argument is passed to irradiance (or reflectance for the new methods added).
e_ratio()
andq_ratio()
compute the ratio based on irradiances, i.e., based on the integral of irradiance for two different wavebands. This is in most cases what we are interested in. Occasionally, we may want to compute ratios based on mean spectral irradiance of the two wavebands. Only when the wavelength range covered by both wavebands is the same, the two approaches yield the same value.Adding a parameter to switch between the two approaches could be sometimes useful, and simple to implement.