Skip to main content

MeepMeep

Fast Keplerian orbits for exoplanet modelling.

MeepMeep computes Keplerian orbit quantities (transit geometry, projected separations, radial velocities, and phase curves) using 4th-order Taylor expansions around a set of expansion points distributed along the orbit. This makes it up to two orders of magnitude faster than per-point Newton-Raphson while keeping the approximation error well below the photometric noise of current instruments. Optional analytic gradients with respect to the orbital parameters make it suitable for gradient-based inference (HMC, optimisers).

All hot paths are Numba-jitted and can be called directly from your own @njit kernels with no wrapper overhead.

The method is described in Parviainen & Korth (2020), MNRAS 499, 3356.

Installation

pip install meepmeep

The optional backends have their own extras: pip install "meepmeep[jax]" for the experimental JAX backend and pip install "meepmeep[opencl]" for running the OpenCL device functions. MeepMeep needs Python 3.10 or newer.

For a development checkout:

git clone https://github.com/hpparvi/meepmeep.git
cd meepmeep
pip install -e ".[test]"

Quickstart

import numpy as np
from meepmeep import Orbit

o = Orbit(npt=15, ep_placement="ea")
o.set_pars(tc=0.0, p=3.4, a=8.0, i=1.55, e=0.1, w=0.4)   # times in days, angles in radians
o.set_data(np.linspace(-0.15, 0.15, 500))

x, y, z = o.xyz()                       # sky-frame position (R_star); z > 0 toward observer
rv  = o.radial_velocity(k=120.0)        # radial velocity in the units of k

Bind tp=... instead of tc=... to anchor the orbit at periastron passage.

Analytic gradients

o = Orbit(derivatives=True)
o.set_pars(tc=0.0, p=3.4, a=8.0, i=1.55, e=0.1, w=0.4)
o.set_data(times)
x, y, z, dx, dy, dz = o.xyz()           # gradients w.r.t. (tc, p, a, i, e, w, lan), shape (N, 7)

C library

The evaluators are also available as a plain C99 library built from the same sources as the OpenCL backend, with expansion-point placement and the orbit-wide solvers included so it stands on its own. It is built and installed independently of the Python package:

cmake -S c -B c/build
cmake --build c/build
cmake --install c/build --prefix "$HOME/.local"   # meepmeep.h + libmeepmeep

See docs/source/c_library.rst and c/examples/transit.c.

Citing

If MeepMeep contributes to work that leads to a publication, please cite Parviainen and Korth (2020):

@ARTICLE{2020MNRAS.499.3356P,
       author = {{Parviainen}, H. and {Korth}, J.},
        title = "{Going back to basics: accelerating exoplanet transit modelling using Taylor-series expansion of the orbital motion}",
      journal = {Monthly Notices of the Royal Astronomical Society},
         year = 2020,
        month = dec,
       volume = {499},
       number = {3},
        pages = {3356-3361},
          doi = {10.1093/mnras/staa2953},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.3356P},
}

Generative AI policy

MeepMeep grew out of code written for PyTransit from 2019 onwards and published in Parviainen & Korth (2020). That original code was written without AI or LLM assistance. Development since mid-2026 has been assisted by LLMs, mainly Claude Code with the Opus and Fable models.

Contributions developed with LLMs are welcome, but each one needs a human author who oversees the work and takes responsibility for it. Purely agentic contributions, made without human oversight, are not accepted.

License

MeepMeep is released under the GNU General Public License v3.0. See LICENSE for details.

Metadata

Release files for MeepMeep 1.2.1

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

Source distribution (sdist)

Source distribution for MeepMeep 1.2.1
File Size Uploaded
meepmeep-1.2.1.tar.gz 778.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for MeepMeep 1.2.1
File Interpreter ABI Platform
meepmeep-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / meepmeep-1.2.1.tar.gz

Download URL meepmeep-1.2.1.tar.gz
Size 778.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8c21c249032287ba9abf92c0057723c81f5059422d1a5464021c2e8f23f7d930
BLAKE2b-256 checksum
How to use checksums
ccf0a2b71aa64124d12a5c3cd0213c0176ad7a5e534701fea77b84dba9d9c431
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / meepmeep-1.2.1-py3-none-any.whl

Download URL meepmeep-1.2.1-py3-none-any.whl
Size 287.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2af4ccc4cd07c3eae96807e910f439a2265c7d83f7e9d9e678d9adf9fd79b10
BLAKE2b-256 checksum
How to use checksums
33b5081261e869b2e86b4b7988a74a5a4d79dc93000ba6fcc16e3672e8650b68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

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