Advanced Modeling of Spinning Dust Radiation
An improved and extended implementation for modeling spinning dust radiation
Comprehensive grain shape modeling • Updated physical processes • MPI parallelisation
SpyDust is a Python package for modeling anomalous microwave emission (AME) from spinning dust grains in astrophysical environments. Building on the original IDL SPDUST code, SpyDust introduces comprehensive grain shape modeling, corrected physics for electric dipole radiation back-reaction and plasma drag, and new tools for spectral analysis and fitting.
The package is described in Zhang & Chluba (2024). The accompanying spectral signatures paper — covering global sensitivity analysis, moment expansion, and SED fitting — is published in MNRAS (2025).
Cylindrical and ellipsoidal grain geometries via the shape parameter $\beta$, with full directional radiation fields and angular momentum transport.
Corrected expressions for electric dipole radiation back-reaction, plasma drag dissipation, and infrared excitation/damping rates.
Log-normal SED fitting, moment expansion perturbation method, full Stokes parameter calculations, and global sensitivity analysis tools.
Computations parallelised via mpi4py for efficient evaluation across grain size distributions and ISM environments.
SpyDust computes the spinning dust emissivity through a modular physics pipeline. For each grain size in the distribution, the code solves for the charge state, excitation/damping rates, and the resulting angular momentum distribution $f(\omega)$, before integrating to obtain the SED.
Grain.py.
charge_dist.py), following Weingartner & Draine (2001b) and Draine & Sutin (1987).
infrared.py), neutral/ion collisions (collisions.py), plasma drag (plasmadrag.py), and H2 formation contribute to angular momentum exchange.
AngMomDist.py, accounting for all excitation and damping.
SED.py, yielding the spinning dust emissivity $j_\nu$ as a function of frequency.
A key innovation in SpyDust is the treatment of non-spherical grain shapes. The shape parameter $\beta$ controls the aspect ratio: small grains ($a < a_2 = 6 \times 10^{-8}$ cm) are modeled as cylinders, while larger grains are ellipsoidal.
Key corrections in SpyDust:
These corrections matter most for small, highly charged grains in strong radiation fields.
The spinning dust SED is well-described by a log-normal model characterised by its peak frequency $\nu_\mathrm{peak}$ and spectral width $\sigma$:
\[j_\nu \;\propto\; \exp\!\left[-\,\frac{1}{2}\left(\frac{\ln\nu - \ln\nu_\mathrm{peak}}{\sigma}\right)^{\!2}\right]\]Using global sensitivity analysis (GSA) and the moment expansion method, we quantify how each environment and grain parameter influences these spectral features — and identify fundamental degeneracies.
Large ensembles of spinning dust models generated across realistic ISM conditions. Comparing these ensembles with observed AME sources reveals which parameter combinations are consistent with the data and which degeneracies remain.
pip install SpyDust --no-deps
Or install from source
git clone https://github.com/zzhang0123/SpyDust.gitcd SpyDustpip install -e . --no-deps
Dependencies: numpy (<2.4), scipy, mpi4py (required); pandas (optional, for free-free emission).