Learn R Programming

photobiology (version 0.11.3)

e2q: Convert energy-based quantities into photon-based quantities.

Description

Conversion methods for spectral energy irradiance into spectral photon irradiance and for spectral energy response into spectral photon response.

Usage

e2q(x, action, byref, ...)

# S3 method for default e2q(x, action = "add", byref = FALSE, ...)

# S3 method for source_spct e2q(x, action = "add", byref = FALSE, ...)

# S3 method for response_spct e2q(x, action = "add", byref = FALSE, ...)

# S3 method for source_mspct e2q(x, action = "add", byref = FALSE, ..., .parallel = FALSE, .paropts = NULL)

# S3 method for response_mspct e2q(x, action = "add", byref = FALSE, ..., .parallel = FALSE, .paropts = NULL)

Arguments

x

an R object.

action

a character string, one of "add", "replace", "add.raw" or "replace.raw".

byref

logical indicating if a new object will be created by reference or a new object returned.

...

not used in current version.

.parallel

if TRUE, apply function in parallel, using parallel backend provided by foreach

.paropts

a list of additional options passed into the foreach function when parallel computation is enabled. This is important if (for example) your code relies on external data or packages: use the .export and .packages arguments to supply them so that all cluster nodes have the correct environment set up for computing.

Methods (by class)

  • e2q(default): Default method

  • e2q(source_spct): Method for spectral irradiance

  • e2q(response_spct): Method for spectral responsiveness

  • e2q(source_mspct): Method for collections of (light) source spectra

  • e2q(response_mspct): Method for collections of response spectra

Details

The converted spectral values are added to or replace the existing spectral values depending on the argument passed to parameter action. Addition is currently not supported for normalized spectra. If the spectrum has been normalized with a recent version of package 'photobiology' the spectrum will be renormalized after conversion using the same arguments as previously. "add.raw" and "replace.raw" prevent the re-normalization, are included for completeness and as a way of restoring previous behaviour.

See Also

Other quantity conversion functions: A2T(), Afr2T(), T2A(), T2Afr(), any2T(), as_quantum(), e2qmol_multipliers(), e2quantum_multipliers(), q2e()