Skip to main content

The compiled backend for exoplanet

Project description



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.

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

exoplanet_core-0.4.0rc1.tar.gz (68.4 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.0rc1-cp314-cp314t-win_amd64.whl (465.0 kB view details)

Uploaded CPython 3.14tWindows x86-64

exoplanet_core-0.4.0rc1-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (271.5 kB view details)

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

exoplanet_core-0.4.0rc1-cp314-cp314t-macosx_11_0_arm64.whl (224.9 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

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

Uploaded CPython 3.14Windows x86-64

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

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

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

exoplanet_core-0.4.0rc1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (266.4 kB view details)

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

exoplanet_core-0.4.0rc1-cp312-cp312-macosx_11_0_arm64.whl (218.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: exoplanet_core-0.4.0rc1.tar.gz
  • Upload date:
  • Size: 68.4 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.0rc1.tar.gz
Algorithm Hash digest
SHA256 349b194436f98e20741d00832cd778c8f28768e6f1f8a498ad4c16acbec7a5da
MD5 0a045d6f8a3345419a91bce777f74a58
BLAKE2b-256 125fff14142cf10a03f8e9b27f26c2992b3f1c2a57b9801370a7083777629242

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 f88179f1dee95b113c38bdd954558a0988aad2980b22f20bb61769dd37821384
MD5 d2314bba0deb3c3cac40949b139ed1bf
BLAKE2b-256 f0fbf145bd8a1e7b288fc17ca583ffa1b14a939646936a4ef6203588c18392ce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc1-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a9ab2b544ba3e05d9bf1db1f1d406642071975f853c89536d19b6b1ca3dda7c7
MD5 32ad09611f98e2bbc49bb78283cbef6b
BLAKE2b-256 0105bc4af581082521e87858a9e7ed6ee16c31f7b312030e8affdeb0a3086f91

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc1-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 995cec11d71e53a4173f440442f515c0dc97e8da5de6d688de86061b35f96b6f
MD5 af5204e1bc5acef149fe9257ef20f8d0
BLAKE2b-256 77294cc390de33de4536f68007ca000a1807584849bb71050edc0c77858dbca2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 468d263e976f8ecf828efc8af1279a7648966502cf75f12a960d7826e73b910a
MD5 8ad0469a0469b50655443fe64e358ce4
BLAKE2b-256 bdc090eb97a228f06f683f66cc0d407057a8d4fe26a7fb5d00471ff1b14e50a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dbda0a7caf45bbc93027be0e62fc39cd5b5c688c57ef159da47db942bab48377
MD5 3574d87f99e58b5a163d6150ec65c0da
BLAKE2b-256 a60c2d45c5ff7c0eb5db02a698f217e1f4e12b9ddc96fdaf15fe1ac8a0ca51a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e58fa5c1af7aa6fe9ea58e76eaedf45ac7184ddfac6d498b3677519a0731d50
MD5 769d5e270a9008ae24140195b4e64af9
BLAKE2b-256 a1b1a129e248387f3fc4a8be1c7b285712a38d79c3f1916df668febeb8f5d28e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b3180d2bc90508e1fe84f10f1fd235921fc036948ac22177d6681ecf162588b0
MD5 81cbb34f99c686673d5910963316e5ff
BLAKE2b-256 dbb3aadb5018198db3d2a59fd29adbf5afb56a5c820e7b14f72bc38afefd6b5b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 afd98a13c4aeaff0a12ac863bc814f80ba5c6fe0062fca38056e32a459629710
MD5 6229d3bab7481a448b9f74f19e262bc1
BLAKE2b-256 54f1f29523230ff59afdfa08eced7bee780b38d0099c5364541690d641a8ff93

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a7d8fcc41531b46d1f70c0b18e966d5af493a43ec5f606c996fae61820d0db5b
MD5 737c8ee56a1b342892bec3a69c311153
BLAKE2b-256 2439af9e1085075d2652a2edd452121b10e33d9dd245b146d03d3bf3e805ff6b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6685d1fb16cb584f2fbaf433007785020b0dea8c18f755683102170532d8ef19
MD5 a7afd081e0ea866f7eaff66bc54a918d
BLAKE2b-256 7d85010381537351b573d8aa232c37cc138d13360f8a488476287444bb7daac2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 421bde3e16fd27815726db227ecc70bb5255c0dce7ea2f8f43ff8f21c98caae4
MD5 ab7ab7e7c12ba3d7d9467791724c7b27
BLAKE2b-256 9f74ee87f5d3ba9a3b62289097bf79e103a88f010cd2d3d818bfbe4edd02d6f2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for exoplanet_core-0.4.0rc1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f00239831403a4033b1d7b9490fc7fc0e6584e72b93e092f2f6b69424fa55cd0
MD5 56ddb1562b14651fe50eea005844f278
BLAKE2b-256 eded687c49625383f032cb050946672de3912a875d2c50d7e6c5cdb939e8c7c8

See more details on using hashes here.

Provenance

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

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