Giter VIP home page Giter VIP logo

pandora's Introduction

Logo

Fast open-source exomoon transit detection algorithm

pip Documentation Image Image

Named after the imaginary 5th moon of the gas giant Polyphemus, orbiting Alpha Centauri A, in the film Avatar.

Pandora employs an analytical photodynamical model, including:

  • Stellar limb darkening
  • Full and partial planet-moon eclipses
  • Barycentric motion of planet and moon

To search for moons, Pandora can used with nested samplers, e.g. UltraNest or dynesty. We provide an example workflow. Pandora is fast, calculating 10,000 models and log-likelihood evaluation per second (give or take an order of magnitude, depending on parameters and data). This means that a retrieval with 250 Mio. evaluations until convergence takes about 5 hours on a single core. Scaling with cores is worse than linear. For searches in large amounts of data, it is most efficient to assign one core per lightcurve.

Create transit lightcurve

import pandora
params = pandora.model_params()
params.per_bary = 365.25  # [days] 169.7
# (...) See tutorials for list of parameters
time = pandora.time(params).grid()
model = pandora.moon_model(params)
flux_total, flux_planet, flux_moon = model.light_curve(time)

plt.plot(time, flux_planet, color="blue")
plt.plot(time, flux_moon, color="red")
plt.plot(time, flux_total, color="black")
plt.show()

lc

Create video

With Pandora, you can create transit videos to understand, teach, and explore exomoon transits. Try it out:

video = model.video(
    time=time
    limb_darkening=True, 
    teff=3200,
    planet_color="black",
    moon_color="black",
    ld_circles=100
)
video.save(filename="video.mp4", fps=25, dpi=200)

Videos approximate the true lightcurve as calculated by Pandora very well. They are, however, not pixel-perfect due to the underlying Matplotlib render engine. Klick the image to view the video:

Video

Installation

Install with pip install pandora-moon. If you end up in dependency hell, set up a fresh environment:

conda create -n pandora_env python=3.9
conda activate pandora_env
conda install numpy matplotlib numba 
pip install pandora-moon

For sampling, the following packages will be useful:

conda install cython scipy
pip install ultranest dynesty h5py

Attribution

Please cite Hippke & Heller (2022, A&A in press) if you find this code useful in your research. The BibTeX entry for the paper is:

@ARTICLE{
}


pandora's People

Contributors

hippke avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.