SingleScatteringAtmosphere

class nsb2.atmosphere.single_scattering.SingleScatteringAtmosphere[source]

Bases: Atmosphere

Atmosphere in which light is scattered at most once.

Combines Rayleigh scattering off air molecules with Mie scattering off aerosols, following the plane-parallel single-scattering treatment of [Kocifaj2009]. The scattering kernel factorises into an indicatrix, which describes the angular dependence, and a gradation, which describes how much scattering material lies along the two lines of sight. The Rayleigh component uses the classical dipole phase function and the Mie component the forward-peaked approximation of [HenyeyGreenstein1941]. Ignoring multiple scattering underestimates the background close to a very bright source such as a full Moon, but is accurate to a few per cent for high observatory latitudes.

Parameters:
  • airmass_func (callable) – Airmass X(z) as a function of zenith angle in radians.

  • tau_rayleigh (callable) – Rayleigh scattering optical depth as a function of wavelength.

  • tau_mie (callable) – Mie scattering optical depth as a function of wavelength.

  • tau_absorption (callable) – Absorption optical depth as a function of wavelength. Contributes to the extinction but not to the scattering.

  • g (float) – Henyey-Greenstein asymmetry parameter of the Mie phase function, in (-1, 1). Positive values favour forward scattering.

Examples

>>> import numpy as np, astropy.units as u
>>> atmosphere = SingleScatteringAtmosphere(
...     airmass_func=lambda z: 1 / np.cos(z),
...     tau_rayleigh=lambda w: 0.1 * (400 * u.nm / w) ** 4,
...     tau_mie=lambda w: 0.05 * np.ones_like(w.value),
...     tau_absorption=lambda w: 0.01 * np.ones_like(w.value),
...     g=0.65,
... )
>>> transmission = atmosphere.extinction(
...     np.array([np.pi / 2]), np.array([0.0]), np.array([500]) * u.nm)
>>> bool(0 < transmission[0, 0] <= 1)
True
__init__(airmass_func, tau_rayleigh, tau_mie, tau_absorption, g)[source]
classmethod __new__(*args, **kwargs)