Convert the "thickness" attribute of an existing filter_spct object.
Source:R/spct.classes.r
convertThickness.Rd
Function to set the "thickness" attribute and simultaneously converting the spectral data to correspond to the new thickness.
Value
x
possibly with the "thickness"
field of the
"filter.properties"
attribute modified and Tfr
or A
computed for the requested thickness.
Details
For spectral transmittance at a different thickness to be exactly
computed, it needs to be based on internal transmittance. This function
will apply converTfrType()
to x
if needed, but to succeed
metadata should be available. Please, see convertTfrType
.
Note
if x
is not a filter_spct
, object_spct
,
filter_mspct
or object_mspct
object or a collection of such
objects, x
is returned unchanged. If x
does not have the
"filter.properties"
attribute set or has it with missing member
data, x
is returned with Tfr
set to NA
values.
See also
Other time attribute functions:
checkTimeUnit()
,
convertTimeUnit()
,
getTimeUnit()
,
setTimeUnit()
Examples
my.spct <- polyester.spct
filter_properties(my.spct)
#> Rfr (/1): 0.074, thickness (mm): 0.125, attenuation mode: absorption.
convertThickness(my.spct, thickness = 250e-6)
#> 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.250, 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.0000251
#> 2 241 0.0000233
#> 3 242 0.0000215
#> 4 244 0.0000185
#> 5 246 0.0000173
#> 6 248 0.0000173
#> 7 252 0.0000161
#> 8 256 0.0000117
#> 9 258 0.00000972
#> 10 259 0.00000972
#> # ℹ 444 more rows