Skip to contents

Reads a calibration data file as supplied by Ocean Optics. Wavelength and calibration values are stored as data and the metadata parsed from the header or supplied as arguments as attributes of the same object, including the time and date of the calibration. The whole file header is in addition stored as a comment.

Usage

read_oo_caldata(
  file,
  time = NULL,
  geocode = NULL,
  label = NULL,
  descriptor = NULL,
  tz = NULL,
  locale = NULL,
  verbose = getOption("photobiology.verbose", default = FALSE)
)

Arguments

file

character string Path or file to read.

time

a POSIXct object, but if NULL the date stored in file is used, and if NA the when.measured attribute is set to NA.

geocode

A one row data frame with numeric columns lon and lat, and optionally a character column address.

label

character string, but if NULL the value of file is used, and if NA the "what.measured" attribute is set to NA.

descriptor

list A list describing the instrument, used to set attribute instr.descriptor.

tz

character Time zone is by default read from the file.

locale

The locale controls defaults that vary from place to place. The default locale is US-centric (like R), but you can use locale to create your own locale that controls things like the default time zone, encoding, decimal mark, big mark, and day/month names.

verbose

Logical indicating the level of warnings wanted.

Value

A generic_spct object, with columns w.length and oo.cal.