Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.



Tests

exoplanet-core

This repository contains the compiled components for the exoplanet project, with implementations for NumPy, JAX, and PyMC3. Most users probably won't install or interact with exoplanet-core directly, instead using it via exoplanet itself. However, there are a few reasons why you might be here:

  1. You want to evaluate a quadratically limb darkened light curve or solve Kepler's equation in numpy, JAX, or PyMC3, using fast and well-tested code.
  2. You might have found an issue with one of the compiled ops for exoplanet and want to report or fix it.
  3. You might be looking to build a better alternative to exoplanet.

All of these are excellent reasons to be here, so welcome!

Motivation

This library is developed separately from the exoplanet codebase for several reasons, but the main one is that the code in this repo needs to change at a less frequent cadence than the main exoplanet modeling code and there is some cost associated with re-compiling the backend. I'm hoping that this separation will make it easier for people to contribute to the exoplanet project without dealing with compilation issues. This also means that some users can use just the computational components here without the heavy dependencies required by the exoplanet project. This might be useful, for example, for people who just want a high performance solver for Kepler's equation or fast quadratically limb-darkened light curves.

Installation

The best way to install exoplanet-core is using pip:

python -m pip install exoplanet-core

By default this will only install the numpy ops and its dependencies (only numpy itself). So if you want to install the dependencies for the jax or pymc versions, you can run:

python -m pip install "exoplanet-core[jax]"
# or
python -m pip install "exoplanet-core[pymc]"

You can also install exoplanet-core using conda from conda-forge:

conda install -c conda-forge exoplanet-core

Usage

If you're developing new ops or fixing existing ones, you'll probably want to skip to the next section, but if you just want to solve Kepler's equation or compute a limb darkened light curve, you can use the following snippets.

To solve Kepler's equation and compute the true anomaly for an array of eccentricities:

from exoplanet_core import kepler

ecc = 0.3
M = # compute the mean anomaly as a function of time for your measurements

sinf, cosf = kepler(M, ecc)

# Use the true anomaly to evaluate your model

To compute the relative flux for a quadratically limb darkened light curve at some projected center-to-center distance b and radius ratio ror:

from exoplanet_core import quad_limbdark_light_curve

u1, u2 = 0.3, 0.2
ror = 0.05
b = # Compute the impact parameter as a function of time
flux = quad_limbdark_light_curve(u1, u2, b, ror)

where u1 and u2 are the usual limb darkening parameters and the resulting flux is in relative units where 0 is the unocculted flux. Some other implementations that you might be familiar with return this value plus one.

API Reference

exoplanet-core currently provides three ops, but only two are intended for general consumption: kepler and quad_solution_vector. The three interfaces (numpy, jax, and pymc) are designed to have the same API, so you can import them interchangeably as:

from exoplanet_core.{interface} import ops

where {interface} is numpy, jax, or pymc.

kepler

sin_true_anomaly, cos_true_anomaly = ops.kepler(mean_anomaly, eccentricity)

Solve Kepler's equation and convert to the true anomaly using a fast method (Brandt et al., in prep) that gives nearly machine precision across the full valid parameter range.

Parameter Type Description
mean_anomaly array This does not need to be range reduced.
eccentricity array Must be in the range [0, 1).
Returns Type Description
sin_true_anomaly array The sine and cosine of the true anomaly
cos_true_anomaly array evaluated at the input coordinates.

quad_solution_vector

soln = ops.quad_solution_vector(impact_parameter, radius_ratio)

Compute the "solution vector" as defined by Agol et al. (2020) for a quadratically limb darkened light curve. This can then be dotted into a vector of coefficients (a function of the usual limb darkening parameters) to compute the integrated flux.

Parameter Type Description
impact_parameter array The projected center to center distance.
radius_ratio array The radius of the occulter in units of the target.
Returns Type Description
soln array The quadratic solution vector at each impact_parameter.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exoplanet_core-0.4.0rc2.tar.gz (69.6 kB view details)

Uploaded Source

Built Distributions

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

exoplanet_core-0.4.0rc2-cp314-cp314t-win_amd64.whl (465.8 kB view details)

Uploaded CPython 3.14tWindows x86-64

exoplanet_core-0.4.0rc2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (272.3 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

exoplanet_core-0.4.0rc2-cp314-cp314t-macosx_11_0_arm64.whl (225.8 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

exoplanet_core-0.4.0rc2-cp314-cp314-win_amd64.whl (458.4 kB view details)

Uploaded CPython 3.14Windows x86-64

exoplanet_core-0.4.0rc2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (267.6 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

exoplanet_core-0.4.0rc2-cp314-cp314-macosx_11_0_arm64.whl (219.9 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

exoplanet_core-0.4.0rc2-cp313-cp313-win_amd64.whl (445.5 kB view details)

Uploaded CPython 3.13Windows x86-64

exoplanet_core-0.4.0rc2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (267.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

exoplanet_core-0.4.0rc2-cp313-cp313-macosx_11_0_arm64.whl (219.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

exoplanet_core-0.4.0rc2-cp312-cp312-win_amd64.whl (445.4 kB view details)

Uploaded CPython 3.12Windows x86-64

exoplanet_core-0.4.0rc2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (267.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

exoplanet_core-0.4.0rc2-cp312-cp312-macosx_11_0_arm64.whl (219.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file exoplanet_core-0.4.0rc2.tar.gz.

File metadata

  • Download URL: exoplanet_core-0.4.0rc2.tar.gz
  • Upload date:
  • Size: 69.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for exoplanet_core-0.4.0rc2.tar.gz
Algorithm Hash digest
SHA256 f74c6c4687f192859866e41190dd60b3c99f22680a211e5f73129582b5cb5746
MD5 0dfab75eab468070533947398a8b2991
BLAKE2b-256 611a83936277e085e9c494dcb39b0e7439ceed7e21b59359d8b0e5c41ecee796

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2.tar.gz:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

File details

Details for the file exoplanet_core-0.4.0rc2-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc2-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 0fbc1736f1d70ed3ade1b1ed5d6509bb2908bfd9eadf379a4ca5f0ff472c0bb8
MD5 69a6b94db62a4892ebed7ef09f848a4c
BLAKE2b-256 7fb5e46a7d674196d31c69635428385934325ed126bfbe8d0f86ef795bcfb232

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2-cp314-cp314t-win_amd64.whl:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

File details

Details for the file exoplanet_core-0.4.0rc2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 721b7a81f35d9b3557f126b77843417be57edf6745dfcec7a724587c4a53de4f
MD5 460e5e976b2b55c901cf7905b81601d7
BLAKE2b-256 7957668e709b43f68f98a712a28c61a6e2768038923572d3202ec22a43fb91ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

File details

Details for the file exoplanet_core-0.4.0rc2-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc2-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fd10b627759b10005d5a94c2f36ac0db21fbcb9a628ac077ceed5a14339325d2
MD5 7371434a422e46f8a6a41012a3144f5c
BLAKE2b-256 47dbb7b9ec15d801f998a9b3e13a0d929dfdfe52f34740b9085610718d107bdc

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2-cp314-cp314t-macosx_11_0_arm64.whl:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

File details

Details for the file exoplanet_core-0.4.0rc2-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 e7ad2e1e0b59e995a8b367fab68e63f5640a63f04e91114c94ad8dbb07ee827c
MD5 950cad62a240a75332f42d908bbbfbe6
BLAKE2b-256 03b48646db4cba78f48fa252073ef5674468d10f99e96e8c28fe871b60dc03c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2-cp314-cp314-win_amd64.whl:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

File details

Details for the file exoplanet_core-0.4.0rc2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4d65312c444aaae118b9a553142a464d5628aaffcea96e2fb7de23f46be43193
MD5 b557727b5e1cad5da4afeb8808841508
BLAKE2b-256 29bd6f7df6639c6b95c586f33842b7bff0c7c4d63591edb17069796d8498b931

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

File details

Details for the file exoplanet_core-0.4.0rc2-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc2-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 37a4363c3d6d393dfe2c65508c44cbe3a0f1fa62fa31feb419a0a72d82733697
MD5 504892260d0d2e4faff999771e2b6aea
BLAKE2b-256 e4972e6f4a7d9a85fa34b386ff1ab9615737c5229fd4867b08ed564c57406ef6

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

File details

Details for the file exoplanet_core-0.4.0rc2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f2d904aec082c350b6edebbf8d29b694a15f0d038e62b8fc81394f8db873246b
MD5 cbe4f7cd5180336e77855833642ff168
BLAKE2b-256 8449feeacd2692a8f29a263b44ed04d7a533ef749ed0a117078bc8b814d89c5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

File details

Details for the file exoplanet_core-0.4.0rc2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dfbc6f7f666eab46463b4831854ca23495a0c69fb266be5bc7c5ac92791127d3
MD5 19357e2d232128bbed27f5cd3f42e722
BLAKE2b-256 de2680bb7ffe5d460179229b5d3b70559d9292e7afddeb74fcf6a2a70b7f24dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

File details

Details for the file exoplanet_core-0.4.0rc2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a80038568d94cb06799ae61e8342499b75805f36072fb6aa4c1e3d68f460b047
MD5 cceec460b4ecaa1203ad71f44f2a3b31
BLAKE2b-256 edb3a263d1d54ddfd2c48dcdb04c401765e4f64c7159ca27517fda61a1431fe0

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

File details

Details for the file exoplanet_core-0.4.0rc2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5a1f782f32972c169734de69b6da35111c4be3861a984925aa918aaf3cf699ed
MD5 f60c213b4adc9f9e42c73aebdf173303
BLAKE2b-256 f7699c86e6806a97b7452d8dd83d143c7dc7871c26b1d5b2229927649a42fd64

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

File details

Details for the file exoplanet_core-0.4.0rc2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dfd125a9f10473e0b7e021433466639a209c0854996d22a419b3259ea2f83db0
MD5 fbb0db3b29f4c2c88be5bc49a39c95d7
BLAKE2b-256 3765de11d0280ffaa01de0ed892b81ddc902a1b054d1b4aa5718af350ce1cac0

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

File details

Details for the file exoplanet_core-0.4.0rc2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd79833dda739f7a439f905b46d170d28ebcde4c5bf7368566d0c0eda5f764c9
MD5 5655c364b86bb85c13998fda4372d833
BLAKE2b-256 0c17ddd4c075bb84e24bd70d7275c90eaf5b8c71f73589e5dc3d991de0742368

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0rc2-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yml on exoplanet-dev/exoplanet-core

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

Release history Release notifications | RSS feed

0.4.0

13 files

This release

0.4.0rc2 This release

13 files

0.3.1

17 files

0.3.0

27 files

0.2.0

27 files

0.1.2

13 files

0.1.1

13 files

0.1.0

13 files

0.0.1

16 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