Skip to main content

bayesn-td

BayeSN for strongly-lensed Type Ia supernovae time-delay cosmography.

bayesn-td extends the BayeSN hierarchical SED model to jointly fit multiply-imaged Type Ia supernovae, inferring time delays, magnification ratios, and (optionally) achromatic microlensing effects using JAX/NumPyro.

The method is described in Grayling et al. (2026), MNRAS, 548, 2 (arXiv:2510.11719).

Documentation

Full documentation is hosted at bayesn-td.readthedocs.io.

Installation

pip install .

For development:

pip install -e .

Requirements

  • Python >= 3.11
  • JAX, NumPyro, NumPy, SciPy, pandas, Matplotlib, Astropy, h5py, extinction, ArviZ, ruamel.yaml, tqdm

Usage

A complete working example with simulated LSST photometry of a 3-image lensed SN Ia is bundled in examples/sim_lensed_sn/.

Command line

run_bayesn_td examples/sim_lensed_sn/input.yaml

Python API

from bayesn_td import SEDmodel

model = SEDmodel()
samples = model.fit_lensed_sn(
    photometry='examples/sim_lensed_sn/photometry.ecsv',
    output='results/sim_lensed_sn',
)

See examples/sim_lensed_sn/README.md for the true input parameters used to generate the simulation.

Citation

If you use bayesn-td in your research, please cite Grayling et al. (2026):

@article{Grayling2026,
    title        = {BayeSN-TD: Time Delay and $H_0$ Estimation for Lensed SN H0pe},
    author       = {Grayling, M. and Thorp, S. and Mandel, K. S. and Pascale, M. and Pierel, J. D. R. and Hayes, E. E. and Larison, C. and Agrawal, A. and Narayan, G.},
    journal      = {Monthly Notices of the Royal Astronomical Society},
    volume       = {548},
    number       = {2},
    year         = {2026},
    doi          = {10.1093/mnras/stag340},
    eprint       = {2510.11719},
    archivePrefix = {arXiv},
    primaryClass = {astro-ph.CO},
}

License

MIT

Metadata

Release files for bayesn-td 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bayesn-td 0.1.1
File Size Uploaded
bayesn_td-0.1.1.tar.gz 4.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for bayesn-td 0.1.1
File Interpreter ABI Platform
bayesn_td-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 MB

Release files / bayesn_td-0.1.1.tar.gz

Download URL bayesn_td-0.1.1.tar.gz
Size 4.4 MB
Tags Source
SHA-256 checksum
How to use checksums
8a3232bd5f1e03689bebeac9742c14b781edb44b214592a62105d4fd3fe1e694
BLAKE2b-256 checksum
How to use checksums
1a04bf7700627d60244807b280c6bfac0887167eeca6b8133cd1aa4c3e1d5b6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 17, 2026.

Transparency log

Release files / bayesn_td-0.1.1-py3-none-any.whl

Download URL bayesn_td-0.1.1-py3-none-any.whl
Size 4.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
08401f418408de9a7306616b4f9572c7bc68b784768d94d34299547d6d192acc
BLAKE2b-256 checksum
How to use checksums
67342483eb7cfa2b3caab7882df745557a12d61c686cfa0b96a4fc7f8db4ac1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page