We are happy to introduce the stable release of
pavo 1.0, which — among other things — includes a suite of new analysis and visualisation tools to make working with color data simpler and more intuitive than ever.
While we have made improvements that will expedite data organisation, the most significant developments in
1.0 relate to the analysis and visualisation of color data. This includes greater flexibility in the initial visual modelling process, and a host of new colorspace models and associated plotting options which are accessable through a simplified workflow. Below we will provide an overview of the main new features introduced in
1.0 in an example workflow.
We detail the changes and additions to the package below, but frequent users should be aware of the following main changes:
vismodelcan now incorporate wavelength-dependent transmission (such as from ocular media or turbid environment) and hyperbolic transformation of quantum catches. It also includes several new build-in visual systems.
colspacefunction replaces the old
tcsfunction, and expands colorspace calculations by incorporating a series of different di-, tri- and tetrachromatic colorspaces.
plotoptions that work directly with
colspaceresults, including a static tetrahedral plot, which is more convenient when producing publication-quality figures.
coldistfunction has undergone significant changes to its imput arguments. Mainly, instead of specifying the single-cone noise
n1, n2, n3and
n4relative cone densities, users now (a) specify the desired weber fraction for the reference cone using the argument
weber, (b) which cone to be used as the reference cone with the argument
weber.ref, and (c) a single vector with the relative cone densities through the
nargument. Explanations for these changes follow below. The achromatic Weber fraction can now also be specified separately through the
coldistnow also calculates color distances for the other colorspaces available through
colspace: Euclidean distances in the hexagon, cielab and categorical spaces, and manhattan (city-bloc) distances in the color-opponent-coding space.
getspecnow has a fast algorithm that speeds up importing spectra. The fast version will only work when all files have the same format.
getspecattempts to use it first, and if it fails, it will switch to the old algorithm. (the slow version can also be chosen with the argument
data(flowers) is a new example dataset consisting of reflectance spectra from 36 Australian angiosperm species. which we’ll use to illustrate many of the new features in this document.
data(flowers) flowercols <- spec2rgb(flowers) head(flowers[1:4])
## wl Goodenia_heterophylla Goodenia_geniculata Goodenia_gracilis ## 1 300 1.7426387 1.918962 0.3638354 ## 2 301 1.5724849 1.872966 0.3501921 ## 3 302 1.4099808 1.828019 0.3366520 ## 4 303 1.2547709 1.784152 0.3231911 ## 5 304 1.1064997 1.741398 0.3097854 ## 6 305 0.9648117 1.699792 0.2964107
plot(flowers, lwd = 2, col = flowercols)