Skip to main content


Documentation Status

Interpretable Gaussian processes for stellar light curves using starry.

A Gaussian Process for Stellar Variability

The starry_process code implements an interpretable Gaussian process (GP) for modeling stellar light curves. Whether your goal is to marginalize over the stellar variability signal (if you think of it as noise) or to understand the surface features that generated it (if you think of it as data), this code is for you. The GP implemented here works just like any other GP you might already use in your analysis, except that its hyperparameters are physically interpretable. These are (among others) the radius of the spots, the mean and variance of the latitude distribution, the spot contrast, and the number of spots. Users can also specify things like the rotational period of the star, the limb darkening parameters, and the inclination (or marginalize over the inclination if it is not known).

The code is written in Python and relies on the Theano package, so a little familiarity with that is recommended. Check out the crash course here. If you would like to report an issue or contribute to the project, please check out CONTRIBUTING.md.

Installation

The quickest way is via pip:

pip install starry-process

Note that the starry_process package requires Python 3.6 or later.

Quickstart

Import the main interface:

from starry_process import StarryProcess

Draw samples from a Gaussian process with small mid-latitude spots:

import numpy as np
import matplotlib.pyplot as plt

# Instantiate the GP
sp = StarryProcess(
  r=10,               # spot radius in degrees
  mu=30,              # central spot latitude in degrees
  sigma=5,            # latitude std. dev. in degrees
  c=0.1,              # fractional spot contrast
  n=10                # number of spots
)

# Draw & visualize a spherical harmonic sample
y = sp.sample_ylm().eval()
sp.visualize(y)

# Compute & plot the flux at some inclination
t = np.linspace(0, 4, 1000)
flux = sp.flux(y, t, i=60).eval()[0]
plt.plot(t, flux)

Same as above, but for high-latitude spots:

sp = StarryProcess(r=10, mu=0, sigma=10, c=0.1, n=10)

Large equatorial spots:

sp = StarryProcess(r=30, mu=0, sigma=10, c=0.1, n=10)

Small, approximately isotropic spots:

sp = StarryProcess(r=10, mu=0, sigma=40, c=0.1, n=10)

For more information check out the full Quickstart tutorial and the complete documentation.

References & Attribution

The code is described in this JOSS paper. It is the backbone of the Mapping Stellar Surfaces paper series, including:

If you make use of this code in your research, please cite

@article{Luger2021a,
  author        = {{Luger}, Rodrigo and {Foreman-Mackey}, Daniel and {Hedges}, Christina and {Hogg}, David W.},
  title         = {{Mapping stellar surfaces I: Degeneracies in the rotational light curve problem}},
  journal       = {arXiv e-prints},
  keywords      = {Astrophysics - Solar and Stellar Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics},
  year          = 2021,
  month         = jan,
  eid           = {arXiv:2102.00007},
  pages         = {arXiv:2102.00007},
  archiveprefix = {arXiv},
  eprint        = {2102.00007},
  primaryclass  = {astro-ph.SR},
  adsurl        = {https://ui.adsabs.harvard.edu/abs/2021arXiv210200007L},
  adsnote       = {Provided by the SAO/NASA Astrophysics Data System}
}
@article{Luger2021b,
  author        = {{Luger}, Rodrigo and {Foreman-Mackey}, Daniel and {Hedges}, Christina},
  title         = {{Mapping stellar surfaces II: An interpretable Gaussian process model for light curves}},
  journal       = {arXiv e-prints},
  keywords      = {Astrophysics - Solar and Stellar Astrophysics, Astrophysics - Earth and Planetary Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics},
  year          = 2021,
  month         = feb,
  eid           = {arXiv:2102.01697},
  pages         = {arXiv:2102.01697},
  archiveprefix = {arXiv},
  eprint        = {2102.01697},
  primaryclass  = {astro-ph.SR},
  adsurl        = {https://ui.adsabs.harvard.edu/abs/2021arXiv210201697L},
  adsnote       = {Provided by the SAO/NASA Astrophysics Data System}
}
@article{Luger2021c,
  author        = {{Luger}, Rodrigo and {Foreman-Mackey}, Daniel and {Hedges}, Christina},
  title         = {{starry\_process: Interpretable Gaussian processes for stellar light curves}},
  journal       = {arXiv e-prints},
  keywords      = {Astrophysics - Solar and Stellar Astrophysics, Astrophysics - Earth and Planetary Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics},
  year          = 2021,
  month         = feb,
  eid           = {arXiv:2102.01774},
  pages         = {arXiv:2102.01774},
  archiveprefix = {arXiv},
  eprint        = {2102.01774},
  primaryclass  = {astro-ph.SR},
  adsurl        = {https://ui.adsabs.harvard.edu/abs/2021arXiv210201774L},
  adsnote       = {Provided by the SAO/NASA Astrophysics Data System}
}

Metadata

Release files for starry-process 0.9.8

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

Source distribution (sdist)

Source distribution for starry-process 0.9.8
File Size Uploaded
starry_process-0.9.8.tar.gz 28.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for starry-process 0.9.8
File Interpreter ABI Platform
starry_process-0.9.8-py3-none-any.whl Python 3 none any Details

Total release size: 51.2 MB

Release files / starry_process-0.9.8.tar.gz

Download URL starry_process-0.9.8.tar.gz
Size 28.4 MB
Tags Source
SHA-256 checksum
How to use checksums
08efa894d60b45a6865be846900484c3f982bc949dbaae304e2216d8e1d6b2fe
BLAKE2b-256 checksum
How to use checksums
5d7aac8850c381acc5dd0ed70dc6a15ffedf9318963c8907794c91c73570ec06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release files / starry_process-0.9.8-py3-none-any.whl

Download URL starry_process-0.9.8-py3-none-any.whl
Size 22.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
80fd242f2a630bbb0b80500a728f4a9c9c4f624afbfbd7731b1820460a4615e6
BLAKE2b-256 checksum
How to use checksums
9bc6b3fdb51c6ace7bd5f09a5d1baaa67b980e91fa1c84144de21c3dd9852c5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release history Release notifications | RSS feed

This release

0.9.8 This release

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

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