quantity of a colorSpec object

Share:

Description

Retrieve or set the quantity of a colorSpec object.

Usage

1
2
3
4
5
6
## S3 method for class 'colorSpec'
quantity(x)
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 = 'power' (radiometric), or 'photons/sec' (actinometric)

For type='responsivity.light'
quantity = 'power->electrical', 'power->neural', 'power->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'

For more explanation and examples of all these see colorSpec-guide.pdf in the doc directory. Go to the main index page and look for User guides, package vignettes and other documentation.

Value

quantity returns the quantity of x

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

Note

Although quantity is intended to represent a physical quantity, the units are left arbitrary in most cases. Exceptions are reflectance, transmittance, and absorbance which are dimensionless.

Changing the quantity does not change the underlying numbers. For example, changing photons/sec to power does not do numerical conversion. For this conversion, see radiometric.

Similarly, see linearize for conversion from absorbance to transmittance.

See Also

colorSpec; radiometric; linearize

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.