Learn R Programming

photobiology (version 0.11.4)

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
)

Value

a numeric vector of multipliers of the same length as w.length.

Arguments

w.length

numeric vector of wavelengths (nm).

w.band

waveband object.

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.

See Also

Other low-level functions operating on numeric vectors.: as_energy(), as_quantum_mol(), div_spectra(), energy_irradiance(), energy_ratio(), insert_hinges(), integrate_xy(), interpolate_spectrum(), irradiance(), l_insert_hinges(), oper_spectra(), photon_irradiance(), photon_ratio(), photons_energy_ratio(), prod_spectra(), s_e_irrad2rgb(), split_energy_irradiance(), split_photon_irradiance(), subt_spectra(), sum_spectra(), trim_tails(), v_insert_hinges(), v_replace_hinges()

Examples

Run this code
with(sun.data, calc_multipliers(w.length, new_waveband(400,700),"photon"))
with(sun.data, calc_multipliers(w.length, new_waveband(400,700),"photon"), use.cached.mult = TRUE)

Run the code above in your browser using DataLab