trimInstrDesc {photobiology} | R Documentation |
Trim the "instr.desc" attribute
Description
Function to trim the "instr.desc"
attribute of a generic_spct
or a summary_generic_spct
object, by default discarding all fields
except for spectrometer.name
, spectrometer.sn
,
bench.grating
, bench.slit
, and entrance.optics
.
Usage
trimInstrDesc(
x,
fields = c("time", "spectrometer.name", "spectrometer.sn", "bench.grating",
"bench.slit", "entrance.optics")
)
Arguments
x |
a |
fields |
a character vector with the names of the fields to keep,
or if first member is |
Details
This function alters x
itself by reference and in addition
returns x
invisibly. If x
is not a generic_spct
object
or a summary_generic_spct
object, or if the "instr.desc"
attribute is not present in a generic_spct
object, x
is not
modified.
Attempts to remove or keep fields that are not present in the attribute are ignored silently. The value of fields in the attribute is never modified, fields are either kept unchanged or removed.
Value
x
, possibly with the "instr.desc"
attribute
modified.
Note
Some of the spectrometer-specific metadata can be large, as they can include calibration coefficients. In the case of R package 'ooacquire' also pointers to Java objects may need to be deleted.
See Also
Other measurement metadata functions:
add_attr2tb()
,
getFilterProperties()
,
getHowMeasured()
,
getInstrDesc()
,
getInstrSettings()
,
getSoluteProperties()
,
getWhatMeasured()
,
getWhenMeasured()
,
getWhereMeasured()
,
get_attributes()
,
isValidInstrDesc()
,
isValidInstrSettings()
,
select_spct_attributes()
,
setFilterProperties()
,
setHowMeasured()
,
setInstrDesc()
,
setInstrSettings()
,
setSoluteProperties()
,
setWhatMeasured()
,
setWhenMeasured()
,
setWhereMeasured()
,
spct_attr2tb()
,
spct_metadata()
,
subset_attributes()
,
trimInstrSettings()
Examples
my.spct <- white_led.cps_spct
names(instr_descriptor(my.spct))
trimInstrDesc(my.spct) # modified by reference!
names(instr_descriptor(my.spct))