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.3.1.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.3.1-py3-none-any.whl (16.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jax_bandflux-0.3.1.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.3.1.tar.gz
Algorithm Hash digest
SHA256 1a95d46e51f96ca43f39b3e51490dae2f7850fffbd39d82db5d4d1bbf963068e
MD5 f651d66681ddd041a9c9319b065fc6d1
BLAKE2b-256 62aa74b53ab56a5c0eaca93719e44f9fb46b7c5a928f5524c0272b5091318143

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jax_bandflux-0.3.1-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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 81d123a97cff6000e8f5b1c1f94413873d74b3a0b1cefec30299ef872ddcb38c
MD5 fdc9c6ff06612dc076b6fc5101718421
BLAKE2b-256 ebb9291841f2f6185e37d43e86dc8fc85a26d64d050e4dc17a058febff131490

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