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(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.1.2rc1.tar.gz (33.5 kB view details)

Uploaded Source

Built Distributions

exoplanet_core-0.1.2rc1-cp39-cp39-win_amd64.whl (136.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

exoplanet_core-0.1.2rc1-cp39-cp39-macosx_10_9_x86_64.whl (142.9 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

exoplanet_core-0.1.2rc1-cp38-cp38-win_amd64.whl (136.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

exoplanet_core-0.1.2rc1-cp38-cp38-macosx_10_9_x86_64.whl (142.3 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

exoplanet_core-0.1.2rc1-cp37-cp37m-win_amd64.whl (137.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

exoplanet_core-0.1.2rc1-cp37-cp37m-macosx_10_9_x86_64.whl (141.5 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

exoplanet_core-0.1.2rc1-cp36-cp36m-win_amd64.whl (208.3 kB view details)

Uploaded CPython 3.6m Windows x86-64

exoplanet_core-0.1.2rc1-cp36-cp36m-macosx_10_9_x86_64.whl (141.4 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: exoplanet_core-0.1.2rc1.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for exoplanet_core-0.1.2rc1.tar.gz
Algorithm Hash digest
SHA256 594bc9a5f559cb10797e7c3966734337f3832231eca4df1ac27920342f884b98
MD5 8ac26a3e3171efd0c73091d0abb2cb6a
BLAKE2b-256 a9ee445eb37b0e60be4d0626f51305b101d78f370a41753227dbaf62246e6f28

See more details on using hashes here.

File details

Details for the file exoplanet_core-0.1.2rc1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: exoplanet_core-0.1.2rc1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 136.9 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for exoplanet_core-0.1.2rc1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 28bef04ba7320e9bce27756d3c80e1209f599450604892ceb39a6f2770ac442e
MD5 a75d4bb75a8614ab455b5a398bf5196a
BLAKE2b-256 81d6e75d47b060fea7045c1bb104514ed0b46219a100c83b6542b6aa5764d098

See more details on using hashes here.

File details

Details for the file exoplanet_core-0.1.2rc1-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

  • Download URL: exoplanet_core-0.1.2rc1-cp39-cp39-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 208.7 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for exoplanet_core-0.1.2rc1-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fdc517646eae2fad67335877b6837c67b61f467fa4d84b75b56f0ebde06d8da3
MD5 86e1cdc1a4dc1f42d9af5c361d42d9e4
BLAKE2b-256 b2b365be0b575aba64f4747e3859c69a4f9e0392a8b92f60e7d278fc3ea0daa0

See more details on using hashes here.

File details

Details for the file exoplanet_core-0.1.2rc1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: exoplanet_core-0.1.2rc1-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 142.9 kB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for exoplanet_core-0.1.2rc1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 83fe1830d7d9939371823c8e97502c545cd3c77a840e15b1d907df7c61cc221f
MD5 ab5812439d665a9aad7c2f828842fe76
BLAKE2b-256 f2fe64efc12eb984d25d02541be0f175d1f84f07487953822a11b58f2e71f79a

See more details on using hashes here.

File details

Details for the file exoplanet_core-0.1.2rc1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: exoplanet_core-0.1.2rc1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 136.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for exoplanet_core-0.1.2rc1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 bdb475622a43dc124c6e9cf5244a1af90b0bea33f28b8f966a8e3e1cc5fed505
MD5 d7e14605dede25fc7b491f1ff3bf9d9e
BLAKE2b-256 a55da9edfd77ccf2d75f74cf52c5b0bedecb4765875a65adaf0b6f412e980317

See more details on using hashes here.

File details

Details for the file exoplanet_core-0.1.2rc1-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

  • Download URL: exoplanet_core-0.1.2rc1-cp38-cp38-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 208.4 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for exoplanet_core-0.1.2rc1-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 583ce95ff1de63178bbbd8d236668f0a692dc02b1a8db6869ebe072a519cad04
MD5 0a3195a6b605343b3a05cfdf23de1812
BLAKE2b-256 b7e93467a40cb97961d129907711a5315ec5ddbdd5486568036ea6f3bc747d93

See more details on using hashes here.

File details

Details for the file exoplanet_core-0.1.2rc1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: exoplanet_core-0.1.2rc1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 142.3 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for exoplanet_core-0.1.2rc1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 42343cb5e3f719aa51df5a05db1d6205111804ae4398841507fc159551e93dcd
MD5 a2b6fb1fed915af12e82202503574fb5
BLAKE2b-256 123e39fe5190fb40adb249fdfe5f6a39254baef351bd456b996608e382e7aa45

See more details on using hashes here.

File details

Details for the file exoplanet_core-0.1.2rc1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: exoplanet_core-0.1.2rc1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 137.8 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for exoplanet_core-0.1.2rc1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 09140dc5cc3cfad54dd0e9c53c915774b49dd6894eee0aa0d791ce6ac8c6e6da
MD5 951638deb77631209421f442a0708447
BLAKE2b-256 0b6070370a5d498e25ce1f75ac0a3c96cd33daf0f61bec2bda37419c3ed01822

See more details on using hashes here.

File details

Details for the file exoplanet_core-0.1.2rc1-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.1.2rc1-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bddcac7bacb3eacaf1d02ae88a17654cba5552d8670a182a24b463d755134b14
MD5 c565893d05de01f6548e07df47699256
BLAKE2b-256 62c90d58511bd91e2a62e5405b00b5b52fe65f5b9ab5bc62f6108b316c581e7f

See more details on using hashes here.

File details

Details for the file exoplanet_core-0.1.2rc1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: exoplanet_core-0.1.2rc1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 141.5 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for exoplanet_core-0.1.2rc1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 37f7991a1eb69740c3f953d2102f6c4caaf3f4121957f5b6a33396771db91e39
MD5 1695f9a03878af925032166b987662e2
BLAKE2b-256 7fe26ea95630093272d3039f6817787da3a0ac09b207132d12c2bdf9fe4894a0

See more details on using hashes here.

File details

Details for the file exoplanet_core-0.1.2rc1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: exoplanet_core-0.1.2rc1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 208.3 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for exoplanet_core-0.1.2rc1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 2ba71f24b900c21daabcf921a01e030aee5affb7dbd4ef852ad52e0dde8663ec
MD5 ed1a3252b8e36bab8d3935a57e93faaa
BLAKE2b-256 6252dc3b54426e2a78a16fb552f3cde6f1a541f5561a41329ed4fc16f2132190

See more details on using hashes here.

File details

Details for the file exoplanet_core-0.1.2rc1-cp36-cp36m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for exoplanet_core-0.1.2rc1-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0dac79af1e1a9a8b2d673b6eead79e82db194b3a0e25463b99f47177c7d77f8d
MD5 ad4c944db1fae84edf9771cb47239414
BLAKE2b-256 b3133706e586712379786923a99af928de07786880bf983fb9c1f430c5abb85a

See more details on using hashes here.

File details

Details for the file exoplanet_core-0.1.2rc1-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: exoplanet_core-0.1.2rc1-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 141.4 kB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for exoplanet_core-0.1.2rc1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 74603c0cb37e8f14099086b1eee85ad1d1355c5b272e5d31c80619cdcf7fd44f
MD5 1626f8aeddcf13599e5c9045d4282934
BLAKE2b-256 f22b5b4b83fc4563e4408ffb385bb4dca96379fe83c9ec57063fe139c44c0aae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page