quantity | R Documentation |
Retrieve or set the quantity of a colorSpec object.
## S3 method for class 'colorSpec'
quantity(x)
## S3 replacement method for class 'colorSpec'
quantity(x) <- value
## S3 method for class 'colorSpec'
type(x)
x |
a colorSpec R object |
value |
a valid |
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.
quantity()
returns the quantity of x
type()
returns the type of x
, which depends only on the quantity
.
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
.
colorSpec
,
radiometric
,
linearize
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.