Skip to main content

BayeSN

Hierarchical Bayesian SED modelling of type Ia supernova light curves

Developed and maintained by: Matt Grayling (@mattgrayling), Stephen Thorp (@stevet40), Gautham Narayan (@gnarayan), and Kaisey S. Mandel (@CambridgeAstroStat) on behalf of the BayeSN Team (@bayesn).

About

BayeSN is a probabilistic optical-NIR SED model for type Ia supernovae, allowing for hierarchical analysis of the population distribution of physical properties as well as cosmology-independent distance estimation for individual SNe. This repository contains an implementation of the BayeSN SED model built with numpyro and jax, with support for GPU acceleration, as discussed in Grayling+2024 (arXiv link <https://arxiv.org/abs/2401.08755>, accepted by MNRAS).

Installation and usage

BayeSN can be pip-installed via the command pip install bayesn.

Detailed instructions on how to install and run the BayeSN model can be found here: https://bayesn.readthedocs.io/en/latest/index.html

Support

Our goal with BayeSN is for the package to be clear and easy to use. If you find something unclear, come across any bugs or think of any functionality that would add a lot of value for you, please raise a Github issue.

Citing the code/model

If you utilise the BayeSN model in any way, please cite Mandel+2022 (MNRAS 510, 3, 3939-3966), and if you make use of this code please cite Grayling+2024 (submitted to MNRAS). In addition, if you use any of the pre-trained models included within BayeSN please cite the corresponding papers which present those models:

  • M20 model: Mandel et al. 2022 (MNRAS 510, 3, 3939-3966)
  • T21 model: Thorp et al. 2021 (MNRAS 508, 3, 4310-4331)
  • W22 model: Ward et al. 2023 (ApJ 956, 2, 111)

Things to note

Filters

BayeSN includes a set of built-in filters for convenience, as detailed in the documentation. However, you can also add your own filters through a yaml file to allow for new and updated filter responses to be used without needing a package update.

GPU Acceleration

This code has been designed with GPU acceleration in mind, and running on a GPU should yield a considerable (~100 times) increase in performance. However, it is important to note that GPUs will show the most benefit running large scale jobs. If you want to fit samples of 100s of SNe, the fit time per object will be considerably shorter than fitting just a handful. With only 1 object, you are likely better off running on CPU than GPU.

Redshift requirement

At the present time, BayeSN is designed for use with spectroscopic redshifts, which are kept fixed during inference. However, fitting with redshift as a free parameter based on a photometric redshift prior is feasible and planned in future.

Metadata

Release files for bayesn 0.4.0

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 0.4.0
File Size Uploaded
bayesn-0.4.0.tar.gz 3.4 MB Details

Built distribution (wheel)

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

Total release size: 6.9 MB

Release files / bayesn-0.4.0.tar.gz

Download URL bayesn-0.4.0.tar.gz
Size 3.4 MB
Tags Source
SHA-256 checksum
How to use checksums
c536639ca18d12bfb5d24a5757f86ce03084a43ec076ee684ca03da0ed382519
BLAKE2b-256 checksum
How to use checksums
8f722c428af91a97bda5135895dd4dc0d3fc2004096039b74dedeed8330c7523
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / bayesn-0.4.0-py3-none-any.whl

Download URL bayesn-0.4.0-py3-none-any.whl
Size 3.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
30dc373e4cd556b736e7d8eb4b1f181142fd5a41caa60dd7befc50a99cc35313
BLAKE2b-256 checksum
How to use checksums
047aa249ff3f0b11f713155f27266399deba1893def7e7a9bdb3229968c1565a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.2

2 release files

0.3.0

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