Skip to main content

SAJAX — Stellar Activity Grid for Exoplanets in JAX

Tests codecov

SAJAX is a JAX-accelerated reimplementation of SAGE (Chakraborty et al. 2024), a code that models stellar contamination of exoplanet transmission spectra from active regions (ars, faculae) on the stellar surface.

The key innovation over plain SAGE is that SAJAX vectorises the spectral loop with jax.vmap, making it fast on both CPU and GPU without any change to the calling code, and fully differentiable — enabling gradient-based inference with tools like NumPyro or Optax.

Documentation can be found at sajax.readthedocs.io

Installation

pip install sajax

Or in development mode from a local clone. setup_env.sh builds a uv-managed .venv pinned by uv.lock, so every machine gets identical package versions:

git clone https://github.com/SamMerc/sajax.git
cd sajax
./setup_env.sh              # auto-detect: GPU if nvidia-smi sees a device

Useful flags: --cpu / --gpu to override the auto-detection (state --gpu explicitly when provisioning on a GPU-less HPC login node), --docs to add the sphinx dependencies, and --check to report what is already installed.

Run commands in the environment with uv run <cmd> (e.g. uv run pytest), or activate it with source .venv/bin/activate.

Repository layout

sajax/
├── sajax/
│   ├── __init__.py          # public API
│   ├── core.py              # JAX light-curve engine
│   ├── planet.py            # planet orbital dynamics
│   ├── geometry.py          # rotation matrices, coordinate transforms
├── docs/
│   ├── examples/
│   │   ├── introduction.ipynb
│   │   ├── comparison.ipynb
│   │   ├── inference.ipynb
├── tests/
│   ├── test_core.py
│   ├── test_planet.py
├── pyproject.toml
├── .gitignore
└── README.md

Metadata

Release files for sajax 0.5.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 sajax 0.5.0
File Size Uploaded
sajax-0.5.0.tar.gz 103.6 MB Details

Built distribution (wheel)

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

Total release size: 103.6 MB

Release files / sajax-0.5.0.tar.gz

Download URL sajax-0.5.0.tar.gz
Size 103.6 MB
Tags Source
SHA-256 checksum
How to use checksums
5ce0924c9d86453bf326f6df5f51446994c17e10d5ac3eb2725daea32a1202de
BLAKE2b-256 checksum
How to use checksums
f3b0e202cec4b4c1f317dbab009dfb172433ab2e0fec1b14ada4020b79eb51d0
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 Aug 24, 2026.

Transparency log

Release files / sajax-0.5.0-py3-none-any.whl

Download URL sajax-0.5.0-py3-none-any.whl
Size 38.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b9612b3ef0e819238a1fa71ca877405a0cb63c38cb98d5b35a3362b1f9db058
BLAKE2b-256 checksum
How to use checksums
a2c2860b2b9e1253a84a41f6523510f1dd3ea0f0a4615e618e6594945373d960
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 Aug 24, 2026.

Transparency log

Release history Release notifications | RSS feed

1.1

2 release files

1.0.0

2 release files

This release

0.5.0 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.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