spotgp
spotgp: Gaussian Process kernels for stellar starspot variability implemented in JAX.
spotgp provides a GP kernel for photometric stellar variability that is derived
analytically from a model of starspots on a differentially rotating star, so that
every kernel hyperparameter is a physical quantity: the equatorial rotation period,
differential rotation shear, stellar inclination, spot lifetime and emergence/decay
timescale, and amplitude. It is aimed at researchers fitting Kepler, K2, TESS,
or ground-based light curves who want physically interpretable spot and rotation
parameters with calibrated uncertainties. The package includes a matched forward
light-curve simulator, a banded Cholesky GP solver that scales as O(N b²), analytic
marginalization of per-segment flux offsets, composable kernel terms, and interfaces
to gradient-based (BlackJAX) and nested (dynesty) samplers. Full documentation and
tutorials are at https://spotgp.readthedocs.io.
Installation
From PyPI
pip install spotgp
From source
git clone https://github.com/jbirky/spotgp.git
cd spotgp
pip install -e .
Optional extras
Install all optional features (PGM rendering, jaxopt, and the spectral
contrast model with pyphot + Korg.jl) in one shot:
pip install "spotgp[extras]"
Or pick individual extras:
pip install "spotgp[pgm]" # daft PGM rendering
pip install "spotgp[jaxopt]" # jaxopt optimizers
pip install "spotgp[spectral]" # pyphot bandpasses
pip install "spotgp[korg]" # pyphot + Korg.jl model atmospheres
Alternatively, clone the repo and add it to your Python path:
git clone https://github.com/jbirky/spotgp.git
echo 'export PYTHONPATH="$PYTHONPATH:/path/to/spotgp"' >> ~/.bashrc
source ~/.bashrc
Quick example
import jax.numpy as jnp
from spotgp import (TrapezoidSymmetricEnvelope, VisibilityFunction,
SpotEvolutionModel, GPSolver)
model = SpotEvolutionModel(
envelope=TrapezoidSymmetricEnvelope(lspot=20.0, tau_spot=5.0), # spot lifetime [d]
visibility=VisibilityFunction(peq=5.0, kappa=0.2, inc=jnp.radians(60.0)),
sigma_k=0.01,
)
gp = GPSolver(t, flux, flux_err, model) # t, flux, flux_err: 1-D arrays
print(gp.log_likelihood())
See the quickstart for fitting, sampling, and plotting.
Tests
pip install pytest
JAX_PLATFORMS=cpu pytest tests/
Contributing, support, and citing
Bug reports and feature requests are welcome on the
issue tracker; see
CONTRIBUTING.md for development setup, testing, and the
pull-request process. If you use spotgp in your research, please cite it using
the metadata in CITATION.cff. spotgp is released under the MIT
licence (see LICENSE).
Metadata
Release files for spotgp 1.4.0
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 |
|---|---|---|---|---|
| spotgp-1.4.0.tar.gz | 274.1 kB | With provenance | Details for spotgp-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spotgp-1.4.0-py3-none-any.whl | Python 3 | none | any | Details for spotgp-1.4.0-py3-none-any.whl |
Total release size: 501.9 kB
Release files / spotgp-1.4.0.tar.gz
| Download URL | spotgp-1.4.0.tar.gz |
|---|---|
| Size | 274.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
993c1cced3eefd561f0de6285a7ba2a2ba4b3c76948577191c9200bc3ca16f66
|
|
BLAKE2b-256 checksum How to use checksums |
59e27e277ffb731ec64d6ef3eca316a9d3c46292df7e73fd078c9a1dce72887f
|
| 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 Oct 14, 2026.
Transparency logRelease files / spotgp-1.4.0-py3-none-any.whl
| Download URL | spotgp-1.4.0-py3-none-any.whl |
|---|---|
| Size | 227.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26190bf0f858b5c0f6d0e101f248ff986a76f4761e43a67a7b8bb8cf8c832dda
|
|
BLAKE2b-256 checksum How to use checksums |
a9d384527c37e3e0c167c5a269166dae972992d87920a9816a5f013b1ab9d848
|
| 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 Oct 14, 2026.
Transparency logSecurity for spotgp 1.4.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for spotgp-1.4.0.tar.gz
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 Oct 14, 2026.
Transparency logA 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.