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
make_mie_model(::NAI2, aerosol::Aerosol, λ, polarization, truncation_type, r_max, nquad_radius) -> MieModelConstruct 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 asr_maxand the aerosol radius scale).polarization: one ofStokes_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
MieModelready forcompute_aerosol_optical_properties.
make_mie_model(::PCW, aerosol::Aerosol, λ, polarization, truncation_type, r_max, nquad_radius, wigner_filepath::String) -> MieModelConstruct a MieModel configured for the Domke PCW workflow, loading Wigner tables from wigner_filepath via load_wigner_values.
make_mie_model(::PCW, aerosol::Aerosol, λ, polarization, truncation_type, r_max, nquad_radius, wigner_A, wigner_B) -> MieModelConstruct 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.
sourcevSmartMOM.Scattering.compute_aerosol_optical_properties Function
compute_aerosol_optical_properties(model::MieModel{<:NAI2}, FT2::Type=Float64) -> AerosolOpticsCompute 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
Greek coefficients (α, β, γ, δ, ϵ, ζ) are then derived from the bulk phase matrix moments (Sanghavi, 2014).
Returns
AerosolOpticswithgreek_coefs,ω̃,k, andfᵗ = 1.
Notes
Uses the convention
nᵢ >= 0.Radius and wavelength units must be consistent.
compute_aerosol_optical_properties(model::MieModel{FDT}) where FDT<:NAI2Reference: 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
sourcecompute_aerosol_optical_properties(model::MieModel{<:PCW}, FT2::Type=Float64) -> AerosolOpticsCompute bulk aerosol optical properties with the Domke PCW formulation (Sanghavi, 2014), using precomputed Wigner tables.
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
The method evaluates AerosolOptics with:
Use make_mie_model with PCW() and Wigner inputs before calling this function.
compute_aerosol_optical_properties(model::MieModel; autodiff=false) -> AerosolOpticsUnified entry point for analytic and AD-enabled aerosol optics.
autodiff=false(default): dispatches to the analytic method for the model's computation type (NAI2orPCW).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].
vSmartMOM.Scattering.truncate_phase Function
truncate_phase(::NoTruncation, aero::AerosolOptics; kwargs...) -> AerosolOpticsIdentity 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.
truncate_phase(mod::δBGE, aero::AerosolOptics; reportFit=false) -> AerosolOpticsApply δ-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ᵗ.
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:δBGEwithl_maxandΔ_angleaero:AerosolOpticsto truncatelin_aero:linAerosolOpticswith derivatives w.r.t. state (e.g. nᵣ, nᵢ, r)reportFit: iftrue, print RMS fit errors
Returns
(AerosolOptics, linAerosolOptics): truncated optics and their derivatives
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().
Output Types
vSmartMOM.Scattering.GreekCoefs Type
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 inB[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]
vSmartMOM.Scattering.Aerosol Type
AerosolAerosol 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
using Distributions
aer = Aerosol(LogNormal(log(0.3), 0.4), 1.3, 0.01)vSmartMOM.Scattering.AerosolOptics Type
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 Albedok: Extinction cross-sectionfᵗ: Truncation factorderivs: Derivatives
Fourier Decomposition Modes
vSmartMOM.Scattering.NAI2 Type
type NAI2Perform Siewart's numerical integration method, NAI-2, to compute aerosol phase function decomposition. See: http://adsabs.harvard.edu/full/1982A%26A...109..195S
sourcevSmartMOM.Scattering.PCW Type
type PCWPerform Domke's Precomputed Wigner Symbols method, PCW, to compute aerosol phase function decomposition. See: http://adsabs.harvard.edu/full/1984A%26A...131..237D
sourcePhase-function Truncation
vSmartMOM.Scattering.AutoTruncation Type
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.β) - 1fits withinstream_l_cap⇒NoTruncation()(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:
| Value | Meaning |
|---|---|
truncation: auto | This deferred-decision mode (Phase D recommended) |
truncation: NoTruncation() / null | Exactly no transform; errors if coefs exceed cap |
truncation: δBGE(N, Δ) | Explicit; used for benchmarks / cross-validation |