Skip to contents

Package & app

Package overview and the interactive Shiny explorer.

luxR-package luxR
luxR: Underwater Light Analysis and Visual Ecology
run_app()
Launch the luxR Shiny explorer.

Unit conversions

Convert between radiometric and photometric quantities.

photon2W()
Convert photon counts to watts at a given wavelength.
W2photon()
Convert watts to photon counts at a given wavelength.
n2W_spec_irradiance()
Convert photon-count spectral irradiance to Watts/m^2/nm.
W2mol_spec_irradiance()
Convert energy spectral irradiance to molar photon flux.
reflectance_to_radiance()
Convert spectral reflectance to spectral radiance
wavelength_in_medium()
Wavelength of light inside an optical medium.
ft2m()
Convert feet to metres.
m2ft()
Convert metres to feet.

Photometric quantities

Compute illuminance and PAR from spectral irradiance.

irradiance2lux()
Provide lux values for measures of spectral irradiance.
scotopic_lux()
Compute scotopic illuminance (V'(lambda) weighting).
lux2irradiance()
Distribute integrated lux across a reference spectral shape.
broadband2spectrum()
Convert a broadband scalar reading into a plausible spectrum.
par_irradiance()
PAR irradiance from a spectral irradiance measurement.
par_fraction()
Fraction of spectral irradiance in the PAR window.

Spectral data sources

Accessors for bundled reference spectra and field data import. lux_spectrum-returning wrappers (from_naples, from_solar, from_trios, from_ocean_optics) are listed under Spectral abstraction.

solar_irradiance()
Reference solar spectral irradiance under standard conditions.
read_trios()
Read a TriOS RAMSES spectroradiometer data file
read_ocean_optics()
Strictly parse an Ocean Optics / Ocean Insight spectrum file
read_instrument_spectrum()
Parse one instrument spectrum with lightr
read_spectrum()
Read a declared, calibrated spectrum with lightr

Depth propagation

Beer-Lambert attenuation through the water column.

attenuate_spectrum()
Propagate a surface spectrum through the water column.
attenuate_depth()
Beer-Lambert attenuation at a single wavelength.
propagate_depth()
Propagate a known irradiance to any other depth (bidirectional).
propagate_spectrum()
Propagate a known spectrum to any other depth(s) (bidirectional).
band_irradiance()
Band-integrated irradiance at one or more depths
photic_depth()
Depth at which a given fraction of surface light remains.
fit_Kd()
Estimate the diffuse attenuation coefficient from two irradiance readings.
jerlov_Kd()
Diffuse attenuation coefficient for Jerlov optical water types.
light_at_depth()
In-water downwelling spectral irradiance at a single depth.

Optical visibility

Secchi depth, diver/camera visual range, image contrast, and object-vs-background detection.

secchi_depth()
Secchi depth from diffuse attenuation coefficient(s).
visual_range()
Heuristic horizontal visual-range estimate in water.
michelson_contrast()
Michelson contrast
weber_contrast()
Weber contrast
inherent_contrast()
Inherent (zero-distance) contrast of an object against its background.
contrast_at_distance()
Heuristic scalar contrast remaining after a sighting path through water.
detection_range()
Scenario estimate of object-background threshold-crossing distance.
detectability()
Object-vs-background detection summary.

Inherent optical properties & interface

Beam attenuation, Beer-Lambert transmittance/absorbance, and the air-water boundary.

beam_attenuation()
Beam attenuation coefficient from absorption and scattering.
single_scattering_albedo()
Single-scattering albedo.
transmittance()
Beer-Lambert transmittance over a path.
absorbance()
Absorbance (optical density) from transmittance.
snells_window()
Snell's window half-angle.
fresnel_reflectance()
Fresnel reflectance at the air-water interface.
surface_transmittance()
Fraction of downwelling irradiance transmitted across the water surface.

Polarization

Linear polarization of the underwater light field (single-scattering model) and Stokes-parameter descriptors.

underwater_polarization()
Tunable Rayleigh-like approximation to underwater polarization
polarization_contrast()
Polarization contrast between a target and its background
degree_of_polarization()
Degree of polarization from Stokes parameters
angle_of_polarization()
Angle of polarization (e-vector orientation) from Stokes parameters
scattering_angle()
Angle between a line of sight and the solar beam
refracted_solar_angle()
Refracted zenith angle of the sun beneath the surface

Species perception

Visual pigment templates, quantum catch, and colour discrimination.

govardovskii_template()
Govardovskii et al. (2000) visual-pigment template.
receptor_absorptance()
Photoreceptor absorptance from a normalised absorbance template (self-screening).
fit_sensitivity()
Fit a Govardovskii visual-pigment template to measured spectral sensitivity.
species_LEF()
Spectral sensitivity for a named species and photoreceptor class.
quantum_catch()
Sensitivity-weighted photon irradiance.
species_brightness()
Per-species sensitivity-weighted photon irradiance.
colour_jnd()
Chromatic distance between two illuminants (Vorobyev-Osorio model).
species_sensitivity_matrix()
Photoreceptor sensitivity matrix for colourvision

Geometry

Radiance/irradiance conversion with solid-angle geometry.

irradiance2radiance()
Convert irradiance to radiance under a geometry assumption.
radiance2irradiance()
Convert radiance to irradiance under a geometry assumption.

Datasets

Reference data bundled with the package.

CIE1931
CIE Photopic Luminous Efficiency Function
CIE_scotopic
CIE Scotopic Luminous Efficiency Function
Naples
Example downwelling irradiance from Mare Chiaro, Gulf of Naples
jerlov_types
Diffuse attenuation coefficients for Jerlov optical water types.
solar_spectra
ASTM G173-03 reference solar spectral irradiance.
species_sensitivities
Photoreceptor spectral sensitivities for selected species.
species_channels
Validated visual-channel memberships for selected species.
species_channel_support
Species visual-channel support decisions.

Spectral abstraction

lux_spectrum S3 class, coercers, format readers, and unit conversion.

lux_spectrum()
Create a lux_spectrum object
as_lux_spectrum()
Coerce an object to lux_spectrum
as_rspec()
Convert luxR spectra to a pavo rspec object
as_colourvision()
Convert luxR spectra to a colourvision input data frame
as_source_spct()
Convert luxR spectra to photobiology spectral classes
as_reflector_spct()
Convert luxR reflectance to a photobiology reflector_spct
convert_unit()
Convert a lux_spectrum to a different unit
resample_spectrum()
Resample a spectrum to a new wavelength grid
plot_spectra()
Plot a list of lux_spectrum objects as overlaid lines.
from_naples()
Load a Naples depth spectrum as a lux_spectrum
from_solar()
Load a reference solar spectrum as a lux_spectrum
from_trios()
Read a TriOS RAMSES file as calibrated radiance spectra
from_ocean_optics()
Read a calibrated Ocean Optics spectrum as a lux_spectrum