Releases: rmaia/pavo
Releases · rmaia/pavo
2.9.0
CRAN Release 2.9.0
NEW FEATURES AND SIGNIFICANT CHANGES
- Added a new function
simulate_spec()
, which allows for the flexible simulation of naturalistic spectra (inc. reflectance, irradiance, radiance, absorbance). See?simulate_spec
for examples and information, and the handbook for further discussion. plot.rspec()
now accepts a logicallabels
argument (andlabels.cex
), to control whether text labels identifying each spectrum should be added to the outer plot margins. This was previously only available, and was required, for 'stacked' plot types, but is now optional for both 'overlay' (the default) and 'stacked' spectral plots.- the
wlmin
andwlmax
arguments insummary.rspec()
are being deprecated in favour of a singlelim
argument, for consistency across functions.
MINOR FEATURES AND BUG FIXES
summary.rspec()
has been rewritten for efficiency, and now only calculates the required variables whensubset
is used. As a result, the function is also slightly slower (0.5 x) when calculating the full set of variables, but much faster (10 x) when calculating a subset.- Removed the start-up message.
- Removed the previously-deprecated
margins
argument from various colourspace plots. - Replace
rgl.triangles
withtriangles3d()
internally to avoid a deprecation issue. - Fixed a bug in the categorical colourspace, so it now returns sensible category values when
x
and/ory
is equal to 0.
pavo 2.7.0
NEW FEATURES AND SIGNIFICANT CHANGES
- It is now possible to filter images according to the AcuityView 2.0 algorithm (Caves et al. 2018) in order to to model the visual acuity of animals, prior to analysis. The functionality is implemented in
procimg()
, with details and examples available in the function's help documentation and the vignette. - Added the argument
raw
tobootcoldist()
. WhenTRUE
, the full raw list of bootstrapped colour-distances are returned (equal in length to the number of replicates specified byboot.n
), rather than the summary statistics which are returned by default. - Added the visual phenotype of the Vinegar fly Drosophila melanogaster (Sharkey et al. 2020). See
?vismodel()
or?sensdata()
for instructions on selecting it. coldist()
now uses the packagefarver
when calculating CIE2000 colour distances between points in the CIELab and CIELch spaces.
MINOR FEATURES AND BUG FIXES
- Fixed a bug where procimg() would fail when using resize/rotate followed by further options, on single images.
- vignettes have been moved to https://book.colrverse.com/ and now use a book format
- Fixed a bug in
plot.colspace(gamut = TRUE)
(as well astriplot()
,tcsplot()
,tetraplot()
) where it would incorrectly display"Max gamut cannot be plotted."
and fail to plot the max gamut each time. - Fixed a recent bug whereby the D65 illuminant was expressed in units of radiant flux, by default. It has instead been converted to photon flux (umol.s-1.m-2).
- Added an informative error message when raw quantum catch estimates are < 1, and an attempt is made to calculate colour distances in the receptor-noise model using
noise = 'quantum'
. Taking the root of negative values following log-transformation, as required whennoise = 'quantum'
, would previously produce an uninformative error, which has been rectified. - The
margins
argument has been deprecated for cie, coc, hexagon, segment, projplot, di-, tri-, and tetra-chromatic plots. It was causing problems when later adding points to plots, and margin-handling is best left to the user anyway. The default plots may therefore look slightly different, but the margins can be adjusted to taste using the standardpar(mar = c())
pathway. - Fixed a bug where
bootcoldist()
would not run until supplied with receptor-noise model arguments (n, weber, weber.ref), even when not running the receptor-noise model. - Fixed a bug where
bootcoldist()
would sometimes fail when given data from colourspace models containing lots of negative coordinate values. This was particularly common for the hexagon model. - Improved safety and error handling in
adjacent()
.
CRAN version 2.6.1
MINOR FEATURES AND BUG FIXES
- Minor fix to a vignette to avoid installation issues.
options()
andpar()
are now always set locally, including in vignettes and
examples, as to prevent spillover of these changes in the user session
CRAN version 2.6.0
MINOR FEATURES AND BUG FIXES
bootcoldist()
andadjacent()
now use a random number generator that
generates statistically sound values, even when ran in parallel. The output of
these functions is thus expected to slightly change, even if you set the seed
before.- The alphashape3d package has been moved to
Suggests
, which means it will
not be installed automatically when you install pavo from CRAN and that you
will need to install it yourself if you need it (forvol(type = "alpha")
,
vol(type = "alpha")
andvoloverlap(type = "alpha")
)
CRAN version 2.5.0
NEW FEATURES AND SIGNIFICANT CHANGES
- Add ability to compute colour volume by using alphashapes instead of convex hulls. The functions
vol()
,tcsvol()
andvoloverlap()
gain a new argumenttype = c("convex", "alpha")
to decide how you want to compute the colour volume. Please refer to the vignettevignette("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 functionsummary.colspace()
also gains an additional column that returns that colour volume computed with an alpha-shape of parameter alpha* in the case oftcs
objects.
MINOR FEATURES AND BUG FIXES
getimg()
now imports image files with uppercase extensions (e.g., JPG or PNG), such as those produced by some camera brands or processing software.- Maximum quantum catches computation (
data.maxqcatches
attribute) now works for segment "visual model" as well. As a side effect, this removes a warning that occurred when users ranvismodel(..., visual = "segment")
. sensmodel()
now accepts the argumentsensnames
, for specifying the names of the resulting sensitivity curves on-the-fly.- CIE models now accept data created outside of
vismodel()
, by allowing users to specify the illuminant and viewer sensitivity function used when estimating XYZ values (viaillum
andvisual
arguments incolspace()
). bootcoldist()
is now laxer in its argument checks and accept objects that are neithervismodel
orcolspace
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 theby
argument value is not a multiple of the number of rows in the colspace object (i.e., the number of spectra)- Added a continuous measure of hue to the output of the categorical model of Troje (1993)
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.- Some very small negative values in the built-in visual system data have been corrected.
as.rspec()
is now more lenient for wavelength trimming wheninterp = FALSE
and now works even if the specifiedlims
do not correspond to actual wl values from the input object.
CRAN version 2.4.0
NEW FEATURES AND SIGNIFICANT CHANGES
- Fixed a bug introduced in version 2.3.0 that gave wrong values for S1UV and
S1V insummary.rspec()
. - several
plot()
functions for colspace (triplot()
,tcsplot()
,
tetraplot()
) gain a newgamut
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. - parallel processing now relies on the
future
package, which offers windows
and high performance computing (HPC) environments support. The progress bar is
produced by theprogressr
package and can be customised as well. As a
consequence, thecores
argument ingetspec()
,adjacent()
andclassify()
has been deprecated.
MINOR FEATURES AND BUG FIXES
- fixed a plotting bug introduced in version 2.3.0 where it was required to run
projplot()
twice for the background grid to be displayed. - fixed a bug in
summary.colspace()
whereNULL
was returned instead of
summary.data.frame()
for non-tcs colourspaces. - fix partial matching warnings in examples and in
bootcooldist()
- the package has a new website at
pavo.colrverse.com
- fixed a bug in
coldist()
that prevented the calculation of achromatic contrast
when using custom quantum catch data
CRAN version 2.3.0
NEW FEATURES AND SIGNIFICANT CHANGES
plot.rspec()
now adds a linear spectrum alongside the x-axis to show the
hues corresponding to each wavelength (controlled by thewl.guide
boolean
argument).cieplot()
(and thereforeplot.colspace()
for CIEXYZ model) now adds the
background of the CIEXYZ colour space by default. This can be turned off by
switching theciebg
argument toFALSE
.voloverlap()
uses a different algorithm to determine volume overlaps, which
means:- computation is now much more efficient
voloverlap()
now works fortrispace()
objects as well- accordingly, first two arguments of
voloverlap()
has been renamedcolsp1
andcolsp2
instead oftcsres1
andtcsres2
- slow and possibly inaccurate
montecarlo
option has been deprecated
MINOR FEATURES AND BUG FIXES
- errors during argument checks in
vismodel()
now have more explicit messages. - all
pavo
functions (exceptedvismodel()
andspec2rgb()
) now work with
sub-nm precision, forrspec
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()
andcategorical()
spaces now return Weber luminance contrast by default when passed throughcoldist()
, rather than nothing (as per the original publications).coldist()
can now take multiple values forweber
, 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-700nm
CRAN version 2.2.0
NEW FEATURES AND SIGNIFICANT CHANGES
- added k-medoids clustering as an option in
classify()
coldist()
now returns unweighted Euclidean distances for generic di-, tri-, and tetra-chromaticcolspace()
models. Users wishing to estimate noise-weighted distances (i.e. via the receptor-noise limited model) should continue to usecoldist()
directly onvismodel()
objects, as previously.
MINOR FEATURES AND BUG FIXES
- added a message to indicate what distance metric is being calculated during calls to
coldist()
vismodel()
,colspace()
, andcoldist()
now always returnlum
anddL
columns, for consistencyirrad2flux()
andflux2irrad()
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's- the
cores
argument ingetimg()
is deprecated, as image import is vectorised - fixed a small bug in
classify()
when usingrefID
andkcols
for multiple images - the
resize
argument inprocimg()
now takes a percentage, rather than scaling factor - fixed a bug where
colspace(space = segment)
would return both aB
and (redundant)lum
column - fixed a bug where the rod sensitivity of Canis familiaris was inaccessible through
vismodel()
- fixed an issue in
getspec()
where badly encoded characters in some spectral files would cause failure - fixed a bug where
coldist()
would attempt to estimate receptor-noise weigted distances rather than cie-distances forcielch
model results
CRAN version 2.1.0
NEW FEATURES AND POTENTIALLY BREAKING CHANGES
- added the argument
reclass
toprocimg()
, which allows users to interactively
correct areas within images that have been misclassified - added the rod sensitivity of Canis familiaris
peakshape()
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.- data used internally by pavo (
bgandilum
,transmissiondata
,ttvertex
,vissyst
) is no longer exposed to users
MINOR FEATURES AND BUG FIXES
- new functions
is.vismodel()
andis.colspace()
are exported to test whether an object is of classvismodel
orcolspace
, respectively - fixed a bug where images would sometimes be wrongly detected as user-classified in
as.rimg()
- the UV-sensitive cone is now only always named "u", even for VS species (such as
pfowl
andavg.v
invismodel()
andsensdata()
). This removes an unnecessary but harmless warning whencolspace()
was used to place quantum catches of such species in the tetrahedral colour space. - the
achro
argument incoldist()
has been changed forachromatic
to
better match the arguments fromvismodel()
. Older scripts that useachro
should not be affected and still work as before. - the package
imager
is no longer a dependency, and is only loaded if using some
features ofprocimg()
. - the package
mapproj
is no longer a dependency, and is only loaded if using
projplot()
. - added the argument
labels.stack
toplot.rspec
, which allows the use of
custom spectra labels in stacked plots. - users now receive a warning when interpolating beyond the limits of the data using
as.rspec
, and can control the behaviour with the new argumentexceed.limits
. - all deprecated functions and arguments have now been fully removed.
as.rspec()
now accepts both numeric and character vectors to identify the wavelength column usingwhichwl
(eg.whichwl = "wl"
).- Reference images in
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). - fixed a bug in
aggspec()
when wavelength column was previously removed by the user. - fixed a bug where
cocplot()
would failed whenevertype
graphical parameter was specified. spec2rgb()
has been simplified to rely more onvismodel()
. 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.- the vignette have been split into three smaller parts, which should help new users to get started with pavo
- numerous under-the-hood changes for stability and speed, with thanks to
three reviewers and an associate editor at MEE.
CRAN version 2.0.0
NEW FEATURES
- image-based workflow for the combined analysis of colour and pattern geometry
- added the visual systems of the (trichromatic) jumping spider Habronattus pyrrithrix
and the (trichromatic) triggerfish Rhinecanthus aculeatus getspec()
can now read Avantes binary files (.TRM
files)
MINOR FEATURES AND BUG FIXES
- Carotenoid chroma (S9) in
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. - cieLAB values have been rescaled, and are expressed in the more standard range:
L [0,100], ab [-128,127] getspec()
has an additional argumentignore.case
set toTRUE
by default
to ignore case in file extension matching- fix a bug where
getspec()
would sometimes fail with files including numbers in
scientific format - add a new option in
tetraplot()
to add cone names (u,s,m,l)