rustmatrix.radar#

Polarimetric radar observables.

Direct port of pytmatrix.radar. Given a configured Scatterer (optionally with a psd_integrator for N(D)-weighted averages), these helpers compute the standard radar observables:

  • radar_xsect() — radar cross-section.

  • refl() / Zi() — reflectivity (with N=1 when no PSD).

  • Zdr() — differential reflectivity (linear ratio).

  • delta_hv() — backscatter differential phase.

  • rho_hv() — copolar correlation coefficient.

  • Kdp() — specific differential phase [°/km] (forward geometry).

  • Ai() — specific attenuation [dB/km] (forward geometry).

Inputs: particle diameter and wavelength must be given in mm for Kdp and Ai to come out in the documented units. Zi returns linear reflectivity; take 10 * log10(Zi) for dBZ.

rustmatrix.radar.radar_xsect(scatterer, h_pol=True)[source]#

Radar cross-section σ [mm²] for the scatterer’s current geometry.

Parameters:
  • scatterer (Scatterer)

  • h_pol (bool) – True (default) for horizontal polarisation, False for vertical.

Returns:

sigma – Polarised radar cross-section. When scatterer.psd_integrator is set, the PSD-integrated value is returned.

Return type:

float

rustmatrix.radar.refl(scatterer, h_pol=True)[source]#

Linear reflectivity [mm⁶·m⁻³] (a.k.a. Z_h or Z_v).

Parameters:
  • scatterer (Scatterer) – With wavelength in mm and Kw_sqr set. A psd_integrator is optional; without one, the value is for N = 1 particle / m³.

  • h_pol (bool) – Horizontal (default) or vertical polarisation.

Returns:

Z – Linear reflectivity. Convert to dBZ with 10 * log10(Z).

Return type:

float

Notes

Uses the radar convention Z = λ⁴ / (π⁵ |K_w|²) · σ. Wavelengths and diameters must be in mm for the unit to be mm⁶·m⁻³.

rustmatrix.radar.Zi(scatterer, h_pol=True)#

Linear reflectivity [mm⁶·m⁻³] (a.k.a. Z_h or Z_v).

Parameters:
  • scatterer (Scatterer) – With wavelength in mm and Kw_sqr set. A psd_integrator is optional; without one, the value is for N = 1 particle / m³.

  • h_pol (bool) – Horizontal (default) or vertical polarisation.

Returns:

Z – Linear reflectivity. Convert to dBZ with 10 * log10(Z).

Return type:

float

Notes

Uses the radar convention Z = λ⁴ / (π⁵ |K_w|²) · σ. Wavelengths and diameters must be in mm for the unit to be mm⁶·m⁻³.

rustmatrix.radar.Zdr(scatterer)[source]#

Differential reflectivity as a linear H/V ratio.

Convert to dB with 10 * log10(Zdr(...)). Identical to the ratio refl(s, True) / refl(s, False).

rustmatrix.radar.delta_hv(scatterer)[source]#

Backscatter differential phase δ_hv in radians.

Positive for oblate hydrometeors at typical radar wavelengths. Convert to degrees with numpy.degrees.

rustmatrix.radar.rho_hv(scatterer)[source]#

Copolar correlation coefficient ρ_hv (dimensionless, 0–1).

Drops from 1 as the particle population becomes more heterogeneous in shape, orientation, or composition.

rustmatrix.radar.Kdp(scatterer)[source]#

Specific differential phase K_dp in ° per km.

Parameters:

scatterer (Scatterer) – Must be in a forward-scatter geometry (thet0 == thet and phi0 == phi). Wavelength must be in mm.

Returns:

Kdp – Specific differential phase, ° / km.

Return type:

float

Raises:

ValueError – If the geometry is not forward-scatter.

rustmatrix.radar.Ai(scatterer, h_pol=True)[source]#

Specific attenuation A in dB per km.

Parameters:
  • scatterer (Scatterer) – In a forward-scatter geometry, with wavelength in mm.

  • h_pol (bool) – Horizontal (default) or vertical polarisation.

Returns:

A – Specific attenuation in dB / km. Computed from the extinction cross-section via the optical theorem.

Return type:

float