Skip to main content

COde for exoplaNet ANalysis

Project description

Python package PyPI - Python Version Upload Python Package PyPI - Version

Static Badge

CONAN

COde for exoplaNet ANalysis: A flexible bayesian framework for modeling heterogeneous exoplanet data


CONAN (COde for exoplaNet ANalysis) is an open-source Python package to perform comprehensive analyses of exoplanetary systems. It provides a unified framework for simultaneous modeling of diverse observational data including photometric transit light curves, occultations, phase curves, and radial velocity measurements. It is designed to be flexible, easy to use, and fast.

It is developed and maintained at the Observatory of Geneva, Switzerland under the MIT license.

Key features:

  • Multi-dataset analysis: Seamless analysis of combined lightcurve (LC) and radial velocity (RV) datasets from various instruments (see Notebooks: 1, 2 ).
  • Multiplanet support: Simultaneous fit to multiple planets in a single system (see Notebooks: 2, 3).
  • Comprehensive photometric modeling: Robust modeling of transits, occultations, and phase curves, including effects such as ellipsoidal variations and Doppler beaming (see Model definition and Notebooks: 6, 7).
  • Modeling time- and wavelength-dependent signals: Analysis of light curves with transit timing variations (TTVs) and transit depth variations (transmission spectroscopy) (see Notebooks: 3).
  • Flexible baseline and noise modeling: Selection of one or combination of polynomial, sinusoidal, multi-D Gaussian Processes (GP), and 2-D spline functions for data detrending (see Notebooks: 1, 2, 3, 4 ).
  • Extensible and customizable modeling: Users can easily incorporate new LC and RV models or modify default ones to suit specific needs, e.g., modeling the transit of non-spherical planets, Rossiter–McLaughlin signals, complex baselines, or even non-planetary signals (see Notebook: 6).
  • Robust Bayesian inference: Parameter estimation and/or model comparison via nested sampling with dynesty or Markov-Chain Monte Carlo sampling with emcee.
  • Derivation of priors on limb darkening coefficients: Derive priors for the quadratic limb darkening coefficients from the stellar parameters using ldtk (see Notebooks: 5).
  • Automated selection of parametric model parameters: Uses the Bayesian Information Criterion to suggest best combination of cotrending basis vectors to use in decorrelating the data (see Notebooks: 5).
  • Science data download: Built-in support for downloading data from various instruments (including TESS, CHEOPS, Kepler, and K2) and also system parameters from NASA Exoplanet Archive (see Notebooks: 2, 3).
  • Quick result visualization and manipulation: Instant plot of the best-fit model and a result object that can be easily manipulated for customized analysis (see Notebooks: 2, 5).

The full documentation can be accessed at https://conan-exoplanet.readthedocs.io. The github wiki details specific CONAN functionalities

Installation

To avoid requirement conflicts with other packages, it is better to create a new environment (or clone a current environment) to install CONAN

To create a new environment:

conda create -n conan_env python=3.10

then

conda activate conan_env

CONAN can be installed using different methods:

1) Installing from PyPI:

pip install conan-exoplanet

2) Downloading the source files from github:

git clone https://github.com/titans-ge/CONAN.git
cd CONAN 

then running

pip install .

3) Installing directly from github using pip

pip install git+https://github.com/titans-ge/CONAN.git

Note that a folder 'src' is created where the CONAN source files are downloaded to before installation.


If having troubles compiling the fortran code used for the transit model, set NO_FORTRAN=True in terminal before pip installing. This uses a python implementation of the fortran code (which is ~30X slower)

export NO_FORTRAN=True
pip install git+https://github.com/titans-ge/CONAN.git

Recent changes

See change_log.rst

Fitting data

CONAN can be run interactively in python shell/Jupyter notebook, but can also be quickly launched from configuration files (.dat or .yaml).

Here are sample .dat and .yaml configfiles for fitting the lightcurves and RVs of WASP-127b.

Fitting from a config file can be launched within python or from the command line

  • Within python

    from CONAN import fit_configfile
    result = fit_configfile("input_config.dat", out_folder="output")
    
  • from command line:

    conanfit path/to/config_file output_folder 
    

    to see commandline help use:

    conanfit -h  
    

Attribution

If you find CONAN useful in your research, please reference the GitHub repository. The first implementations of CONAN have been descibed in a few papers, kindly cite them using the following BibTeX entries:

@ARTICLE{2017A&A...606A..18L,
        author = {{Lendl}, M. and {Cubillos}, P.~E. and 
                    {Hagelberg}, J. and 
                    {M{\"u}ller}, A. and 
                    {Juvan}, I. and 
                    {Fossati}, L.},
            title = "{Signs of strong Na and K absorption in the transmission spectrum of WASP-103b}",
        journal = {\aap},
            year = 2017,
            month = sep,
        volume = {606},
            eid = {A18},
            pages = {A18},
            doi = {10.1051/0004-6361/201731242},
    archivePrefix = {arXiv},
        eprint = {1708.05737},
    primaryClass = {astro-ph.EP},
        adsurl = {https://ui.adsabs.harvard.edu/abs/2017A&A...606A..18L},
        adsnote = {Provided by the SAO/NASA Astrophysics Data System}
    }


@ARTICLE{2020MNRAS.492.1761L,
       author = {{Lendl}, Monika and 
                {Bouchy}, Fran{\c{c}}ois and 
                {Gill}, Samuel and 
                {Nielsen}, Louise D. and 
                {Turner}, Oliver and 
                {Stassun}, Keivan and 
                {Acton}, Jack S. and 
                {Anderson}, David R. Edward, 
                et al},
        title = "{TOI-222: a single-transit TESS candidate revealed to be a 34-d eclipsing binary with CORALIE, EulerCam, and NGTS}",
      journal = {\mnras},
         year = 2020,
        month = feb,
       volume = {492},
       number = {2},
        pages = {1761-1769},
          doi = {10.1093/mnras/stz3545},
archivePrefix = {arXiv},
       eprint = {1910.05050},
 primaryClass = {astro-ph.EP},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2020MNRAS.492.1761L},
      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

conan-exoplanet-3.3.12.tar.gz (233.4 kB view details)

Uploaded Source

Built Distributions

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

conan_exoplanet-3.3.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

conan_exoplanet-3.3.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

File details

Details for the file conan-exoplanet-3.3.12.tar.gz.

File metadata

  • Download URL: conan-exoplanet-3.3.12.tar.gz
  • Upload date:
  • Size: 233.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for conan-exoplanet-3.3.12.tar.gz
Algorithm Hash digest
SHA256 10a40779bbfee7f80e7342c6a8a878ffdde39e9a7cc939f4af722799fd2992a2
MD5 39f3aea50f4d60d752ca1cca33850e0c
BLAKE2b-256 0c322a83e723bbaee75c13ff94c449dfdc0792af93d9a0b6e80a93edbd5692f5

See more details on using hashes here.

File details

Details for the file conan_exoplanet-3.3.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for conan_exoplanet-3.3.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 99e8e511a2fcab68199c241aa9c9ed793ad713aaba5f7372cb4a465d04a36638
MD5 b5833807fd92c2adcc8db2bc36f725eb
BLAKE2b-256 40ddf274c36ed6f934a0ee8579f72b6c72e5ca789fb6382558fd1c8529e5a0be

See more details on using hashes here.

File details

Details for the file conan_exoplanet-3.3.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for conan_exoplanet-3.3.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 df02340f0710d1c12519c88ebf067f8d2a475eeef685d94dddec3247e115d875
MD5 1dbcf07b4eee89069016f74de4e8795a
BLAKE2b-256 c9ce8d04cdff2e7dd08550324950760f69c363a20db77b3fdb4134d899ba8821

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