photobiology 0.10.15

One of the features of the package for a long time has been automatic wavelength interpolation when needed in computations involving two spectra. However, until the current version this behaviour did not extend to operations summarizing multiple spectra stored as members of the same collection, as inconsistent wavelength values triggered an error.

This update to ‘photobiology’ enhances the compatibility of ‘ggspectra’ with spct objects that have been reduced in size by removal or “thinning” of intermediate wavelength values in rectilinear regions.

Spectra containing data for multiple spectra in long form were not well suported as members of mspct collection objects, i.e., some operations available for collections without such members were unsupported.

These changes also enhance the compatibilty of package ‘ggspectra’ with the presence of inconsistent wavelengths across members of collections of spectra.

Changes from version 0.10.14 the most recent CRAN release, are:

  • Add helper function spct_wide2long() a simple pure R replacement for dplyr::pivot_longer() for spectra.
  • Revise function subset2mspct() to accept collections of spectra and subset (split) members containing multiple spectra in long form.
  • Revise function subset2mspct() to accept any valid spct object, inlcuding those containing multiple spectra in long form, and always return a mspct.
  • Add function is_daytime() as a wrapper on day_night() returning a logical vector.
  • Make the name and label returned by a call to waveband() accepting all defaults arguments, a _not available_ waveband(), more informative.
  • Update e2q() and q2e() to better handle previously normalized spectra passed as arguments: normalization is now refreshed by default.
  • Increase the accuracy of conversions in e2q() and q2e(). The change in computed values is at most 20 parts per million.
  • Add functions for conversions among quantities representable as wave length: wl2wavenumber(), wavenumber2wl(), wl2frequency(), frequency2wl(), wl2energy() and energy2wl().

The package documentation web site at includes a changelog with information for each release since version 0.1.0.

NOTE: Version 0.10.15 is on its way to CRAN.

Please raise issues concerning bugs or enhancements to this package through GitHub at

Share with

About Pedro J. Aphalo

I am a senior university lecturer in physiological plant ecology and principal investigator at the Faculty of Biological and Environmental Sciences of the University of Helsinki.

Leave a Reply