
Convert the "thickness" attribute of an existing filter_spct object.
Source:R/spct.classes.r
convertThickness.RdFunction 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 [561 x 2]
#> Wavelength range 240-800 nm, step 1 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: 561 × 2
#> w.length Tfr
#> <int> <dbl>
#> 1 240 0.0000251
#> 2 241 0.0000233
#> 3 242 0.0000215
#> 4 243 0.0000198
#> 5 244 0.0000185
#> 6 245 0.0000173
#> 7 246 0.0000173
#> 8 247 0.0000173
#> 9 248 0.0000173
#> 10 249 0.0000173
#> # ℹ 551 more rows