Skip to main content

A JAX-based package for calculating supernovae Bandfluxes

Project description

======================================= JAX Bandflux for Supernovae SALT3 model fitting

:Author: Samuel Alan Kossoff Leeney :version: |pypi version| :Homepage: https://github.com/samleeney/JAX-bandflux :Documentation: https://jax-bandflux.readthedocs.io/

.. |PyPI version| image:: https://badge.fury.io/py/jax-bandflux.svg :target: https://badge.fury.io/py/jax-bandflux :alt: PyPI version

.. image:: https://github.com/samleeney/JAX-bandflux/workflows/Tests/badge.svg :target: https://github.com/samleeney/JAX-bandflux/actions :alt: Build Status

JAX-bandflux presents an implementation of supernova light curve modelling using JAX. The codebase offers a differentiable approach to core SNCosmo <https://sncosmo.readthedocs.io/en/stable/>_ functionality implemented in JAX.

Quickstart

Run example analagous to SNCosmo <https://sncosmo.readthedocs.io/en/stable/>_'s "Using a custom fitter" example:

.. code:: bash

pip install jax-bandflux wget https://raw.githubusercontent.com/samleeney/JAX-bandflux/master/examples/fmin_bfgs.py python fmin_bfgs.py

Testing

This repository implements the JAX version of the SNCosmo <https://sncosmo.readthedocs.io/en/stable/>_ bandflux function. Although the implementations are nearly identical, a minor difference exists due to the absence of a specific interpolation function in JAX, resulting in a discrepancy of approximately 0.001% in bandflux results. Tests have been provided to confirm that key functions in the SNCosmo <https://sncosmo.readthedocs.io/en/stable/>_ version correspond with our JAX implementation. It is recommended to run these tests, especially following any modifications.

What is the .airules file?

.airules

The .airules file provides essential context to help language models understand and work with this codebase—particularly for new code that may not be included in model training datasets. It contains detailed information on:

  • Data structures
  • Core functions
  • Implementation constraints
  • Testing requirements

If you are using cursor, rename this file to .cursorrules to enable automatic context integration.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jax_bandflux-0.2.3.tar.gz (16.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jax_bandflux-0.2.3-py3-none-any.whl (16.4 MB view details)

Uploaded Python 3

File details

Details for the file jax_bandflux-0.2.3.tar.gz.

File metadata

  • Download URL: jax_bandflux-0.2.3.tar.gz
  • Upload date:
  • Size: 16.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for jax_bandflux-0.2.3.tar.gz
Algorithm Hash digest
SHA256 a5da57906447aee09b9e1572359704bf93913eb7cd5dfc509e64f24ae168d85d
MD5 9f371bfad59eb00191b691b23b373859
BLAKE2b-256 4bcf5e006bb095ffa630fd857ef9bbb01ad98a5cdcce660bb5c643cc518977e5

See more details on using hashes here.

File details

Details for the file jax_bandflux-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: jax_bandflux-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 16.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for jax_bandflux-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 40a8de240389bac2a7f73ee7242eaac6c9bf3065bbcf3f1e683f0febea6a5872
MD5 239ad55b44e8d895a0964ad341bfa2f5
BLAKE2b-256 3ceedc18ef997bdcf2381ac83e3acd46bef14b3685606cda84a93ea1ff987240

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page