Glasses for your spectra
Spectracles is a Python library for inferring properties of IFU/IFS spectra as continuous functions of sky position.
It can also be used as a general-purpose statistical model library that extends equinox to allow for composable models that may have coupled parameters. It also implements some other nice features that are a bit awkward in equinox out of the box, like easily updating model parameters between fixed and varying.
Installation
From PyPI with pip:
pip install spectracles
Or with uv (recommended):
uv add spectracles
From source:
git clone git@github.com:TomHilder/spectracles.git
cd spectracles
pip install -e .
Note: fftw must be installed or the dependency jax-finufft will fail to build.
Features
- Parameter sharing - Couple parameters across model components
- Declarative optimization schedules - Specify which parameters are free/fixed per phase
- Glob patterns - Use wildcards like
"gp.kernel.*"to match parameters - JAX integration - Built on equinox, fully compatible with JAX transformations
- Rich output - Pretty-printed model trees and gradient diagnostics
Documentation
Full documentation: tomhilder.github.io/spectracles
Citation
Coming soon.
License
MIT
Metadata
Release files for spectracles 0.6.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spectracles-0.6.5.tar.gz | 51.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spectracles-0.6.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 115.7 kB
Release files / spectracles-0.6.5.tar.gz
| Download URL | spectracles-0.6.5.tar.gz |
|---|---|
| Size | 51.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9cc0777f42ed6f41d9b9a0698828dcf6ede6584bd3287b435427981f770a5034
|
|
BLAKE2b-256 checksum How to use checksums |
a54bbe0826717157cbb6826edb690f6ef008e53052f0a4d0652c71e43d8649ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 19, 2026.
Transparency logRelease files / spectracles-0.6.5-py3-none-any.whl
| Download URL | spectracles-0.6.5-py3-none-any.whl |
|---|---|
| Size | 64.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
655b23d4f294f54aa186489d2ba0741c64356c7c7f3d2ebb6b04e60114373b4b
|
|
BLAKE2b-256 checksum How to use checksums |
55e9d03b2630968f5507ae53e9aea99c22b1b7c20bc655cfa4f906ad477e9cb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 19, 2026.
Transparency log