New updates to packages (photobiology 0.3.1 and several dependent packages)

The versions of the packages uploaded yesterday have several enhancements, and a few backwards incompatibilities (hopefully only in functions mostly used internally). The new versions are not yet optimized for speed, so for performance-critical code, stick for a while with earlier versions. The changes are many, and I hope give a more intuitive user interface. The new, more transparent way of doing calculations has a toll on performance. Consequently the “old” functions remain available for use in speed-critical code and for backwards compatibility. Some additional changes are planned for coming weeks.

The main improvement is the use of object-oriented programming. Now spectra are “S3” objects. This allows the definition specific versions of generic functions (e.g. print, range, etc.) and operators (e.g. +, -, *, /) for spectra. These are already working for spectral irradiance and spectral transmittance, but may still have some hidden bugs. Data for many additional filters has been added.

Most other packages, except those related to photoreceptors, have been also updated.

Please, report any problems and/or oddities to me.

New updates to packages (photobiology 0.2.20, photobiologygg 0.1.7)

Both updates released yesterday had small problems. Some bugs were fixed, RGB colour estimation for wavebands was improved (more realistic colours returned).

New function added to package photobiology:

w_length_range2rgb() Function that returns a colour descriptor from a vector of two wavelengths defining a wavelength region. It assumes equal spectral (energy) irradiance throughout the region.

New versions are in the repository.

Update to package photobiologygg (0.1.6)

This update adds significant new functionality and new documentation.

New function:

  • annotate_waveband() is based on ggplot2’s annotate() but has a parameter which accepts a waveband object simplifying the annotation of spectra plotted with ggplot.

The User Guide has been updated with several examples of the use of this function and also of the use of the new functions in photobiology ver 0.2.19.

This version of photobiologygg requires the newest version of photobiology.

Please report any problems or suggestions to me.