SALTShaker
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
From PyPI (recommended)
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 -gor 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
- Pierel et al., 2021 - BYOSED simulation framework
- Pierel et al., 2022 - Near-infrared SALT3 extension
- Dai et al., 2023 - Pipeline validation
- Jones et al., 2023 - Host-mass dependent model
Contributing
We welcome contributions! Please:
- Report bugs and request features via GitHub Issues
- Submit pull requests for bug fixes and enhancements
- See the documentation for development setup
Pull requests run the test suite and a training regression check, which trains about 100 SNe from the Pantheon+ example with the base branch and with the pull request on the same runner and fails if any SN's x0, x1, c or t0 differs beyond its tolerance. To compare two trainings yourself:
python -m saltshaker.validation.comparesnparams new/salt3train_snparams.txt old/salt3train_snparams.txt
License
This project is licensed under the BSD License - see the LICENSE file for details.
Authors
- David Jones (dojones@hawaii.edu)
- D'Arcy Kenworthy
- Rick Kessler
- Mi Dai
- Justin Pierel
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.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| saltshaker_sn-1.6.tar.gz | 22.7 MB | Without provenance | Details for saltshaker_sn-1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| saltshaker_sn-1.6-py3-none-any.whl | Python 3 | none | any | Details for saltshaker_sn-1.6-py3-none-any.whl |
Total release size: 45.8 MB
Release files / saltshaker_sn-1.6.tar.gz
| Download URL | saltshaker_sn-1.6.tar.gz |
|---|---|
| Size | 22.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55d9a8ead1c4ab2038695ca7426f989768056cf4288f0b212e8938e5702c90ee
|
|
BLAKE2b-256 checksum How to use checksums |
0f42dd16c0731e90e4f3b5ebf0bf18fe7cea1e54c7e4ff97a1c34ae87e9a3c9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Release files / saltshaker_sn-1.6-py3-none-any.whl
| Download URL | saltshaker_sn-1.6-py3-none-any.whl |
|---|---|
| Size | 23.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3647a9a994753431a531bd4f0f3e6a8e4bc0a9d487eefe6a82a574281889aee0
|
|
BLAKE2b-256 checksum How to use checksums |
e9de70b942cfc228106983a41f75ba7b45a23cc21a5d0db54a61e0fdeb3c8ba8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Security for saltshaker-sn 1.6
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.