Function that converts transmittance (fraction) into absorptance (fraction). If reflectance (fraction) is available, it also allows conversions between internal and total absorptance.
Usage
T2Afr(x, action, byref, clean, ...)
# Default S3 method
T2Afr(x, action = NULL, byref = FALSE, clean = FALSE, ...)
# S3 method for class 'numeric'
T2Afr(x, action = NULL, byref = FALSE, clean = FALSE, Rfr = NA_real_, ...)
# S3 method for class 'filter_spct'
T2Afr(x, action = "add", byref = FALSE, clean = FALSE, ...)
# S3 method for class 'object_spct'
T2Afr(x, action = "add", byref = FALSE, clean = FALSE, ...)
# S3 method for class 'filter_mspct'
T2Afr(
x,
action = "add",
byref = FALSE,
clean = FALSE,
...,
.parallel = FALSE,
.paropts = NULL
)
# S3 method for class 'object_mspct'
T2Afr(
x,
action = "add",
byref = FALSE,
clean = FALSE,
...,
.parallel = FALSE,
.paropts = NULL
)
Arguments
- x
an R object.
- action
character Allowed values
"replace"
and"add"
.- byref
logical indicating if new object will be created by reference or by copy of
x
.- clean
logical replace off-boundary values before conversion.
- ...
not used in current version.
- Rfr
numeric vector. Spectral reflectance o reflectance factor. Set to zero if
x
is internal reflectance,- .parallel
if TRUE, apply function in parallel, using parallel backend provided by foreach
- .paropts
a list of additional options passed into the foreach function when parallel computation is enabled. This is important if (for example) your code relies on external data or packages: use the .export and .packages arguments to supply them so that all cluster nodes have the correct environment set up for computing.
Value
A copy of x
with a column Afr
added and other columns
possibly deleted except for w.length
. If action = "replace"
,
in all cases, the redundant columns are removed, even when
column Afr
was present in the argument passed to x
.
Details
Absorptance, internal transmittance and total reflectance when expressed as fractions, add up to one:
$$1 = \alpha + \tau + \rho$$
where, \(\alpha\) is absorptance, \(\tau\) is internal transmittance and \(\rho\) is total reflectance. If any two of these quantities are known, the third one can be computed from them.
On the other hand:
$$1 = \alpha\prime + T$$
where, \(\alpha\prime = \alpha + \rho\), measured together. In this case, there is not enough information available to compute \(\alpha\).
Thus, method T2Afr()
computes
either \(\alpha\) or \(\alpha\prime\),
depending on whether \(\tau\) or \(T\) are contained in the argument
passed to x
, but neither of them when only \(\tau\) is known. To
know which quantity has been computed, use getTfrType()
to query
whether the computations were based on \(\tau\) or \(T\).
The R names used are: Tfr
for \(\tau\) and \(T\) are Tfr
,
Afr
for \(\alpha\) and \(\alpha\prime\), and Rfr
for
\(rho\). The distinction between \(\tau\) and \(T\) and
between \(\alpha\) and \(\alpha\prime\) is made based on metadata
attributes.
Methods (by class)
T2Afr(default)
: Default method for generic functionT2Afr(numeric)
: Default method for generic functionT2Afr(filter_spct)
: Method for filter spectraT2Afr(object_spct)
: Method for object spectraT2Afr(filter_mspct)
: Method for collections of filter spectraT2Afr(object_mspct)
: Method for collections of object spectra
See also
Other quantity conversion functions:
A2T()
,
Afr2T()
,
T2A()
,
any2T()
,
as_quantum()
,
e2q()
,
e2qmol_multipliers()
,
e2quantum_multipliers()
,
q2e()
Examples
T2Afr(Ler_leaf.spct)
#> Object: object_spct [2,401 x 4]
#> Wavelength range 250-850 nm, step 0.25 nm
#> Label: Ler_06_black.spct
#> Measured on 2017-07-03 13:17:09.548817 UTC
#> Variables:
#> w.length: Wavelength [nm]
#> Tfr: Total spectral transmittance [/1]
#> Rfr: Total spectral reflectance [/1]
#> Afr: Spectral absorptance [/1]
#> --
#> # A tibble: 2,401 × 4
#> w.length Tfr Rfr Afr
#> <dbl> <dbl> <dbl> <dbl>
#> 1 250 0 0.0467 0.953
#> 2 250. 0 0.0467 0.953
#> 3 250. 0 0.0467 0.953
#> 4 251. 0 0.0467 0.953
#> 5 251 0 0.0467 0.953
#> 6 251. 0 0.0467 0.953
#> 7 252. 0 0.0467 0.953
#> 8 252. 0 0.0467 0.953
#> 9 252 0 0.0467 0.953
#> 10 252. 0 0.0467 0.953
#> # ℹ 2,391 more rows