hyperSpec::hyperSpec objects containing VIS and UV radiation
data into spectral objects (xxxx_spct, xxxx_mspct) as defined in package
'photobiology' and vice versa, preserving as much information as possible. As
hyperSpec can contain other kinds of spectral data, it does make sense
to use these functions only with objects containing data that can be handled
by both packages.
1 2 3 4 5 6 7
character One of the spectrum classes defined in package 'photobiology'.
character The name to be used for the 'spc' data when constructing the spectral objects.
numeric A multiplier to be applied to the 'spc' data to do unit or scale conversion. For example "a.u." units in some examples in package 'hyperSpec' seem to have scale factors applied.
Always check the sanity of the imported or exported data values, as guessing is needed when matching the different classes, and the functions defined here are NOT guaranteed to return valid data wihtout help from the user through optional function arguments.
Objects of class
hyperSpec::hyperSpec contain metadata or class
data from which the quantity measured and the units of expression can be
obtained. However, units as included in the objects are not well
documented making automatic conversion difficult. When using this function
the user may need to use parameter
multiplier to scale the data to
what is expected by the object constructors defined in package
'photobiology' and use parameter
spct.data.var to select the
hyperSpec::hyperSpec objects may use memory more efficiently
than spectral objects of the classes for collections of spectra defined in
package 'photobiology' as wavelengths are assumed to be the same for all
member spectra, and stored only once while this assumption is not made for
collections of spectra, allowing different wavelengths and lengths for the
component spectra. Wavelengths are stored for each spectrum, but as
spectral classes are derived from 'tbl_df' in many cases no redundant
copies of wavelength data will be made in memory in spite of the more
flexible semantics of the objects.
1 2 3 4 5 6 7