Learn R Programming

photobiology (version 0.13.1)

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 One of "photon" or "energy", default is "energy".

unit.in

character One of "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 = w.length,
                      w.band = new_waveband(400,700),
                      unit.out = "photon"))
with(sun.data,
     calc_multipliers(w.length = w.length,
                      w.band = new_waveband(400,700),
                      unit.out = "photon"),
                      use.cached.mult = TRUE)

Run the code above in your browser using DataLab