Updates

photobiology 0.5.17

New options "photobiology.use.hinges" (NULL, TRUE, FALSE) with default NULL and "photobiology.auto.hinges.limit" (wavelength step in nm) with new default 0.5 nm. Default behaviour is changed both for a bug in irrad() functions where the limit was 1.1 nm instead of 0.7 nm and as a result of changing to a smaller default value. Existing and new options "photobiology.waveband.trim", "photobiology.use.cached.mult" are now used throughout.

Bug fix: in version 0.5.1x the behaviour of the product of a BSWF and a source spectrum was changed to return a response spectrum. This was not consistent with the idea that a BSWF is used for quantifying radiation rather predicting a biological response. The result should remain as radiation and continue to be expressed in energy or photon based units. This has been fixed. Starting from the current version, if the waveband is used with the '*' operator is a BSWF (tested with function is.effective() ) the resulting spectrum is tagged as being "effective". The irrad() methods for source.spct have been updated to ‘recognize’ effective spectral irradiance when supplied as input.

rbindspct() modified so that if at least one of the spectra in the list is of effective irradiance, but not all spectra have been calculated with the same BSWF and normalization, a factor named BSWF is added with the BSWFs retrieved from the spectra used as levels. The optional factor selected through parameter idfactor has now its levels always reflecting the order of the spectra in the input list, even when using a named input list of spectra. Several rather minor bugs were fixed, including improved handling of comments and attributes.

summary() methods for spectra have been updated to report the BSWF that have been used if source spectra contain effective spectral irradiances.

Long-standing unsolved problem partly fixed: interpolate_spct() now in most cases applies smoothing to the spectrum before attempting interpolation if the vector of output wavelengths has length > 1, but is sparser than then original spectral data.

A few inconsistencies in the formal parameters among similar functions were fixed by adding the missing parameters. Also some problems in the documentation for a few functions were fixed.

User guide updated.
Mostly backwards compatible, but some default values have changed to minimize errors at the expense of speed of computation. Also function is_effective(), which is most frequently but not always used internally was renamed is.effective(). The changed behaviour of operator * may also require small changes to user code.

photobiologygg 0.2.9

Preliminary support for plotting effective irradiance spectra. plot() methods now use options "photobiology.waveband.trim" and "photobiology.label.wavebands" as default if available. The default for trimming has changed to TRUE, as this seems not too dangerous as labels show when trimming has taken place.

User Guide updated.

Backwards compatible.

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

Updates

photobiology 0.5.16

Fixed some inconsistencies and minor bugs in attribute handling. Added warning messages to make it easier to detect problems in user code.

photobiologyPlants 0.1.1

Rebuilt leaf optical properties data as a missing attribute was triggering errors. Improved data documentation.

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

Updates

I have updated all the packages in the suite. This is the result testing and programming during recent weeks.

photobiology 0.5.15

New functions normalize() and rescale() for spectra. Both functions set object attributes to flag the spectra that have been modified, and no longer are expressed in absolute units. In addition, tests were added to summary functions to disallow use of rescaled or normalized spectral data as input, with the exception of function integrate_spct().

Function rbindspct() was revised to issue a warning when only some of the spectral objects are rescaled or normalized.

Changes in the code for handling ‘time.unit‘, ‘Tfr.type‘ and ‘Rfr.type‘ attributes.
Added new functions getTimeUnit()getTfrType() and getRfrType().

New test cases were added.

photobiology 0.5.14 (not released)

New class and methods added: object.spct, with the corresponding as.object.spct(), is.object.spct(), setObjetcSpct(), and check.object.spct() functions. Also functions reflectance() and transmittance() are implemented. New function absorptance() is implemented only for object.spct objects. Objects of this class can be used to store corresponding spectral transmittance and spectral reflectance values. No operators are defined for this class as they would be ambiguous. The class attribute needs to be changed to either filter.spct or reflector.spct before using operators, however, no data is lost in the process, or written except for the class attribute, so the class can be changed back to object.spct if needed.

New function added: merge.generic.spct() is a wrapper on merge.data.table() that sets the correct class to the returned merged spectra, preserves attributes used with .spct objects and by default merges by w.length.


photobiologygg 0.2.8

Revised to use new getTimeUnit() and getTfrType() functions from package photobiology 0.5.15 which is now required. New annotation type: the string "title" in the annotations parameter of the plot() functions adds an automatic title to the plot.

photobiologygg 0.2.7 (not released)

Implemented plot() for object.spct objects. Updated User Guide accordingly. Added function multiplot() based on multiplot() example by Winston Chan in his Cookbook for R.


photobiologyFilters 0.2.4

Added data for Petri dishes.

photobiologyFilters 0.2.3

To avoid problems with conversions from spectral transmittance to spectral absorbance and taking into account that what can be really measured is that transmittance is below the detection limit of the instrument used, the minimum value of fractional transmittance has been forced to be 1E-5, with the meaning of 1E-5, consistently with the earlier encoding used for Schott optical glass filters.


photobiologyLEDs 0.2.2

Added data for UVMAX LEDs.


photobiologyPlants 0.1.0

New package combining the functions and data in the old photobiologyPhy and photobiologyCry packages and adding data on optical properties of plant leaves.


Edits to the other packages are related to documentation and in some cases rebuilding of example data with the current version of package photobiology.


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

Updates

photobiology 0.5.13

New function smooth_spct() for spectra added. Based on the smoothing code in package MayaCalc and optionally behaving as a wrapper to other smoothers available in R. Implemented for source.spct, filter.spct, reflector.spct and response.spct objects. Its interface may change. Now package caTools is neded.

Operations between .spct objects and numeric vectors, possibly of length one, now preserve other variables (e.g. ID factors) contained in the spectral objects.

Fixed bug in reflectance() function.

Backwards compatible.

photobiology 0.5.12

Bad input error reporting improved for off-range Tfr and Rfr values in check(). Warning given by T2A() when Tfr = 0 result in A = Inf. Added na.rm = TRUE when min() and max() are called on spectral data within the package code.

The formal arguments added to function rbindspct() in version 0.5.7 have been changed to more closely follow the development version 1.9.5 of package data.table. This will break user code that uses the previous syntax as added a few weeks ago to this package.

Fixed bug in handling of 'quantity' arguments "contribution.pc" and "relative.pc" in function absorbance() which was affecting plot annotations.

Mostly backwards compatible, but new checks for validity of data be triggered by code and data that earlier silently accepted bad and dubious quality data.

photobiologyWavebands 0.2.6

Added luminous efficiency functions for human vision, and the constants used in the definition of Lumen.

Setlow’s BSWF is now stored as a response.spct object using the same variable names as in the rest of the suite. The Setlow data from TUV has already been converted to energy units, but this was not noticed when this data was added to the package. This bug is now corrected.

Updated User Guide with some examples of the calculation of luminous flux in lux from spectral irradiance data.

Added plots of the luminous efficiency curves to the Data Plots vignette.

Backwards compatible.

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