This project has been archived by its maintainers, and is no longer receiving any updates.
twirl
twirl (formerly SpyDust) is a Python package for modeling spinning dust radiation in astrophysical environments. Building upon the IDL SPDUST, it offers enhanced capabilities and corrections for astrophysical research.
For details on the underlying model, see SpyDust: an improved and extended implementation for modeling spinning dust radiation.
Features
- Grain-shape modeling, rotational dynamics, and directional radiation.
- Updated treatments of electric-dipole radiation back-reaction and plasma drag.
- Parallel execution using MPI.
- The retained legacy model at
twirl.legacy.spdust_as_is.
Package layout
twirl.physics: grain properties and physical processes.twirl.model: spinning-dust calculations and SED generation.twirl.analysis: SED fitting, moment expansion, and Stokes analysis.twirl.core: shared numerical and parallel-computing utilities.twirl.legacy.spdust_as_is: the legacy implementation retained for comparison.twirl.data: bundled tables, grouped by physical process.
Requirements
The project requires Python 3.12 or newer. Its declared dependencies are NumPy,
SciPy, and Matplotlib. MPI support uses mpi4py; free-free emission also uses
Pandas.
Installation
Install the project with pip:
pip install .
Or clone this repository and install its dependencies in your environment.
Usage
The following example computes a spectrum for a sample CNM environment:
from twirl.model.spinning_dust import SpyDust
cnm_params = {
"nh": 30,
"T": 100.0,
"Chi": 1,
"xh": 1.2e-3,
"xC": 3e-4,
"y": 0,
"gamma": 0,
"dipole": 9.3,
"line": 7,
}
spectrum = SpyDust(
cnm_params,
min_freq=1,
max_freq=400,
n_freq=200,
single_beta=True,
)
The individual physics, model, and analysis modules can also be imported directly from their corresponding packages.
Bundled data
Reference tables and generated lookup tables are stored under
src/twirl/data/, separated into charge/, collisions/, free_free/,
grains/, infrared/, and plasma/.
Resources
Metadata
Release files for spinor 0.1.0.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spinor-0.1.0.dev0.tar.gz | 1.9 MB | Without provenance | Details for spinor-0.1.0.dev0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spinor-0.1.0.dev0-py3-none-any.whl | Python 3 | none | any | Details for spinor-0.1.0.dev0-py3-none-any.whl |
Total release size: 3.7 MB
Release files / spinor-0.1.0.dev0.tar.gz
| Download URL | spinor-0.1.0.dev0.tar.gz |
|---|---|
| Size | 1.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0c6bb6449177a89874196b9f9af7f8055df46df72e389fe09dd70510580d49f
|
|
BLAKE2b-256 checksum How to use checksums |
6f14ba535ad75bc653ade7728325de308fb2378329a88b49211d3bc8512b0d92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / spinor-0.1.0.dev0-py3-none-any.whl
| Download URL | spinor-0.1.0.dev0-py3-none-any.whl |
|---|---|
| Size | 1.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91631b35ccbd8149c87d0115620f997154b656da3a8b2af0f113c6a2415a01eb
|
|
BLAKE2b-256 checksum How to use checksums |
3d3003ffd964cdc34bebd96b892bdee26652bd8b4b96e788eee1f994fb78f70a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for spinor 0.1.0.dev0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.