Skip to main content

Unified spectrospatial models: glasses for your spectra.

Project description

Tests Coverage PyPI Python Docs


spectracles

Unified spectrospatial models for integral field spectroscopy in JAX

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

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

spectracles-0.6.4.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spectracles-0.6.4-py3-none-any.whl (60.6 kB view details)

Uploaded Python 3

File details

Details for the file spectracles-0.6.4.tar.gz.

File metadata

  • Download URL: spectracles-0.6.4.tar.gz
  • Upload date:
  • Size: 48.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for spectracles-0.6.4.tar.gz
Algorithm Hash digest
SHA256 22380a72214c4c04b40e7d23b29ecb0d48a6d39191c7f7bd12228656fe0d7897
MD5 05ef93a0db0e5be7d367e2ff9b157705
BLAKE2b-256 204938c6ba6d153cff0a912528f3df7a8535e11151127373683fc52a74b3a9da

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectracles-0.6.4.tar.gz:

Publisher: release.yml on TomHilder/spectracles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spectracles-0.6.4-py3-none-any.whl.

File metadata

  • Download URL: spectracles-0.6.4-py3-none-any.whl
  • Upload date:
  • Size: 60.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for spectracles-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a0837e12e8c28f37551a2170194d54941bec4d20b501310c89b8490aed043a46
MD5 afc0098956b795b916bd8d07685f5441
BLAKE2b-256 061b876f8f9b3787a4b8e2a4c41b97c54ba307b315a0a2695d913aebd2aa34bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectracles-0.6.4-py3-none-any.whl:

Publisher: release.yml on TomHilder/spectracles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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