Functions that convert or add related physical quantities to
filter_spct
or object_spct
objects. transmittance (fraction)
into absorptance (fraction).
Usage
any2T(x, action = "add", clean = FALSE)
any2A(x, action = "add", clean = FALSE)
any2Afr(x, action = "add", clean = FALSE)
Value
A copy of x
with the columns for the different quantities
added or replaced. If action = "replace"
, in all cases, the
additional columns are removed, even if no column needs to be added.
Details
These functions are dispatchers for A2T
,
Afr2T
, T2A
, and T2Afr
. The
dispatch is based on the names of the variables stored in x
. They
do not support in-place modification of x
.
See also
Other quantity conversion functions:
A2T()
,
Afr2T()
,
T2A()
,
T2Afr()
,
as_quantum()
,
e2q()
,
e2qmol_multipliers()
,
e2quantum_multipliers()
,
q2e()
Examples
any2Afr(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
any2T(Ler_leaf.spct)
#> Warning: 'A2T()' not implemented for class "object_spct".
#> Object: object_spct [2,401 x 3]
#> 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]
#> --
#> # A tibble: 2,401 × 3
#> w.length Tfr Rfr
#> <dbl> <dbl> <dbl>
#> 1 250 0 0.0467
#> 2 250. 0 0.0467
#> 3 250. 0 0.0467
#> 4 251. 0 0.0467
#> 5 251 0 0.0467
#> 6 251. 0 0.0467
#> 7 252. 0 0.0467
#> 8 252. 0 0.0467
#> 9 252 0 0.0467
#> 10 252. 0 0.0467
#> # ℹ 2,391 more rows
any2T(polyester.spct)
#> Object: filter_spct [454 x 2]
#> Wavelength range 240-800 nm, step 1-4 nm
#> Label: Polyester, clear film, 0.000125 m thick, Autostat CT5 from McDermit Autotype; new
#> Rfr (/1): 0.074, thickness (mm): 0.125, attenuation mode: absorption.
#> Variables:
#> w.length: Wavelength [nm]
#> Tfr: Total spectral transmittance [/1]
#> --
#> # A tibble: 454 × 2
#> w.length Tfr
#> <int> <dbl>
#> 1 240 0.00482
#> 2 241 0.00464
#> 3 242 0.00446
#> 4 244 0.00414
#> 5 246 0.004
#> 6 248 0.004
#> 7 252 0.00386
#> 8 256 0.00329
#> 9 258 0.003
#> 10 259 0.003
#> # ℹ 444 more rows