aphalo / photobiology

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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for FR fraction and similar indices

aphalo opened this issue · comments

As we have a NDxI() function and q_ratio(), e_ratio() and ratio() functions we should add support for computing fractions based on pairs of wavelengths: we can just add an option to q_ratio(), e_ratio() and ratio(). Maybe named qty.out with values "ratio", "spct.ratio", and "fraction" and "spct.fraction", thus addressing also #13.

Implemented as new methods e_fraction() and q_fraction() for consistency with ratios. By refactoring some code the bloat is not too much.