Convert raw counts data into spectral irradiance or fluence

s_irrad_corrected(x, ...)

# S3 method for default
s_irrad_corrected(x, ...)

# S3 method for list
s_irrad_corrected(
  x,
  time = NULL,
  correction.method,
  hdr.tolerance = getOption("ooacquire.hdr.tolerance", default = 0.05),
  return.cps = FALSE,
  trim.descriptor = !return.cps,
  descriptor,
  locale = NULL,
  verbose = getOption("photobiology.verbose", default = FALSE),
  ...
)

# S3 method for raw_mspct
s_irrad_corrected(
  x,
  spct.names = c(light = "light", filter = "filter", dark = "dark"),
  correction.method,
  hdr.tolerance = getOption("ooacquire.hdr.tolerance", default = 0.05),
  return.cps = FALSE,
  trim.descriptor = !return.cps,
  verbose = getOption("photobiology.verbose", default = FALSE),
  ...
)

# S3 method for raw_spct
s_irrad_corrected(
  x,
  time = NULL,
  correction.method,
  hdr.tolerance = getOption("ooacquire.hdr.tolerance", default = 0.05),
  return.cps = FALSE,
  trim.descriptor = !return.cps,
  verbose = getOption("photobiology.verbose", default = FALSE),
  ...
)

Arguments

x

A named list of one to three vectors of file names, with names "light", "filter", and "dark". Or a raw_mspt object, or a raw_spct object.

...

Named arguments passed to photobiology::cps2irrad which is the final calculation step.

time

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

correction.method

A named list of constants and functions defining the method to be used for stray light and dark signal corrections.

hdr.tolerance

numeric Tolerance for mean deviation among cps columns as a fraction of one. Used in check of HDR consistency. A negative value disables merging using only the data for the shortest integration time.

return.cps

logical Useful when there is no need to apply a calibration, such as when computing new calibration multipliers.

trim.descriptor

logical If TRUE the spectrometer calibration constants, pixel wavelengths, slit-function "tail-correction" function code and other calibration-related information is deleted.

descriptor

A named list with a descriptor of the characteristics of the spectrometer (if serial number does not agree an error is triggered).

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 and messages wanted.

spct.names

named character vector of length three, to map names in x to those expected.

Methods (by class)

  • s_irrad_corrected(default): Default for generic function.

  • s_irrad_corrected(list): Default for generic function.

  • s_irrad_corrected(raw_mspct): Default for generic function.

  • s_irrad_corrected(raw_spct): Default for generic function.

Note

Currently s_irrad_corrected.list allows processing of files written by OceanOptics' SpectraSuite software, from protocols with integration-time bracketing or not, with a dark reference measurement or not. Three measurements components are recognized: a "light" measurement, a "filter" measurement using a polycarbonate filter and a dark measurement. Only "light" is mandatory. Data should be raw counts, either corrected for detector non-linearity or not. All three spectra should be acquired using the same instrument settings to achieve good accuracy.

Enabling trim.descriptor ensures that the data objects are free of references to code in 'ooacquire', which is crucial for the portability of the spectral data.

See also

Other functions for conversion of raw-counts data: raw2corr_cps(), raw2cps(), s_fraction_corrected()