Learn R Programming

photobiology (version 0.14.3)

simul_sensor_response: Simulate light sensor response

Description

Simulate light sensor response

Usage

simul_sensor_response(
  source.spct,
  sensor.mspct,
  norm = "skip",
  range = NULL,
  unit.out = getOption("photobiology.radiation.unit", default = "energy"),
  time.unit = NULL,
  scale.factor = 1,
  attr2tb = NULL
)

Value

A data frame

Arguments

source.spct

source_spct Light source spectral irradiance.

sensor.mspct

response_spct or response_mspct Light sensor spectral responsiveness.

norm

numeric Normalization wavelength (nm) or character string "max", or "min" for normalization at the corresponding wavelength, "update" to update the normalization with previous criterion, "undo" to revert an existing normalization or "skip" to force return of x unchanged. See Details.

range

numeric vector of length two Range of wavelengths to use (nanometres, nm)

unit.out

character Allowed values "energy", and "photon", or its alias "quantum".

time.unit

character or lubridate::duration object.

scale.factor

numeric vector of length 1, or length equal to that of w.band. Numeric multiplier applied to returned values.

attr2tb

character vector, see add_attr2tb for the syntax for attr2tb passed as is to formal parameter col.names.

Details

Compute sensor response spectrum by convolution of light source emission spectrum or illumination spectrum and the responsiveness spectrum of a sensor with one or more channels. Return the integral over wavelengths' range for each sensor channel, or sensor in sensor.mspct.

Examples

Run this code
simul_sensor_response(sun.spct, ccd.spct)
simul_sensor_response(sun.spct, ccd.spct, range = c(400, 700))
simul_sensor_response(sun.spct, ccd.spct, unit.out = "photon")

Run the code above in your browser using DataLab