Skip to content

Scattering API

Scattering computes aerosol optical properties, Fourier/Greek coefficients, and phase-matrix reconstructions used by the RT core.

Mie and Aerosol Optics

vSmartMOM.Scattering.make_mie_model Function
julia
make_mie_model(::NAI2, aerosol::Aerosol, λ, polarization, truncation_type, r_max, nquad_radius) -> MieModel

Construct a MieModel configured for the Siewert NAI-2 workflow.

Arguments

  • aerosol: aerosol size-distribution and refractive-index specification.

  • λ: wavelength (must use the same length units as r_max and the aerosol radius scale).

  • polarization: one of Stokes_I, Stokes_IQ, Stokes_IQU, Stokes_IQUV.

  • truncation_type: typically δBGE.

  • r_max: upper radius used in size quadrature.

  • nquad_radius: number of radius quadrature points.

Returns

source
julia
make_mie_model(::PCW, aerosol::Aerosol, λ, polarization, truncation_type, r_max, nquad_radius, wigner_filepath::String) -> MieModel

Construct a MieModel configured for the Domke PCW workflow, loading Wigner tables from wigner_filepath via load_wigner_values.

source
julia
make_mie_model(::PCW, aerosol::Aerosol, λ, polarization, truncation_type, r_max, nquad_radius, wigner_A, wigner_B) -> MieModel

Construct a MieModel configured for the Domke PCW workflow, using precomputed Wigner tables wigner_A and wigner_B.

Use this overload when Wigner tensors are already in memory.

source
vSmartMOM.Scattering.compute_aerosol_optical_properties Function
julia
compute_aerosol_optical_properties(model::MieModel{<:NAI2}, FT2::Type=Float64) -> AerosolOptics

Compute bulk aerosol optical properties with the Siewert NAI-2 formulation.

Reference:

  • S. Sanghavi, Revisiting the Fourier expansion of Mie scattering matrices in generalized spherical functions, JQSRT 136 (2014), 16-27. https://doi.org/10.1016/j.jqsrt.2013.12.015

  • Cross-section expressions are the standard Mie-series forms (paper Eq. (1)); Greek-coefficient Fourier expansion follows the Siewert/Domke framework discussed around paper Eq. (17).

For each radius quadrature point, Mie coefficients are used to compute extinction and scattering cross-sections:

with  . Bulk values are quadrature-weighted means over the size distribution. The returned optical scalars are:

Greek coefficients (α, β, γ, δ, ϵ, ζ) are then derived from the bulk phase matrix moments (Sanghavi, 2014).

Returns

Notes

  • Uses the convention nᵢ >= 0.

  • Radius and wavelength units must be consistent.

source
julia
compute_aerosol_optical_properties(model::MieModel{FDT}) where FDT<:NAI2

Reference: Suniti Sanghavi 2014, https://doi.org/10.1016/j.jqsrt.2013.12.015

Compute the aerosol optical properties using the Siewert-NAI2 method Input: MieModel, holding all computation and aerosol properties Output: AerosolOptics, holding all Greek coefficients and Cross-Sectional information

source
julia
compute_aerosol_optical_properties(model::MieModel{<:PCW}, FT2::Type=Float64) -> AerosolOptics

Compute bulk aerosol optical properties with the Domke PCW formulation (Sanghavi, 2014), using precomputed Wigner tables.

Reference:

The method evaluates terms (Eq. 22 in Sanghavi, 2014), maps them to Greek coefficients (Eq. 24), and returns AerosolOptics with:

Use make_mie_model with PCW() and Wigner inputs before calling this function.

source
julia
compute_aerosol_optical_properties(model::MieModel; autodiff=false) -> AerosolOptics

Unified entry point for analytic and AD-enabled aerosol optics.

  • autodiff=false (default): dispatches to the analytic method for the model's computation type (NAI2 or PCW).

  • autodiff=true: computes the Jacobian with respect to the 4 aerosol parameters   using ForwardDiff.

The AD Jacobian is stored in AerosolOptics.derivs with shape (6L + 2, 4), where L is the Greek coefficient length and rows are stacked as [α; β; γ; δ; ϵ; ζ; ω̃; k].

source
vSmartMOM.Scattering.truncate_phase Function
julia
truncate_phase(::NoTruncation, aero::AerosolOptics; kwargs...) -> AerosolOptics

Identity passthrough. Returns an AerosolOptics with the same Greek coefficients, ω̃ and k, and fᵗ = 0 (the f_tr → 0 limit of Sanghavi & Stephens 2015 Eq. 8 — the truncation-modified τ*, ω*, Z* collapse to the originals).

Note: raw Mie outputs initialise fᵗ = 1 as a "untruncated yet" sentinel — passing them through unchanged would let downstream delta_m_forward interpret the 1 as "everything is in the forward peak" and silently zero out aerosol scattering. We return fᵗ = 0 so the rescaling is a true no-op.

source
julia
truncate_phase(mod::δBGE, aero::AerosolOptics; reportFit=false) -> AerosolOptics

Apply δ-BGE truncation to aerosol Greek coefficients.

The method removes/approximates the forward peak using a least-squares fit over angles outside Δ_angle, then renormalizes with retained scattering fraction :

Returns a new AerosolOptics with truncated coefficients and updated fᵗ.

source
julia
truncate_phase(mod::δBGE, aero::AerosolOptics, lin_aero::linAerosolOptics; reportFit=false)

Apply δ-BGE truncation to aerosol optics and their linearized derivatives (Jacobians).

Performs the same least-squares fit as truncate_phase(mod::δBGE, aero) for β, γ, ϵ, then propagates derivatives through the truncation to obtain truncated Greek-coefficient Jacobians. Reference: Sanghavi & Stephens (2015).

Arguments

  • mod: δBGE with l_max and Δ_angle

  • aero: AerosolOptics to truncate

  • lin_aero: linAerosolOptics with derivatives w.r.t. state (e.g. nᵣ, nᵢ, r)

  • reportFit: if true, print RMS fit errors

Returns

  • (AerosolOptics, linAerosolOptics): truncated optics and their derivatives
source
julia
truncate_phase(::NoTruncation, aero::AerosolOptics, lin_aero::linAerosolOptics; kwargs...)
    -> (AerosolOptics, linAerosolOptics)

Identity passthrough for the linearised (Jacobian) path. Resets the raw Mie sentinel fᵗ = 1 (and the corresponding ḟᵗ) to zero, matching the two-argument truncate_phase(::NoTruncation, aero) so delta_m_truncation_lin doesn't silently zero the aerosol SSA Jacobian when params.truncation = NoTruncation().

source

Output Types

vSmartMOM.Scattering.GreekCoefs Type
julia
GreekCoefs{FT<:Real}

Expansion coefficients of the 4×4 scattering (phase) matrix in generalised spherical functions (the "Greek" coefficients). Six independent coefficient vectors (α, β, γ, δ, ϵ, ζ) fully describe the azimuthal Fourier decomposition of the scattering matrix B for a given particle or mixture. See Eq. 16 in Sanghavi (2014) for the mapping to B elements.

For scalar (intensity-only) RT, only β (the phase-function expansion) is used.

Fields

  • α: Greek matrix coefficient α, is in B[2,2]

  • β: Greek matrix coefficient β, is in B[1,1] (only important one for scalar!)

  • γ: Greek matrix coefficient γ, is in B[2,1],B[1,2]

  • δ: Greek matrix coefficient δ, is in B[4,4]

  • ϵ: Greek matrix coefficient ϵ, is in B[3,4] and - in B[4,3]

  • ζ: Greek matrix coefficient ζ, is in B[3,3]

source
vSmartMOM.Scattering.Aerosol Type
julia
Aerosol

Aerosol microphysical properties: particle size distribution and complex refractive index. Used as input to MieModel for computing single-scattering optical properties via Lorenz-Mie theory.

The refractive index convention is n = nᵣ - i·nᵢ, where positive nᵢ indicates absorption.

Fields

  • size_distribution::ContinuousUnivariateDistribution: Particle radius distribution (e.g., LogNormal). Units: μm.

  • nᵣ: Real part of the refractive index (relative to air).

  • nᵢ: Imaginary part of the refractive index (absorption).

Example

julia
using Distributions
aer = Aerosol(LogNormal(log(0.3), 0.4), 1.3, 0.01)
source
vSmartMOM.Scattering.AerosolOptics Type
julia
AerosolOptics{FT<:Real}

Computed aerosol single-scattering optical properties for one aerosol type at one (or more) wavelengths. Produced by integrating the Mie solution over the particle size distribution.

Fields

  • greek_coefs: Greek matrix

  • ω̃: Single Scattering Albedo

  • k: Extinction cross-section

  • fᵗ: Truncation factor

  • derivs: Derivatives

source

Fourier Decomposition Modes

vSmartMOM.Scattering.NAI2 Type
julia
type NAI2

Perform Siewart's numerical integration method, NAI-2, to compute aerosol phase function decomposition. See: http://adsabs.harvard.edu/full/1982A%26A...109..195S

source
vSmartMOM.Scattering.PCW Type
julia
type PCW

Perform Domke's Precomputed Wigner Symbols method, PCW, to compute aerosol phase function decomposition. See: http://adsabs.harvard.edu/full/1984A%26A...131..237D

source

Phase-function Truncation

vSmartMOM.Scattering.AutoTruncation Type
julia
AutoTruncation()

Phase D — deferred-decision marker for truncation: auto in YAML (mirrors VLIDORT's DO_DELTAM_SCALING philosophy). At model_from_parameters time it resolves deterministically:

  • No aerosol scattering, or all aerosols' length(greek.β) - 1 fits within stream_l_capNoTruncation() (typical for Rayleigh-only or smooth-aerosol scenes).

  • Aerosols with phase_lmax > stream_l_capδBGE(stream_l_cap, Δ_angle).

The resolver emits an @info line stating which branch was taken so the user can always see what was applied. AutoTruncation is deliberately not threaded through the Mie/RT kernels — it is a build-time placeholder that gets replaced before any kernel sees it.

User-facing knobs in YAML:

ValueMeaning
truncation: autoThis deferred-decision mode (Phase D recommended)
truncation: NoTruncation() / nullExactly no transform; errors if coefs exceed cap
truncation: δBGE(N, Δ)Explicit; used for benchmarks / cross-validation
source