quantity: quantity of a colorSpec object

View source: R/colorSpec.R

quantityR Documentation

quantity of a colorSpec object

Description

Retrieve or set the quantity of a colorSpec object.

Usage

## S3 method for class 'colorSpec'
quantity(x)

## S3 replacement method for class 'colorSpec'
quantity(x) <- value

## S3 method for class 'colorSpec'
type(x)

Arguments

x

a colorSpec R object

value

a valid quantity string; see Details.

Details

There are 4 valid types, which are further divided into 14 valid quantities. All of these are strings:

For type='light'
quantity = 'energy' (radiometric), or 'photons' (actinometric)

For type='responsivity.light'
quantity = 'energy->electrical', 'energy->neural', 'energy->action',
'photons->electrical', 'photons->neural', or 'photons->action'

For type='material'
quantity = 'reflectance', 'transmittance', or 'absorbance'

For type='responsivity.material'
quantity = 'material->electrical', 'material->neural', or 'material->action'

Also see the colorSpec User Guide.

Value

quantity() returns the quantity of x

type() returns the type of x, which depends only on the quantity.

Note

The colorSpec quantity is more general than the physical SI quantity; for example quantity='energy' really includes 10 distinct SI quantities and maybe more. The unit is left arbitrary in most cases. Exceptions are reflectance, transmittance, and absorbance which are dimensionless.

Changing the quantity should only be done if one knows what one is doing. It does not change the underlying numbers. For example, changing photons to energy does not do numerical conversion. For this specific conversion, see radiometric().

Similarly, see linearize() for conversion from absorbance to transmittance.

See Also

colorSpec, radiometric, linearize


colorSpec documentation built on May 29, 2024, 6 a.m.