https://github.com/rodluger/planetplanet
A general photodynamical code for exoplanet light curves
https://github.com/rodluger/planetplanet
binary-stars exomoons exoplanet-transits exoplanets light-curves
Last synced: 10 months ago
JSON representation
A general photodynamical code for exoplanet light curves
- Host: GitHub
- URL: https://github.com/rodluger/planetplanet
- Owner: rodluger
- License: gpl-3.0
- Created: 2017-05-09T23:33:16.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T22:59:13.000Z (about 8 years ago)
- Last Synced: 2024-05-22T04:31:58.438Z (about 2 years ago)
- Topics: binary-stars, exomoons, exoplanet-transits, exoplanets, light-curves
- Language: Python
- Homepage: https://rodluger.github.io/planetplanet
- Size: 68.9 MB
- Stars: 42
- Watchers: 6
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview
`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
```python
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.compute(time)
system.plot_occultation('A', time = 0)
pl.show()
```
Please check out the [documentation](https://rodluger.github.io/planetplanet/index.html) or read the [paper](https://rodluger.github.io/planetplanet/PPOs.pdf) for more information.
# Installation
The `planetplanet` code is now `pip`-installable:
```
pip install planetplanet
```
Alternatively, to install from source:
```
git clone git@github.com:rodluger/planetplanet.git
cd planetplanet
git submodule init && git submodule update
python setup.py develop
```
Note that you may need to install the [GNU Scientific Library](https://www.gnu.org/software/gsl/). 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]**](https://github.com/rodluger/planetplanet/blob/master/scripts/occultation.py):
And here's a wacky example of a transit of a circumbinary exomoon [**[code]**](https://github.com/rodluger/planetplanet/blob/master/scripts/circumbinary_exomoon.py):