Skip to main content

Crate rustmatrix

Crate rustmatrix 

Source
Expand description

§rustmatrix

Rust-backed T-matrix scattering for nonspherical particles.

This crate is a port of the numerical core of pytmatrix, which itself wraps M. I. Mishchenko’s Fortran T-matrix code.

§Layout

  • quadrature – Gauss-Legendre nodes and weights (port of Mishchenko’s GAUSS).
  • special – spherical Bessel / Hankel functions, real and complex argument (port of RJB, RYB, CJB).
  • wigner – associated Legendre / Wigner d-function helpers (VIG, VIGAMPL).
  • shapes – particle shape functions (RSP1..RSP4), surface-area helpers.
  • mie – closed-form Mie scattering for spheres; used as the axis_ratio=1 reference for parity testing.
  • tmatrix – the general spheroid/cylinder/Chebyshev T-matrix solver (direct port of CALCTMAT, CONST, VARY, TMATR0, TMATR).
  • amplitude – amplitude and phase matrix evaluation (CALCAMPL, AMPL).
  • [pybindings] – PyO3 bindings exposing calctmat / calcampl to Python.

Modules§

amplitude
Amplitude and phase matrix evaluation — port of Mishchenko’s CALCAMPL and AMPL subroutines.
mie
Closed-form Mie scattering for a homogeneous sphere.
quadrature
Gauss-Legendre quadrature — port of Mishchenko’s GAUSS subroutine.
shapes
Particle-shape radii — ports of Mishchenko’s RSP1..RSP4.
special
Spherical Bessel functions — ports of Mishchenko’s RJB, RYB, CJB.
tmatrix
Core T-matrix solver.
wigner
Associated Legendre / Wigner d-function helpers.