MOSFiT (Modular Open-Source Fitter for Transients) is a Python 3.11+ package for fitting, sharing, and estimating the parameters of transients via user-contributed transient models. This is MOSFiT 2.0. Data for a transient can be provided by the user in a wide range of formats (JSON, ASCII tables, CDS, LaTeX).
See CHANGELOG.md for unreleased work and versioned notes.
Installation
Development installs use uv and Python 3.11+:
git clone https://github.com/guillochon/MOSFiT.git
cd MOSFiT
uv sync
Then run MOSFiT with uv run mosfit ..., or activate .venv.
Published installs are also available via conda and pip. conda-forge will
ship 2.0 after a feedstock update (see recipe/); astrocats >= 0.5.0 must
land on conda-forge first:
conda install -c conda-forge mosfit
or:
pip install mosfit
MPI support (mpi4py) is optional and needs a system MPI library:
uv sync --extra mpi
The SESN SEDONA emulator (sesn_sedona) needs PyTorch. Install that extra with:
uv sync --extra sedona
or, for a published install, pip install 'mosfit[sedona]'. Default models do not require it.
Using MOSFiT
The default sampler is nested sampling with dynesty. Pass local catalog JSON (or ASCII) with -e. Use --max-cores for local process-pool parallelism (no MPI required):
mosfit -e ./my_transient.json -m slsn --max-cores 10
mosfit -e mosfit/tests/PS1-10jh.json -m tde --max-cores 10 -R
Switch to ensemble MCMC with -D ensembler, or UltraNest with -D ultranest. Fits write products under products/ (including walkers.h5, and optionally chain.h5 if run with -c). For detailed instructions, see the documentation on RTD: https://mosfit.readthedocs.io/
Release files for mosfit 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mosfit-2.0.0.tar.gz | 58.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mosfit-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 118.0 MB
Release files / mosfit-2.0.0.tar.gz
| Download URL | mosfit-2.0.0.tar.gz |
|---|---|
| Size | 58.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44e39e50c8ad2f05d5c1874b49984ced5ff44618c5dc01651c6d383dcdd9ab01
|
|
BLAKE2b-256 checksum How to use checksums |
2a909b155bdf5db99e91f591aa29b6d4a1e9cff2f1e45284678bef39f0ca56eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency logRelease files / mosfit-2.0.0-py3-none-any.whl
| Download URL | mosfit-2.0.0-py3-none-any.whl |
|---|---|
| Size | 59.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d5a6418fc3e8edc2d38dad3730a6cc88f2cfa1784a24515767a17dfcd7526de
|
|
BLAKE2b-256 checksum How to use checksums |
8c46fe32134055b2d32da89a24d7502e3e619b7ab5c60cf896a0b049e528176f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency log