Installation
From PyPI (recommended)
pip install jwspecfit
Or with all optional extras (MCMC backends, abundances, DLA fitter):
pip install "jwspecfit[nuts,mcmc,abund,dla]"
From source (development)
git clone https://github.com/raunaq-rai/jwspecfit.git
cd jwspecfit
pip install -e ".[dev]"
The -e (editable) install is recommended during development so local
edits are picked up without reinstalling.
Optional extras
jwspecfit ships with optional dependency groups. Combine them as
needed (works for both PyPI and editable installs):
pip install "jwspecfit[nuts]" # JAX + NumPyro — recommended MCMC backend
pip install "jwspecfit[mcmc]" # emcee + nautilus + corner + h5py
pip install "jwspecfit[abund]" # PyNEB for chemical abundances
pip install "jwspecfit[dev,nuts,mcmc,abund]" # everything
Extra |
Installs |
Enables |
|---|---|---|
|
|
Test suite and linting |
|
|
NUTS HMC sampler (default backend for |
|
|
|
|
|
Direct-T_e abundance computations in |
Requirements
Python: ≥ 3.10
Core:
numpy,scipy,astropy,matplotlib,tqdm,joblib,plotlyOptional: as listed above
Verifying the install
import jwspecfit, jwspecmcmc, jwspecabund
print(jwspecfit.__version__)
print(jwspecmcmc.__version__)
print(jwspecabund.__version__)
Run the test suite:
pytest tests/ -v
Conda
If you maintain a conda environment (recommended for JWST work so the
pipeline and CRDS tooling sit alongside jwspecfit), create it once:
conda create -n jwst python=3.11
conda activate jwst
pip install -e ".[dev,nuts,mcmc,abund]"