CLI reference#
The spectroxide binary provides a command-line interface to the PDE solver.
Output is JSON by default and written to stdout.
cargo run --release --bin spectroxide -- <subcommand> [options]
Subcommands#
solve#
Run the PDE solver for a specific injection scenario.
spectroxide solve <injection-type> [options]
Injection types:
Type |
Required flags |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sweep#
Sweep over injection redshifts with single-burst heating.
spectroxide sweep --delta-rho 1e-5 [--z-start 5e6] [--z-end 1e3]
photon-sweep#
Sweep over injection redshifts for monochromatic photon injection at a fixed frequency.
spectroxide photon-sweep --x-inj 1.0 [--delta-n-over-n 1e-5]
photon-sweep-batch#
Run photon sweeps for multiple injection frequencies in parallel.
spectroxide photon-sweep-batch --x-inj-values 0.5,1.0,3.0,10.0
greens#
Evaluate the Green’s function approximation (no PDE).
spectroxide greens --z-h 2e5 [--delta-rho 1e-5]
info#
Print cosmological parameters and derived quantities.
spectroxide info [--cosmology planck2018]
Solver options#
These flags apply to solve, sweep, photon-sweep, and
photon-sweep-batch:
Flag |
Default |
Description |
|---|---|---|
|
(varies) |
Starting redshift |
|
500 |
Final redshift |
|
(preset) |
Frequency-grid point count. Overrides the active fast/production preset. |
|
Use the high-resolution production grid preset (4000 points). |
|
|
Cap on the adaptive |
|
|
10 |
Cap on the dimensionless Compton optical-depth step (use 3 for |
|
1.0 |
Cap on |
|
Disable double Compton and bremsstrahlung (diagnostic). |
|
|
Operator-split DC/BR instead of coupled Newton iteration. |
|
|
Disable the number-conserving \(T\)-shift subtraction (on by default). |
|
|
5e4 |
Below this redshift the number-conserving correction is suppressed. |
|
Disable automatic grid refinement near photon-injection features. |
|
|
Threads for parallel sweep execution. |
Cosmology options#
--cosmology default|planck2015|planck2018
--omega-b 0.044 --omega-m 0.26 --h 0.71 --y-p 0.24 --t-cmb 2.726 --n-eff 3.046
Individual parameters override the selected preset. The CLI uses the
same convention as the Python API: --omega-b is the fractional
baryon density \(\Omega_b\) and --omega-m is fractional total
matter \(\Omega_m = \Omega_b + \Omega_\mathrm{cdm}\). The CLI
converts to physical densities \(\omega_b = \Omega_b h^2\) and
\(\omega_\mathrm{cdm} = (\Omega_m - \Omega_b)\,h^2\) before
constructing the internal cosmology.
--omega-b and --omega-m must be supplied together — the CDM
density is derived from their difference.
Output options#
Flag |
Description |
|---|---|
|
Output format (default: |
|
Write to file instead of stdout |
Examples#
# Single burst in the mu-era
spectroxide solve single-burst --z-h 2e5 --delta-rho 1e-5
# Dark photon resonance
spectroxide solve dark-photon-resonance --epsilon 1e-9 --m-ev 1e-7
# Decaying particle with Planck 2018 cosmology
spectroxide solve decaying-particle --f-x 7.8e5 --gamma-x 1.1e-10 \
--cosmology planck2018
# Sweep with production grid, save to file
spectroxide sweep --delta-rho 1e-5 --production-grid \
--output sweep_results.json
# Green's function comparison
spectroxide greens --z-h 2e5 --delta-rho 1e-5
# Cosmology info
spectroxide info --cosmology planck2018