Scattering Module Methods & Types
Defining the Mie Computation Model
vSmartMOM.Scattering.make_mie_model — Functionmake_mie_model(computation_type::NAI2, aerosol::AbstractAerosolType, λ::Real, polarization::AbstractPolarizationType, truncation_type::AbstractTruncationType)Convenience function to create Mie Model with NAI2 computation type
make_mie_model(computation_type::PCW, aerosol::AbstractAerosolType, λ::Real, polarization::AbstractPolarizationType, truncation_type::AbstractTruncationType, wigner_filepath::String)Convenience function to load Wigner matrices from file and create Mie Model with PCW computation type
make_mie_model(computation_type::PCW, aerosol::AbstractAerosolType, λ::Real, polarization::AbstractPolarizationType, truncation_type::AbstractTruncationType, wigner_A, wigner_B)Convenience function to take in Wigner matrices and create Mie Model with PCW computation type
Creating/Saving Wigner Matrices (if using PCW method)
vSmartMOM.Scattering.compute_wigner_values — Functioncompute_wigner_values(m_max::Integer, n_max::Integer, l_max::Integer)Compute the Wigner 3j values for all (m, n, l) combinations up to m/n/l max, for (m1, m2, m3) = (-1, 1, 0) (wignerA) and (-1, -1, 2) (wignerB)
compute_wigner_values(N_max)Shorthand for computewignervalues(2Nmax + 1, Nmax + 1, 2N_max + 1)
vSmartMOM.Scattering.save_wigner_values — Functionsave_wigner_values(filepath, wigner_A, wigner_B)Save the Wigner A and Wigner B matrices at the given filepath
vSmartMOM.Scattering.load_wigner_values — Functionload_wigner_values(filename)Load the Wigner A and Wigner B matrices from the given filepath
Computing Aerosol Optical Properties
vSmartMOM.Scattering.compute_aerosol_optical_properties — Functioncompute_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
compute_aerosol_optical_properties(model::MieModel{FDT}) where FDT<:PCWReference: Suniti Sanghavi 2014, https://doi.org/10.1016/j.jqsrt.2013.12.015
Compute the aerosol optical properties using the Domke-PCW method Input: MieModel, holding all computation and aerosol properties Output: AerosolOptics, holding all Greek coefficients and Cross-Sectional information
compute_aerosol_optical_properties(model::MieModel{FDT})Reference: Suniti Sanghavi 2014, https://doi.org/10.1016/j.jqsrt.2013.12.015
This function enables user to specify whether to perform auto-differentiation (using either computation type) Input: MieModel, holding all computation and aerosol properties & autodiff flag (whether to perform auto-differentiation) Output: AerosolOptics, holding all Greek coefficients and Cross-Sectional information
Reconstructing Phase Function
vSmartMOM.Scattering.reconstruct_phase — Function$(FUNCTIONNAME)(greek_coefs, μ; returnLeg = false)Returns the reconstructed elements of the 4x4 scattering matrix at positions f₁₁, f₁₂, f₂₂, f₃₃, f₃₄, f₄₄ from the greek coefficients
f₁₁ represents the phase function p for the Intensity (first Stokes Vector element) and is normalized as follows:
\[\frac{1}{4\pi}\int_0^{2\pi}d\phi \int_{-1}^1 p(\mu) d\mu = 1\]
greek_coefsgreek coefficients (Domke Type)returnLegiffalse(default), just returnf₁₁, f₁₂, f₂₂, f₃₃, f₃₄, f₄₄, iftrue,- return 
f₁₁, f₁₂, f₂₂, f₃₃, f₃₄, f₄₄, P, P²(i.e. also the two legendre polynomials as matrices) 
Types
Aerosol Types
vSmartMOM.Scattering.Aerosol — TypeAerosol type with its properties (size distribution and refractive index)
Fourier Decomposition Computation Types
vSmartMOM.Scattering.NAI2 — Typetype NAI2Perform Siewart's numerical integration method, NAI-2, to compute aerosol phase function decomposition. See: http://adsabs.harvard.edu/full/1982A%26A...109..195S
vSmartMOM.Scattering.PCW — Typetype PCWPerform Domke's Precomputed Wigner Symbols method, PCW, to compute aerosol phase function decomposition. See: http://adsabs.harvard.edu/full/1984A%26A...131..237D
Polarization Types
vSmartMOM.Scattering.Stokes_IQUV — Typestruct Stokes_IQUV{FT<:AbstractFloat}A struct which defines full Stokes Vector ([I,Q,U,V]) RT code
Fields
n: Number of Stokes components (int)D: Vector of lengthnfor ... (see eq in Sanghavi )I₀: Incoming Stokes vector for scalar only
vSmartMOM.Scattering.Stokes_IQU — Typestruct Stokes_IQU{FT<:AbstractFloat}A struct which defines Stokes Vector ([I,Q,U]) RT code
Fields
n: Number of Stokes components (int)D: Vector of lengthnfor ... (see eq in Sanghavi )I₀: Incoming Stokes vector for scalar only
vSmartMOM.Scattering.Stokes_I — Typestruct Stokes_I{FT<:AbstractFloat}A struct which define scalar I only RT code
Fields
n: Number of Stokes components (int)D: Vector of lengthnfor ... (see eq in Sanghavi )I₀: Incoming Stokes vector for scalar only
Truncation Types
vSmartMOM.Scattering.δBGE — Typetype δBGE{FT} <: AbstractTruncationTypeFields
l_max: Trunction length for legendre termsΔ_angle: Exclusion angle for forward peak (in fitting procedure)[degrees]
Mie Computation Model Type
vSmartMOM.Scattering.MieModel — Typetype MieModelModel to hold all Mie computation details for NAI2 and PCW
Fields
computation_typeaerosolλpolarization_typetruncation_typer_max: Maximum radius[μm]nquad_radius: Number of quadrature points for integration over size distributionwigner_Awigner_B
Output Aerosol Optics Types
vSmartMOM.Scattering.GreekCoefs — Typestruct GreekCoefs{FT}A struct which holds all Greek coefficient lists (over l) in one object. See eq 16 in Sanghavi 2014 for details.
Fields
α: Greek matrix coefficient α, is inB[2,2]β: Greek matrix coefficient β, is inB[1,1](only important one for scalar!)γ: Greek matrix coefficient γ, is inB[2,1],B[1,2]δ: Greek matrix coefficient δ, is inB[4,4]ϵ: Greek matrix coefficient ϵ, is inB[3,4]and - inB[4,3]ζ: Greek matrix coefficient ζ, is inB[3,3]
vSmartMOM.Scattering.AerosolOptics — Typestruct AerosolOpticsA struct which holds all computed aerosol optics
Fields
greek_coefs: Greek matrixω̃: Single Scattering Albedok: Extinction cross-sectionfᵗ: Truncation factorderivs: Derivatives