Skip to contents

Function to validate the "instr.settings" attribute of an existing generic_spct object or summary_generic_spct object.

Usage

isValidInstrDesc(x)

Arguments

x

a generic_spct object or a summary_generic_spct object.

Value

A logical vector of length one.

Details

Test if at least one of instrument name (field spectrometer.name) or serial number (field spectrometer.sn) is found in the value of the R attribute "instr.desc" of x. FALSE is silently returned if x does not belong to a class derived from class generic_spct or from class summary_generic_spct, or if it is derived from these classes but the attribute is not set.

Examples

isValidInstrDesc(white_led.cps_spct)
#> [1] TRUE
isValidInstrDesc(white_body.spct)
#> [1] FALSE