Open aphalo opened 3 years ago
IUPAC recommends use of "molar attenuation" instead of molar cross section. SI unit is m2/mol.
After a false start, best option seems to be to define a new class attenuation_spct
to store attenuation coefficientes (initially with support for mole based expression but later possibly adding support for mass-based coefficients).
This is now implemented for the most part. For consistency with the names used for other classes, I named the new class solute_spct
. Objects of this class have an attribute called solute.properties
containing the metadata about the solute such as molecular weight, name and formula. The update should not break any existing code. As of 21 May 2022 some additional testing is needed as well as some additional edits to the vignettes before release.
This preliminary implementation was submitted today to CRAN as version 0.10.11 of 'photobiology'. It will still take several months before methods are implemented and well tested. This preliminary implementation will make it possible to start implementing the support of these classes in package 'ggspectra' and transferring some of the data in 'photobiologyPlants' to objects of these classes.
I have been too busy to make progress with this, but hopefully I will be able to add unit tests and additional methods for the release of version 0.11.2
Using
filter_spct
objects to store spectral molar cross sections is clumsy unless we add a way to store this information in an attribute. This is likely to be enough. Creating a class derived fromfilter_spct
could also work as it would inherit most of the functionality. In either case this seems a rather major undertaking as it may break old code. NEEDS TO BE DONE BEFORE FIRST COMPLETE DRAFT OF THE BOOK.