Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


planetplanet is a general photodynamical code for modeling exoplanet transits, secondary eclipses, phase curves, and exomoons, as well as eclipsing binaries, circumbinary planets, and more. The code was originally developed to model planet-planet occultation (PPO) light curves for the TRAPPIST-1 system. During a PPO, a planet occults (transits) the disk of another planet in the same planetary system, blocking its thermal (and reflected) light, which can be measured photometrically by a distant observer.

planetplanet is coded in C and wrapped in a user-friendly Python interface. Once installed, generating light curves is as easy as

import planetplanet as pp
import numpy as np
import matplotlib.pyplot as pl

star = pp.Star('A', m = 0.1, r = 0.1, limbdark = [0.4, 0.26])
planet = pp.Planet('b', m = 1, r = 1, t0 = 0., per = 3.)
system = pp.System(star, planet)
time = np.arange(-1., 1., 0.0001)
system.plot_occultation('A', time = 0)
Exoplanet transit light curve

Please check out the documentation or read the paper for more information.


The planetplanet code is now pip-installable:

pip install planetplanet

Alternatively, to install from source:

git clone
cd planetplanet
git submodule init && git submodule update
python develop

Note that you may need to install the GNU Scientific Library. On a Mac, it's as simple as

brew install gsl

Just for fun

Here's a an example of a planet-planet occultation [code]:

Planet-planet occultation

And here's a wacky example of a transit of a circumbinary exomoon [code]:

Circumbinary exomoon