NEWS.md
vol(), tcsvol() and voloverlap() gain a new argument type = c("convex", "alpha") to decide how you want to compute the colour volume. Please refer to the vignette vignette("pavo-5-alphashapes", package = "pavo") for more information. As a result, the argument order in these 3 function has changed. Check the documentation to update your scripts accordingly. The function summary.colspace() also gains an additional column that returns that colour volume computed with an alpha-shape of parameter alpha* in the case of tcs objects.getimg() now imports image files with uppercase extensions (e.g., JPG or PNG), such as those produced by some camera brands or processing software.data.maxqcatches attribute) now works for segment “visual model” as well. As a side effect, this removes a warning that occurred when users ran vismodel(..., visual = "segment").sensmodel() now accepts the argument sensnames, for specifying the names of the resulting sensitivity curves on-the-fly.vismodel(), by allowing users to specify the illuminant and viewer sensitivity function used when estimating XYZ values (via illum and visual arguments in colspace()).bootcoldist() is now laxer in its argument checks and accept objects that are neither vismodel or colspace objects. This means you can now use this function on quantum catches dataframe that you obtained outside of pavo, such as the MICA toolbox.summary.colspace() now prints a more explicit error when the by argument value is not a multiple of the number of rows in the colspace object (i.e., the number of spectra)teal example dataset columns have been renamed to add an additional zero in front of single digit numbers, so that column names now sort in the correct order by default.as.rspec() is now more lenient for wavelength trimming when interp = FALSE and now works even if the specified lims do not correspond to actual wl values from the input object.summary.rspec().plot() functions for colspace (triplot(), tcsplot(), tetraplot()) gain a new gamut argument to plot the maximum gamut for a given visual system and illuminant. summary.colspace() also now returns the maximum colour volume for a given visual system and illuminant that you can use to compare to the realised volume by a given dataset. More information in PR #180.future package, which offers windows and high performance computing (HPC) environments support. The progress bar is produced by the progressr package and can be customised as well. As a consequence, the cores argument in getspec(), adjacent() and classify() has been deprecated.projplot() twice for the background grid to be displayed.summary.colspace() where NULL was returned instead of summary.data.frame() for non-tcs colourspaces.bootcooldist()
pavo.colrverse.com
coldist()that prevented the calculation of achromatic contrast when using custom quantum catch dataplot.rspec() now adds a linear spectrum alongside the x-axis to show the hues corresponding to each wavelength (controlled by the wl.guide boolean argument).cieplot() (and therefore plot.colspace() for CIEXYZ model) now adds the background of the CIEXYZ colour space by default. This can be turned off by switching the ciebg argument to FALSE.voloverlap() uses a different algorithm to determine volume overlaps, which means:
voloverlap() now works for trispace() objects as wellvoloverlap() has been renamed colsp1 and colsp2 instead of tcsres1 and tcsres2
montecarlo option has been deprecatedvismodel() now have more explicit messages.pavo functions (excepted vismodel() and spec2rgb()) now work with sub-nm precision, for rspec objects with non-integer wavelengths.summary.colspace() no longer fails for tcs objects with only one row.vismodel() now works for monochromats as well.procspec(opt = "bin") no longer counts bin edges twice (once in each consecutive bin). This will cause changes in the bin stops compared to earlier versions of this function.coc() and categorical() spaces now return Weber luminance contrast by default when passed through coldist(), rather than nothing (as per the original publications).coldist() can now take multiple values for weber, when Weber fractions are known for all receptor classessummary.rspec() no longer errors for a single spectrum when the wavelength range does not contain 450-700nmclassify()
coldist() now returns unweighted Euclidean distances for generic di-, tri-, and tetra-chromatic colspace() models. Users wishing to estimate noise-weighted distances (i.e. via the receptor-noise limited model) should continue to use coldist() directly on vismodel() objects, as previously.coldist()
vismodel(), colspace(), and coldist() now always return lum and dL columns, for consistencyirrad2flux() and flux2irrad() use slightly more precise constant values, which may lead to slightly different results (less than 0.1% difference between this new version and the previous versions)getimg() can now import images from URL’scores argument in getimg() is deprecated, as image import is vectorisedclassify() when using refID and kcols for multiple imagesresize argument in procimg() now takes a percentage, rather than scaling factorcolspace(space = segment) would return both a B and (redundant) lum columnvismodel()
getspec() where badly encoded characters in some spectral files would cause failurecoldist() would attempt to estimate receptor-noise weighted distances rather than cie-distances for cielch model resultsreclass to procimg(), which allows users to interactively correct areas within images that have been misclassifiedpeakshape() uses a completely different algorithm to find the FWHM. It now works as expected for spectra with multiple peaks. See PR #137 for a detailed overview of the changes.bgandilum, transmissiondata, ttvertex, vissyst) is no longer exposed to usersis.vismodel() and is.colspace() are exported to test whether an object is of class vismodel or colspace, respectivelyas.rimg()
pfowl and avg.v in vismodel() and sensdata()). This removes an unnecessary but harmless warning when colspace() was used to place quantum catches of such species in the tetrahedral colour space.achro argument in coldist() has been changed for achromatic to better match the arguments from vismodel(). Older scripts that use achro should not be affected and still work as before.imager is no longer a dependency, and is only loaded if using some features of procimg().mapproj is no longer a dependency, and is only loaded if using projplot().labels.stack to plot.rspec, which allows the use of custom spectra labels in stacked plots.as.rspec, and can control the behaviour with the new argument exceed.limits.as.rspec() now accepts both numeric and character vectors to identify the wavelength column using whichwl (eg. whichwl = "wl").classify() can now be specified using either a numeric vector (to identify by image position in a list) or character vector (to identify by image name).aggspec() when wavelength column was previously removed by the user.cocplot() would failed whenever type graphical parameter was specified.spec2rgb() has been simplified to rely more on vismodel(). As a result, output values may be slightly different but upon testing, we found that differences between the old and the new version were barely noticeable.getspec() can now read Avantes binary files (.TRM files)summary.rspec() has been fixed to (R700 - R450)/R700. This gives the same result as before but with a flipped sign, and better reflects the original formula in the literature.getspec() has an additional argument ignore.case set to TRUE by default to ignore case in file extension matchinggetspec() would sometimes fail with files including numbers in scientific formattetraplot() to add cone names (u,s,m,l)getspec() can now read OceanOptics .ProcSpec filesgetspecf() (and the argument fast = TRUE in getspec()) have been deprecatedsummary.rspec() returned incorrect values for S7. If you use S7, please re-run your analysessummary.rspec() now properly outputs NA for monotonically decreasing spectrasubset.rspec() was provided with a logical vectorsummary.colspace() was used on a tcs objectby argument in merge.rspec() is no longer ignoredvoloverlap() when plot = TRUEvismodel() when transmission has more than one columnvismodel() that applied von Kries correction to achromatic channelfill=FALSE in voloverlap()
jndplot() when suppressing the plotting of arrowscoldist() when noise = "quantum" and achro = TRUE were usedjndplot() when arrow = "none" and achro = TRUE
spec2rgb() now takes into account the 390-400 nm wavelength range into account when possibleas.rspec() no longer fails with tibblesprocspec() now works for all values of binscolspace() where it would incorrectly infer a preference for a general trichromatic space, when a cie model is more appropriatebootcoldist() uses bootstrap to calculate the confidence intervals on the mean color distance between samplescoldist() when fewer samples than the number of photoreceptorsgetspec() that would cause it to crash with errorstetraplot() when saving images