Learn R Programming

photobiology (version 0.9.6)

calc_multipliers: Spectral weights

Description

Calculate multipliers for selecting a range of wavelengths and optionally applying a biological spectral weighting function (BSWF) and wavelength normalization. This function returns numeric multipliers that can be used to select a waveband and apply a weight.

Usage

calc_multipliers(w.length, w.band, unit.out = "energy", unit.in = "energy",
  use.cached.mult = FALSE, fill = 0)

Arguments

w.length
numeric Vector of wavelengths (nm)
w.band
waveband
unit.out
character A string: "photon" or "energy", default is "energy"
unit.in
character A string: "photon" or "energy", default is "energy"
use.cached.mult
logical Flag indicating whether multiplier values should be cached between calls
fill
numeric If fill==NA then values returned for wavelengths outside the range of the waveband are set to NA

Value

  • a numeric array of multipliers of the same length as w.length

Examples

Run this code
with(sun.data, calc_multipliers(w.length, new_waveband(400,700),"photon"))

Run the code above in your browser using DataLab