photobiology (version 0.9.30)

trimInstrDesc: Trim the "instr.desc" attribute

Description

Function to trim the "instr.desc" attribute of an existing generic_spct object, discarding all fields except for `spectrometer.name`, `spectrometer.sn`, `bench.grating`, `bench.slit`, and calibration name.

Usage

trimInstrDesc(
  x,
  fields = c("time", "spectrometer.name", "spectrometer.sn", "bench.grating",
    "bench.slit")
)

Arguments

x

a generic_spct object

fields

a character vector with the names of the fields to keep, or if first member is `"-"`, the names of fields to delete; "*" as first member of the vector makes the function a no-op, leaving the spectrum object unaltered.

Value

x

See Also

Other measurement metadata functions: getHowMeasured(), getInstrDesc(), getInstrSettings(), getWhatMeasured(), getWhenMeasured(), getWhereMeasured(), get_attributes(), isValidInstrDesc(), isValidInstrSettings(), select_spct_attributes(), setHowMeasured(), setInstrDesc(), setInstrSettings(), setWhatMeasured(), setWhenMeasured(), setWhereMeasured(), spct_attr2tb(), trimInstrSettings()