Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

energy_ratio

Energy:energy ratio


Description

Energy irradiance ratio between two wavebands for 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 vector of spectral (energy) irradiances (W m-2 nm-1).

w.band.num

waveband object used to compute the numerator of the ratio.

w.band.denom

waveband object used to compute the denominator of the ratio.

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 insert "hinges" into the spectral data before integration so as to reduce interpolation errors at the boundaries of the wavebands.

Value

a single numeric value giving the unitless ratio.

Note

The default for both w.band parameters is a waveband covering the whole range of w.length.

See Also

Examples

with(sun.data,
     energy_ratio(w.length, s.e.irrad, new_waveband(400,500), new_waveband(400,700)))

photobiology

Photobiological Calculations

v0.10.10
GPL (>= 2)
Authors
Pedro J. Aphalo [aut, cre] (<https://orcid.org/0000-0003-3385-972X>), Titta K. Kotilainen [ctb] (<https://orcid.org/0000-0002-2822-9734>), Glenn Davis [ctb], Agnese Fazio [ctb]
Initial release
2022-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.