rustmatrix.scatter#

Angular-integrated scattering quantities.

Port of pytmatrix.scatter. These helpers operate on a Scatterer (not the Rust core directly) and are used by PSDIntegrator to tabulate scattering / extinction cross-sections and asymmetry per diameter.

rustmatrix.scatter.sca_intensity(scatterer, h_pol=True)[source]#

Differential scattering cross-section (value of the phase function).

Parameters:
Returns:

Z[0,0] ± Z[0,1] depending on polarisation.

Return type:

float

rustmatrix.scatter.ldr(scatterer, h_pol=True)[source]#

Linear depolarisation ratio (linear H/H or V/V ratio).

Convert to dB with 10 * log10(ldr(...)).

Return type:

float

Parameters:

h_pol (bool)

rustmatrix.scatter.sca_xsect(scatterer, h_pol=True)[source]#

Polarised scattering cross-section σ_sca [mm²].

Integrates sca_intensity · sin(θ) over the full scattering sphere using scipy.integrate.dblquad(). When a psd_integrator is attached, the pre-tabulated value is returned instead (much faster).

Return type:

float

Parameters:

h_pol (bool)

rustmatrix.scatter.ext_xsect(scatterer, h_pol=True)[source]#

Extinction cross-section σ_ext [mm²] from the optical theorem.

Temporarily rotates the scatterer into forward-scatter geometry, evaluates S, and returns 2 λ Im(S_ii). Restores the original geometry before returning.

Return type:

float

Parameters:

h_pol (bool)

rustmatrix.scatter.ssa(scatterer, h_pol=True)[source]#

Single-scattering albedo ω = σ_sca / σ_ext (dimensionless, 0–1).

Returns 0 when σ_ext is zero (e.g. perfectly non-attenuating medium).

Return type:

float

Parameters:

h_pol (bool)

rustmatrix.scatter.asym(scatterer, h_pol=True)[source]#

Asymmetry parameter g = ⟨cos Θ⟩ (dimensionless).

g = 0 for isotropic scattering, g → 1 for forward-peaked scattering, g < 0 for backscattering-dominated regimes.

Return type:

float

Parameters:

h_pol (bool)