photobiology 0.7.1 (and 0.7.0)
This release adds lots of new functionality: classes and corresponding methods for collections of spectral objects are now implemented and tested. Not all methods, and no operators are yet implemented for the new classes. The new classes for collections of multiple spectra are named after the single spectrum ones, but replacing the
_spct ending by
_mspct. For example collections of
source_spct can be stored in objects of class
source_mspct. There are too many new features to list them here, but they are documented in the NEWS file and in the User Guide.
The idea for these new classes for collections of spectra came from a question from Susan Holmes after my talk at the UseR!2015 conference in Aalborg. She asked whether my packages could handle hyperspectral image data. I answered that they could not, but that this feature could be easily implemented. This looked like an interesting challenge so I worked on it during the past two weeks. As with the rest of the package, I used for the new functionality a design that avoids as much as possible making assumptions about the data and allows easily extensibility. I hope these additions make the package useful to those working with time series of spectra and/or spectral image data.
This release also includes a few bug fixes and additions to the old methods and classes for individual spectra.
The ratio functions
eq_ratio where changed into methods of the spectral classes, and
wb.trim was added as a formal parameter to them.
pc.out was removed from all methods and functions that had it as it is easy enough to multiply the returned value by 100 to obtain results expressed as percentages.
"spct.version" was added to objects of all spectral classes, and the new function
getSpctVersion() can be used to retrieve its value. Similarly, objects of the new classes for collections of spectra have an attribute
"mspct.version" and a function
getMspctVersion() can be used to retrieve its value.
normalized_diff_ind() usable for calculation of indexes similar to NDVI (normalized difference vegetaion index) for reflectance and any other spectral summary quantity and two waveband objects was added. This addition was inspired by a poster at the UseR!2015 conference in Aalborg describing package
hsdar (available through CRAN) that provides functions for analysis of hyperspectral images. In contrast to our package, in
hsdar the index definitions are hard-coded into the package functions. On the other hand,
hsdar has a lot of functionality specific to the analysis of hyperspectral data that is missing from our own packages.
upgrade() was changed into
upgrade_spct() function to avoid name conflicts, and updated to add the attribute
'spct.version' attribute when missing. This function is a stop gap solution as the objects’ meta data stored in attributes has slightly changed from that used in earlier versions of the package. The lack of these data can affect printing of returned values for summaries as well as automatic annotations in plots.
The User Guide was expanded to reflect most of these changes and chapters and sections reorganized into a more logic structure.
BACKWARDS COMPATIBILITY: These changes are not 100% backwards compatible, but should be of little consequence to most users, as the changes affect functions and methods that are mostly used internally by the package itself.
NOTE: Sources, and Windows binaries for R 3.1.x and R 3.2.x, are now available in the repository.