Learn R Programming

photobiology (version 0.9.6)

energy_ratio: Energy:energy ratio

Description

This function gives the energy ratio between two given wavebands of a radiation spectrum.

Usage

energy_ratio(w.length, s.irrad, w.band.num = NULL, w.band.denom = NULL,
  unit.in = "energy", check.spectrum = TRUE, use.cached.mult = FALSE,
  use.hinges = NULL)

Arguments

w.length
numeric Vector of wavelengths (nm)
s.irrad
numeric Corresponding of spectral (energy) irradiances (W m-2 nm-1)
w.band.num
waveband
w.band.denom
waveband
unit.in
character Allowed values "energy", and "photon", or its alias "quantum"
check.spectrum
logical Flag indicating whether to sanity check input data, default is TRUE
use.cached.mult
logical Flag indicating whether multiplier values should be cached between calls
use.hinges
logical Flag indicating whether to use hinges to reduce interpolation errors

Value

  • a single numeric value giving the unitless ratio

See Also

Other photon and energy ratio functions: e_ratio, eq_ratio, photon_ratio, photons_energy_ratio, q_ratio, qe_ratio

Examples

Run this code
# energy:energy ratio
with(sun.data,
     energy_ratio(w.length, s.e.irrad, new_waveband(400,500), new_waveband(400,700)))
# energy:energy ratio waveband : whole spectrum
with(sun.data, energy_ratio(w.length, s.e.irrad, new_waveband(400,500)))
# energy:energy ratio of whole spectrum should be equal to 1.0
with(sun.data, energy_ratio(w.length, s.e.irrad))

Run the code above in your browser using DataLab