aphalo / photobiology

Package ‘photobiology’ defines a system of classes for storing spectral data and accompanying methods and operators. This is the core of a suite of R packages for photobiological calculations.
4 stars 1 forks source link

Interpolate wls to make members of a collection consistent #12

Closed aphalo closed 1 year ago

aphalo commented 1 year ago

There is a need to interpolate wavelengths of spectra within a collection to allow some parallel or rowwise operations. We need a function to achieve this efficiently now that we are using thinning of spectra to reduce their stored size. See also #11 as this two issues need to be resolved so that the new function can work together. I should have thought of this before starting to use wl-thinned spectra in the data-only packages!

aphalo commented 1 year ago

Pushed a commit with a preliminary implementation of internal function make_wl_consistent() that addresses this problem and also handles spct objects with multiple spectra in long form. This function is now called by all rowwise_ () functions replacing the previous simple tests and calls to stop().

Test cases need to be added and vignette possibly updated.

aphalo commented 1 year ago

Some testing done. Some docs updates done.

aphalo commented 1 year ago

Implemented before release of v0.10.15