Skip to main content

Fit planetary transits and stellar signals at the same time with the help of gaussian processes

Project description

gptransits

Fit planetary transits and stellar signals at the same time with the help of gaussian processes

Installation

All python dependencies necessary for gptransits are available in pip (one of the package dependencies requires numpy to be installed beforehand). These can be seen in setup.py.

gptransits can be installed from pip:

pip install gptransits

Or from the source:

git clone https://github.com/Fill4/gptransits.git
cd gptransits
python setup.py install

Getting started

Script template (or ipython/jupyter notebook):

import gptransits

model = gptransits.Model("lightcurve_file.txt", "config_file.py")
model.run()
model.analysis(plot=True, fout="results_file.txt")

The model is initialized by providing a light curve file and a configuration file.

model = gptransits.Model("lightcurve_file.txt", "config_file.py")

The configuration file follows the structure in config_template.py. The available settings options can be seen in settings.py.
The light curve file follows the format:

#            time (days)              flux (frac)          flux_err (frac)
0.000000000000000000e+00 9.995755553299999763e-01 5.522560000000000197e-05
2.043337615740740618e-02 9.992535114099999616e-01 5.521756000000000196e-05
4.086675347222221838e-02 9.992965459599999489e-01 5.521029000000000160e-05

Running the MCMC algorithm to sample the posterior:

model.run()

Analysis calls a collection of functions that evaluate the MCMC convergence:

model.analysis(plot=True, fout="results_file.txt")

The plot flag defines if the analysis also creates some plots of interest, in a created figures folder.
The fout flag, if defined, defines the file where the calculated results for the model parameters are saved.

Some examples ready to be run are available in the examples folder.
Each folder has a light curve and a configuration file. Light curve files have the .lc extension.
The output folder saves the chain and posterior probabilities from emcee in case the save flag is set in the configuration.
The figures folder holds the plots from the analysis function.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gptransits-1.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

gptransits-1.0-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file gptransits-1.0.tar.gz.

File metadata

  • Download URL: gptransits-1.0.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for gptransits-1.0.tar.gz
Algorithm Hash digest
SHA256 efb856252278ebf33659b2d41ddecb00f5bc4c3bc399eb3b88f6b1474d3cb70d
MD5 924fedfc035c198ef8c91b6bb62470d5
BLAKE2b-256 17f9acc040b210386a8a7b3da1f8448169aa2af978d67e010c2958510beb86b3

See more details on using hashes here.

File details

Details for the file gptransits-1.0-py3-none-any.whl.

File metadata

  • Download URL: gptransits-1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for gptransits-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3bc20f8db447e569619a29f2b5d6186836f07bb094b127ec8d331ea62271071d
MD5 92cf3cfbf2c2523444669764a79474b1
BLAKE2b-256 8403d1b2c65fb6cf1f6b2743ffcd71fb8054bbe1f43f02580535b919e54868b2

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