Processing, Organisation, and Simulation

Functions for importing, processing, and/or simulating spectral data

aggspec()

Aggregate reflectance spectra

as.rspec() is.rspec()

Convert data to an rspec object

as.rimg() is.rimg()

Convert data to an rimg object

is.colspace()

Test if object is of class 'colspace'

is.vismodel()

Test if object is of class 'vismodel'

getspec()

Import spectra files

getimg()

Import image data

irrad2flux() flux2irrad()

Converts between irradiance and photon (quantum) flux

merge(<rspec>)

Merge two rspec objects

procimg()

Process images

procspec()

Process spectra

spec2rgb()

Spectrum to rgb colour conversion

subset(<rspec>) subset(<colspace>) subset(<vismodel>)

Subset rspec, vismodel, and colspace objects

simulate_spec()

Simulate a spectrum

as.cimg(<rimg>) rimg2magick()

Convert images between class rimg and cimg or magick-image

Visualisation

Functions for visualising spectral data, including the results of visual modelling

plot(<colspace>)

Plot spectra in a colourspace

plot(<rimg>)

Plot unprocessed or colour-classified images

plot(<rspec>)

Plot spectra

plot(<sensmod>)

Plot absorbance spectra from sensmodel()

plotsmooth()

Plot loess smoothed curves

aggplot()

Plot aggregated reflectance spectra

axistetra()

Plot reference axes in a static tetrahedral colourspace

explorespec()

Plot spectral curves

legendtetra()

Add legend to a static tetrahedral colourspace

points(<colspace>)

Plot points in a colourspace

projplot() projpoints()

2D projection of a tetrahedral colourspace

sensdata()

Retrieve or plot in-built spectral sensitivity data

tcsplot() tcspoints() tcsvol()

Interactive plot of a tetrahedral colourspace

Analysis

Functions for analysing spectral data

adjacent()

Run an adjacency and boundary strength analysis

bootcoldist()

Bootstrap colour distance confidence intervals

classify()

Identify colour classes in an image for adjacency analyses

coldist()

Colour distances

colspace()

Model spectra in a colorspace

jnd2xyz()

Convert JND distances into perceptually-corrected Cartesian coordinates

jndrot()

Rotate Cartesian coordinates obtained from jnd2xyz()

peakshape()

Peak shape descriptors

sensmodel()

Modeling spectral sensitivity

summary(<colspace>)

Colourspace data summary

summary(<rimg>)

Image summary

summary(<rspec>)

Colourimetric variables

summary(<vismodel>)

Visual model summary

vismodel()

Visual models

vol()

Plot a tetrahedral colour space

voloverlap()

Colour volume overlap

Data

Included example datasets

flowers

Reflectance spectra from a suite of native Australian flowers, collected around Cairns, Queensland.

sicalis

Spectral curves from three body regions of stripe-tailed yellow finch (Sicalis citrina) males

teal

Angle-resolved reflectance data for the iridescent wing patch of a male green-winged teal (Anas carolinensis)