README.md

colorSpec

colorSpec is an R package providing an S3 class with methods for color spectra. It supports the standard calculations with spectral properties of light sources, materials, cameras, eyes, scanners, etc. And it works well with the more general action spectra.

When a spectrum is contructed, a quantity is required, though it can be changed after contruction. The colorSpec quantities are typically not the same as the SI quantities; they are more general. There are 14 quantities, which then defined the 4 basic spectrum types, as given in this table from the User Guide.

colorSpectype

quantity

metric

comments

examples(objects, files, functions)

light

energy

radiometric

radiometric quantities are conventional in colorimetry

D65.1nmpos1-20x.scopeBlueFlame.txt

photons

actinometric

for color calculations, actinometric units are automatically converted to radiometric

F96T12 Airam-GR8E.txt

responsivity.light

energy->electrical

radiometric

RGB camera response

Flea2.RGBRed-Epic-Dragon.txt

energy->neural

eye response

xyz1931.1nmluminsivity.1nmOsmia-rufa.txt

energy->action

examples are erythemal action, melatonin suppression, etc.

erythemalSpectrum()

photons->electrical

actinometric

silicon sensors usually use quantum efficiency as measure of responsivity

Zyla_sCMOS.txtFoveonX3.txt

photons->neural

response units might be photocurrent, or spikes/sec, etc.

HigherPasserines

photons->action

photosynthesis is an example

BeanPhotosynthesis.txt

material

reflectance

NA

this is the diffuse reflectance

CC_Avg20_spectrum_XYY.txt

transmittanceabsorbance

NA

for color calculations, absorbance is automatically converted to transmittance

HoyaHematoxylin.txtatmosphere2003

responsivity.material

material->electricalmaterial->neuralmaterial->action

NA

a spectrum of this type typically comes from both a light source and a camera

scanner.ACES (a standard for scanning film)

Table 2.1. The types of spectra and their quantities

The quantity is used to label plots, and to make sense out of the arguments in the function product().

The function invert() implements a method in

Davis G (2019). “A Centroid for Sections of a Cube in a Function Space, with application to Colorimetry.” ArXiv e-prints. 1811.00990, https://arxiv.org/abs/1811.00990.



Try the colorSpec package in your browser

Any scripts or data that you put into this service are public.

colorSpec documentation built on May 4, 2022, 9:06 a.m.