Photon-based photo-response

Share:

Description

This function returns the mean response for a given waveband and a response spectrum.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
q_response(spct, w.band, quantity, time.unit, wb.trim, use.hinges, ...)

## Default S3 method:
q_response(spct, w.band, quantity, time.unit, wb.trim,
  use.hinges, ...)

## S3 method for class 'response_spct'
q_response(spct, w.band = NULL, quantity = "total",
  time.unit = NULL, wb.trim = getOption("photobiology.waveband.trim",
  default = TRUE), use.hinges = getOption("photobiology.use.hinges", default =
  NULL), ...)

## S3 method for class 'response_mspct'
q_response(spct, w.band = NULL, quantity = "total",
  time.unit = NULL, wb.trim = getOption("photobiology.waveband.trim",
  default = TRUE), use.hinges = getOption("photobiology.use.hinges", default =
  NULL), ..., idx = !is.null(names(spct)))

Arguments

spct

an R object

w.band

waveband or list of waveband objects or a numeric vector of length two. The waveband(s) determine the region(s) of the spectrum that are summarized. If a numeric range is supplied a waveband object is constructed on the fly from it.

quantity

character string One of "total", "average" or "mean", "contribution", "contribution.pc", "relative" or "relative.pc"

time.unit

character or lubridate::duration

wb.trim

logical if TRUE wavebands crossing spectral data boundaries are trimmed, if FALSE, they are discarded

use.hinges

logical indicating whether to use hinges to reduce interpolation errors

...

other arguments

idx

logical whether to add a column with the names of the elements of spct

Value

A single numeric value expressed either as a fraction of one or a percentage, or a vector of the same length as the list of wave.bands. The quantity returned, although always on photon-based units, depends on the value of quantity.

Methods (by class)

  • default: Default method for generic function

  • response_spct: Method for response spectra.

  • response_mspct: Calculates photon (quantum) response from a response_mspct

Note

The parameter use.hinges controls speed optimization. The defaults should be suitable in mosts cases. Only the range of wavelengths in the wavebands is used and all BSWFs are ignored.

See Also

Other response functions: e_response, response

Examples

1
2

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.