Skip to main content

Exomoon transit detection algorithm

Project description

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 be used with nested samplers, e.g. UltraNest or dynesty. We provide an example workflow for a planet+moon injection into Kepler-like data with Gaussian noise, UltraNest+Pandora recovery, cornerplots, and posterior exploration. 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 light curve.

Create transit light curve

The following Python code snippet illustrates how to work with Pandora. To keep it short, it omits the long list of required parameters. A complete and working example can be found here.

import pandoramoon as pandora
params = pandora.model_params()
params.per_bary = 365.25  # [days]
# (...) 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 light curve 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 pandoramoon. As of 2024, there are some incompatibilities with later versions of numba. For now, please use:

conda create -n pandora_env python=3.9
conda activate pandora_env
pip install numpy==1.21 matplotlib==3.5 numba==0.55
pip install pandoramoon

For sampling, the following packages will be useful:

pip install scipy==1.8 cython
pip install ultranest dynesty h5py

Attribution

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

@ARTICLE{2022A&A...662A..37H,
       author = {{Hippke}, Michael and {Heller}, Ren{\'e}},
        title = "{Pandora: A fast open-source exomoon transit detection algorithm}",
      journal = {\aap},
     keywords = {methods: data analysis, planets and satellites: detection, techniques: photometric},
         year = 2022,
        month = jun,
       volume = {662},
          eid = {A37},
        pages = {A37},
          doi = {10.1051/0004-6361/202243129},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2022A&A...662A..37H},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

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

pandoramoon-1.3.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pandoramoon-1.3-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file pandoramoon-1.3.tar.gz.

File metadata

  • Download URL: pandoramoon-1.3.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pandoramoon-1.3.tar.gz
Algorithm Hash digest
SHA256 c8653901a754f8904635d5b3442e1a881a8ceb0d2ec08d03f05efb2dccbd06d9
MD5 47eefb3276c91e2454e10508780fb0ab
BLAKE2b-256 4bab96a546f6bd67ef154beea2a63f40754abc8a2f071b754683af3417aeb4ce

See more details on using hashes here.

File details

Details for the file pandoramoon-1.3-py3-none-any.whl.

File metadata

  • Download URL: pandoramoon-1.3-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pandoramoon-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 48f50c5583c0ddc15b4950b5ba8509259a1b8f00697e49a93507df764b7ade24
MD5 4877a2534b14a12157098205e617695d
BLAKE2b-256 d4f97411850ee1113be8af48e37f7da4da8e941ee931299597ee1c5f152e98c2

See more details on using hashes here.

Supported by

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