Skip to main content



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.0.tar.gz (70.1 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.0-cp314-cp314t-win_amd64.whl (465.7 kB view details)

Uploaded CPython 3.14tWindows x86-64

exoplanet_core-0.4.0-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.0-cp314-cp314t-macosx_11_0_arm64.whl (225.7 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

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

Uploaded CPython 3.14Windows x86-64

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

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

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

exoplanet_core-0.4.0-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.0-cp312-cp312-macosx_11_0_arm64.whl (219.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: exoplanet_core-0.4.0.tar.gz
  • Upload date:
  • Size: 70.1 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.0.tar.gz
Algorithm Hash digest
SHA256 6354063acf2e2a6705a7ef08e975612e9f1f30990c539a38ad99d7b2ad331055
MD5 dceebc9cca3c90ba5181c761ed95b315
BLAKE2b-256 3b5fb4eaccf41978fae23dfbbac5ebdfe8d8247d2751ef746675e5677a08cbd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0.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.0-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 d9ca38d88dcf50a778f61f21944325efff92f83e82ab4ba497d8f1fc23dcc1ec
MD5 8cf27aff33e1a86b6a212d7d7a3facba
BLAKE2b-256 d0cb5645c56494092891c6142ce5e17ab777b7e6c3d2646b1c47fd9c35187a83

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0-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.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 25c8d5204f051080e8ebf16c615412b17b31dcf9756ab8c720eec3afa3d696ac
MD5 5d9eb258d84e2bdaa6698485c357d0ed
BLAKE2b-256 60381b81c6fccc336ba742b022bcf438ac2eb42744d5cb77ae7a13111450e66d

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0-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.0-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4302914a4e1cf3389228fd35ef6bdaa223a5180b39d878f8364d2042dc0c63cb
MD5 7fa40615d4dc3312c94ef340b2c78a32
BLAKE2b-256 bd5c052583471e2fd559a3dc288fd94138a3119d41ae4fd4e27dd6414655ebe2

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0-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.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 34905e7bea1b6bcf77b05ecfc1e8712f63db0d3e2a68d92713a54bed2c796825
MD5 7236f80b7a1eb97927d95ee7a03d7b62
BLAKE2b-256 8ea39820a11d09d794f661cd5355a7e71c6c68c32836fae064922695e248ee12

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0-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.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d627995bab59cd42cc56eb12780f3ad154d7c7b68fe067c9bb28569463d4318f
MD5 938748b4870e6c5a2fdf28c48283c9d2
BLAKE2b-256 d1414030908ed0f679d15b6c7454338cdb061d07e720eef435da72b0cde8cf2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0-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.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef7339e60b3e656cc623f8a721ebdb5258f085011e77b01bc91c5c2d338a579f
MD5 b03f6aa3fb63f9edc01acb29c7781a4b
BLAKE2b-256 b187a0b7a401391aa3ebb202f15d6cabecf5e744cfc0697a1b66ee7607106847

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0-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.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 250d33101331423d000d48fb8f3b36f459d4b05643ccc6da55673248065f4fb5
MD5 fd04b3520384068e48674bb0db9d3d27
BLAKE2b-256 231e2f20263db92474e5ad0cd8cfcb5f4a6f6d67363d4055d3806dc1970623c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0-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.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fd36806879bfd9de224f0b32a3b6816b51b967cecd2ab9219f0c8c00c00bc720
MD5 427307513751b906bf39696e3b69491b
BLAKE2b-256 3924de5a59b31662b38a4a33580e92e10b3b8283502f28a7c182a62506ee6728

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0-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.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f9245f8d56d237324d852b4aa8fed57809244d015bfe6acb3b0040e6c44b8365
MD5 c42d267e68ef99337fdd7d557adf09cc
BLAKE2b-256 c5f1109d17ce942794cd173e5376c4dabe9b91ecc84e3acdcd334fd69697cd33

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0-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.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4b7b2e4eaba547444f94546aa85087050a8a76c70b8197165197b6d6c99746d8
MD5 9f6021fd729fda7729ad952449cc976f
BLAKE2b-256 8e8670530bf2f102c561ca8fc1dadeea192dd31516537973f4e7412dc478371d

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0-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.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 edfe7ff129dbfc3e5c9d1ef8a53d3af1cd0b3e8b99950a4eca33a7e28c2a3b2b
MD5 c6184e01be71121ac383b403f1a4db29
BLAKE2b-256 edaade18ef3543e8e9fae9641312ef9e0f87b66e65a759e21ad630987e47e439

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0-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.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9690d600681ff224a7b0bbc5f03631a1db2bffa44712b75842b3a777578d98a3
MD5 41fb53df96418600f0f5f77af0409817
BLAKE2b-256 59ae8cf455e9a429a4a99d257ee748050fda4bf403040281b59d6ed1b8427518

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoplanet_core-0.4.0-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

This release

0.4.0 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