Skip to contents

Function to calculate from a set of three (or optionally five or two) output files from the spectrometer, as produced by SpectraSuite, for each of two calibration lamps (D2 and FEL), and calibration data for the lamps, a set of calibration multipliers for the instrument. This function applies a non-linearity correction, an slit-function correction, and stray-light correction, and optionally smoothing by means of process_maya_arrays(). Optionaly a HDR ("high dynamic range") merging of spectra (based on integration time bracketing) using two different integration times is done.

Usage

compute_irrad_calibration(
  FEL.raw.counts,
  D2.raw.counts,
  pix.wavelengths = NULL,
  wl.range = c(250, 900),
  FEL.k,
  D2.k,
  method,
  verbose = getOption("photobiology.verbose", default = FALSE)
)

Arguments

FEL.raw.counts

source_mscpt The raw counts and integration time data for the FEL light source.

D2.raw.counts

source_mscpt The raw counts and integration time data for the D2 light source.

pix.wavelengths

numeric vector The "true" wavelengths in nanometres at each pixel in the detector array.

wl.range

numeric vector of length two Range of wavelengths for which to compute the calibration.

FEL.k

numeric vector a numeric vector with n constants for the polynomial for the FEL lamp.

D2.k

numeric vector a numeric vector with n constants for the polynomial for the D2 lamp.

method

list Method variant to be used.

verbose

Logical indicating the level of warnings wanted. Defaults to FALSE.

Value

An instrument descriptor as a list containing the updated wavelengths and multipliers from the calibration.

Note

To calculate new multipliers we set the calibration multipliers equal to 1. Do the calculations as usual and calculate new multipliers based on the known spectral irradiance for the calibration lamps.