Update

photobiology 0.9.0 (new functionality, minor bug fixes, easier to install from sources)

This version removes all two-way dependencies between this package and other packages in the r4photobiology suite. This should make fresh installations from sources a lot easier (possible?). I hope this, plus reducing the number of pages in the User Guide will make this package acceptable to CRAN, where I intend to submit it in coming months. It already passes all automated checks needed for this. I have been working on this package for 28 months and although quite large it is rather easy to maintain as I have built a large set of test cases using package testthat.

Revised documentation

Most two-way dependencies where in “suggests” needed for examples and the User Guide. Removing these dependencies required editing several examples. Also several examples where moved from the User Guide vignette to the documentation of methods and functions. This is work in progress, and I intend to move more examples so as to make the vignette shorter.

The User Guide was also edited to reflect the changes described below.

Minor bugs fixed

All spectral object constructors return an object with length equal to zero when called without arguments, or with argument w.length of length equal to zero. Earlier behaviour was to return NA, which is not consistent with R’s usual expectations.

All constructors for collections of spectra return an object with length equal to zero when called without arguments or with a list of length zero as first argument l (letter ell). Earlier behaviour was to trigger an error, which is not consistent with R’s usual expectations.

In some cases function trim_waveband() was not returning the values described. Now the function really behaves as originally documented.

Several functions and methods have a range argument, but semantics was not identical in all. Now they all use the same semantics, similar to that used in recent versions of package ggplot2 for xlim() and ylim(). Setting a boundary to NA means that the range extends to include all available data on a corresponding ‘extreme’. Whenever it makes sense a NULL range means that the range includes the whole available range of wavelengths. The default value of range for the recently added method fshift() has been changed to be the first 10 nm at the short wavelength end of the spectrum.

Removed functionality

Function calc_filter_multipliers() has been deleted.

New data

Add example data to make this package’s documentation independent of other packages in the suite

filter_spct objects: clear.spct, opaque.spct, polyester.spct, `yellow.gel.spct

response_spct objects: photodiode.spct, ccd.spct

object_spct objects: black_body.spct, white_body.spct, clear_body.spct

New methods

Add method clip_wl() to more easily select data for a range of wavelengths. Add method trim_wl() from trimming, and method interpolate_wl(). All three methods are implemented for individual spectra and for collections of spectra. Methods clip_wl() and trim_wl() have been also implemented for individual waveband objects and for lists of waveband objects. These methods add a new “user interface” to existing functions.

New classes and methods (only useful to package developers)

Add new classes raw_spct and raw_mspct to store raw counts from spectrometers, constructors raw_spct() and raw_mspct(), and corresponding setRawSpct() and
is.raw_spct() and as.raw_spct() functions.

Add methods getInstrDesc() and getInstrSettings(), and the corresponding setInstrDesc() and setInstrSettings() to handle metadata about instrument and instrument settings used to acquire the spectral data. These classes and methods are building blocks to be used in the development of spectral-data acquisition packages.

Why did I increase version number to “0.9.x?

Changes are mostly backwards compatible but new classes were added and several existing methods were implemented for them. Seven new methods were added and implemented for all spectral classes and collections of spectra classes. The new classes are being used for writing a new package intended to replace package MayaCalc.

Backwards compatible.

NOTE: Sources, and Windows binaries for R 3.2.x, are now available in the repository.

Leave a Reply

Your email address will not be published. Required fields are marked *