Giter Club home page Giter Club logo

exoplanet-light-curve-analysis's Introduction

This code is no longer being maintained and has been merged into EXOTIC.

The api syntax has remained the same but requires a new import

from elca.tools import ... -> from exotic.api.elca import ...

Exoplanet Light Curve Analyzer

A python 3 package for modeling exoplanet light curves. The transit function is based on the analytic expressions of Mandel and Agol 2002. Estimate parameters and uncertainties using nested sampling.

The data points are color coded to the likelihood value and the contours represent different sigma levels. One sigma uncertainties are reported above each histogram.

Dependencies

  • Numpy, Matplotlib, Cython, Ultranest

Installation

  1. pip install git+https://github.com/pearsonkyle/Exoplanet-Light-Curve-Analysis.git

Examples

Quickstart

import numpy as np
import matplotlib.pyplot as plt

from elca.tools import transit, lc_fitter

if __name__ == "__main__":

    prior = { 
        'rprs':0.05,        # Rp/Rs
        'ars':14.5,         # a/Rs
        'per':3.336817,     # Period [day]
        'inc':86.5,         # Inclination [deg]
        'u1': 0.3, 'u2': 0.1, # limb darkening
        'ecc':0,            # Eccentricity
        'omega':0,          # Arg of periastron
        'tmid':0.75         # time of mid transit [day]
    } 

    # GENERATE NOISY DATA
    time = np.linspace(0.65,0.85,500) # [day]
    data = transit(time, prior) + np.random.normal(0, 2e-4, len(time))
    dataerr = np.random.normal(300e-6, 50e-6, len(time))

    mybounds = {
        'rprs':[0,2*prior['rprs']],
        'tmid':[min(time),max(time)],
        'ars':[13,16], 
        #'inc':[85,87]
    }

    myfit = lc_fitter(time, data, dataerr, prior, mybounds)
    
    for k in myfit.bounds.keys():
        print("{:.6f} +- {}".format( myfit.parameters[k], myfit.errors[k]))

    fig,axs = myfit.plot_bestfit()
    plt.show()

    myfit.plot_triangle()
    plt.show()

Phase curve fitting

examples/phasecurve_fitting.py

examples/interactive_sliders.py

Non-linear limb darkening

examples/transit_nl_fitting.py

examples/Model Comparison.ipynb

Multiple light curve fitting

Fit multiple light curves simultaneously with local and global bounds

Exomoon

Forward model using Kepler's 3rd law

exoplanet-light-curve-analysis's People

Contributors

pearsonkyle 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.