Skip to main content

SALTShaker

PyPI version Documentation Status License: BSD

An open-source training framework for the SALT3 spectrophotometric model of Type Ia supernovae.

Overview

SALTShaker trains the SALT3 (Spectral Adaptive Light-curve Template 3) model used for standardizing Type Ia supernovae in cosmological distance measurements. The framework:

  • Trains spectrophotometric models from combined photometry and spectroscopy data
  • In conjunction with SNANA provides a complete pipeline from simulation through cosmological fitting
  • Supports custom survey configurations and filter systems

SALT3 is the successor to SALT2 (Guy et al., 2007; Guy et al., 2010) and has been used in major cosmological analyses including Dovekie, DES5YR, and UNITY.

Features

  • Model Training: Train SALT3 models on your own photometric and spectroscopic datasets
  • Validation Suite: Comprehensive tools to validate trained models against simulations
  • Full Pipeline: End-to-end workflow from BYOSED simulations to cosmological parameter estimation
  • Flexible Configuration: Extensive configuration options for regularization, priors, and optimization
  • Multi-Survey Support: Built-in support for major surveys with K-correction files included
  • JAX Backend: GPU-accelerated optimization using JAX

Installation

pip install saltshaker-sn

From Source

git clone https://github.com/djones1040/SALTShaker.git
cd SALTShaker
pip install -e .

Dependencies

Core dependencies include: numpy, scipy, astropy, jax, sncosmo, emcee, iminuit, matplotlib, pandas

See setup.py for the complete list.

Quick Start

Download Example Training Data

trainsalt -g

This downloads the public SALT3 training dataset to $OSTRICH_INITFILES.

Train a Model

trainsalt -c /path/to/training.conf

Or use the included example configuration:

cd examples/SALT3TRAIN_K21_PUBLIC
trainsalt -c SALT3_training.conf

Use SALT3 for Light Curve Fitting

Once trained (or using the published model), fit supernova light curves with sncosmo:

import sncosmo

data = sncosmo.load_example_data()
model = sncosmo.Model(source=sncosmo.SALT3Source(outputdir))
res, fitted_model = sncosmo.fit_lc(
    data, model,
    ['z', 't0', 'x0', 'x1', 'c'],
    bounds={'z': (0.3, 0.7)}
)
sncosmo.plot_lc(data, model=fitted_model, errors=res.errors)

Documentation

Full documentation is available at saltshaker.readthedocs.io

Model Downloads

  • Latest SALT3 model: Available in the documentation
  • Training data: Included with trainsalt -g or from documentation

Citation

If you use SALTShaker or the SALT3 model, please cite:

Primary SALT3 paper:

Kenworthy et al., 2021, ApJ, 923, 265K arXiv:2104.07795

Additional Publications

Contributing

We welcome contributions! Please:

  1. Report bugs and request features via GitHub Issues
  2. Submit pull requests for bug fixes and enhancements
  3. See the documentation for development setup

License

This project is licensed under the BSD License - see the LICENSE file for details.

Authors

Acknowledgments

SALTShaker builds on the original SALT/SALT2 training code developed by J. Guy. Development has been supported by NASA, DOE, and the Gordon and Betty Moore Foundation.

Metadata

Release files for saltshaker-sn 1.5

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

Source distribution (sdist)

Source distribution for saltshaker-sn 1.5
File Size Uploaded
saltshaker_sn-1.5.tar.gz 22.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for saltshaker-sn 1.5
File Interpreter ABI Platform
saltshaker_sn-1.5-py3-none-any.whl Python 3 none any Details

Total release size: 45.7 MB

Release files / saltshaker_sn-1.5.tar.gz

Download URL saltshaker_sn-1.5.tar.gz
Size 22.7 MB
Tags Source
SHA-256 checksum
How to use checksums
ce726cfe41f1dee81505be5df7fcd8c3f25d085f770d583ca8c767d228bc0050
BLAKE2b-256 checksum
How to use checksums
771bca91abc58132a4574b2599400ae37c9e5a87d7e5badeb85f2a3dda92f336
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.18

Release files / saltshaker_sn-1.5-py3-none-any.whl

Download URL saltshaker_sn-1.5-py3-none-any.whl
Size 23.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
82c15e73b80e767d4d667ff1482400f9576b1ab938b2e178bb83edd25360b2ea
BLAKE2b-256 checksum
How to use checksums
7da248d51595528faef60136e133210c420463c566d9349a37b82daf6513af7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.18

Release history Release notifications | RSS feed

This release

1.5 This release

2 release files

1.4

1 release file

1.3

1 release file

1.2

1 release file

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