PyTransit
=========
[![Licence](http://img.shields.io/badge/license-GPLv2-blue.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)
[![MNRAS](https://img.shields.io/badge/MNRAS-10.1093%2Fmnras%2Fstv894-blue.svg)](http://mnras.oxfordjournals.org/content/450/3/3233)
[![arXiv](http://img.shields.io/badge/arXiv-1504.07433-blue.svg?style=flat)](http://arxiv.org/abs/1504.07433)
[![ASCL](https://img.shields.io/badge/ASCL-A1505.024-blue.svg?style=flat)](http://ascl.net/1505.024)
[![DOI](https://zenodo.org/badge/5871/hpparvi/PyTransit.svg)](https://zenodo.org/badge/latestdoi/5871/hpparvi/PyTransit)
Fast and easy-to-use tools for exoplanet transit light curve modelling with Python. PyTransit offers optimised CPU and
GPU implementations of popular exoplanet transit models with a unified interface, and thrives to be *the fastest and the
most versatile* tool for transit modelling in Python.
PyTransit makes transit model evaluation trivial whether modelling straightforward single-passband transit light curves or
more complex science-cases, such as transmission spectroscopy. Further, the model can be evaluated for a large set of
parameter sets simultaneously in parallel to optimize the evaluation speed with population-based MCMC samplers and
optimization methods, such as emcee and DE-MCMC.
```Python
from pytransit import RoadRunnerModel
tm = RoadRunnerModel('quadratic')
tm.set_data(times)
tm.evaluate(k=0.1, ldc=[0.2, 0.1], t0=0.0, p=1.0, a=3.0, i=0.5*pi)
tm.evaluate(k=[0.10, 0.12], ldc=[[0.2, 0.1, 0.5, 0.1]], t0=0.0, p=1.0, a=3.0, i=0.5*pi)
tm.evaluate(k=[[0.10, 0.12], [0.11, 0.13]], ldc=[[0.2, 0.1, 0.5, 0.1],[0.4, 0.2, 0.75, 0.1]],
t0=[0.0, 0.01], p=[1, 1], a=[3.0, 2.9], i=[.5*pi, .5*pi])
```
![](doc/source/basic_example_1.svg)
![](doc/source/basic_example_2.svg)
![](doc/source/basic_example_3.svg)
The package has been used in research since 2010, and is described in [Parviainen (2015)](http://arxiv.org/abs/1504.07433),
[Parviainen (2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract),
and [Parviainen (2020b)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.3356P/abstract).
## Examples and tutorials
### RoadRunner transit model
RoadRunner [(Parviainen, 2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract) is a fast exoplanet transit model that can use any radially symmetric function to model stellar limb darkening
while still being faster to evaluate than the analytical transit model for quadratic limb darkening.
- [RRModel example 1](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_1.ipynb)
shows how to use RoadRunner with the included limb darkening models.
- [RRModel example 2](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_2.ipynb)
shows how to use RoadRunner with your own limb darkening model.
- [RRModel example 3](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_3.ipynb)
shows how to use an LDTk-based limb darkening model LDTkM with RoadRunner.
### Transmission spectroscopy transit model
Transmission spectroscopy transit model (TSModel) is a special version of the RoadRunner model dedicated to modelling
transmission spectrum light curves.
- [TSModel Example 1](https://github.com/hpparvi/PyTransit/blob/dev/notebooks/roadrunner/tsmodel_example_1.ipynb)
## Documentation
Read the docs at [pytransit.readthedocs.io](https://pytransit.readthedocs.io).
## News
- **21.10.2020, version 2.5**
- Version 2.5 makes modelling of TTVs trivial with ``pytransit.RoadRunnerModel`` and ``pytransit.QuadraticModel``.
- See the [TTV modelling example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/ttv_model_example.ipynb) for an example of how to evaluate the models for a TTV analysis.
- **14.10.2020, version 2.4**
- Version 2.4 adds ``pytransit.EclipseModel`` to model secondary eclipses with as little hassle as possible.
- See the [secondary eclipse model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/example_eclipse_model.ipynb)
for an example of how to use it.
- **16.9.2020, Version 2.3**
- Version 2.3 adds ``OblateStarModel`` to model transits over gravity-darkened rapidly rotating star as presented by Barnes (2009).
- See the [oblate star model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/osmodel_example_1.ipynb)
for an example of usage.
- **13.9.2020, Version 2.2**
- Version 2.2 brings a significant speedup to the evaluation speed of all models. The normalised planet-star distances are
now calculated using a Taylor-series expansion of the planet's (x,y) sky-plane position. The method gives a 2-6 x speedup to the transit
model evaluation and is detailed in Parviainen & Korth (2020, submitted to MNRAS)
- **7.7.2020, Version 2.1**
- Version 2.1 introduces the *RoadRunner* transit model (Parviainen, submitted to MNRAS, 2020), a fast exoplanet transit model
that can use any radially symmetric function to model stellar limb darkening while still being faster to evaluate than
the analytical transit model for quadratic limb darkening.
- See the [basic example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_1.ipynb),
the [custom limb darkening notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_2.ipynb),
and the [LDTk limb darkening model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_3.ipynb).
Installation
------------
### PyPI
The easiest way to install PyTransit is by using `pip`
pip install pytransit
### GitHub
Clone the repository from github and do the normal python package installation
git clone https://github.com/hpparvi/PyTransit.git
cd PyTransit
python setup.py install
Citing
------
If you use PyTransit in your reserach, please cite
Parviainen, H. MNRAS 450, 3233–3238 (2015) (DOI:10.1093/mnras/stv894).
or use this ready-made BibTeX entry
@article{Parviainen2015,
author = {Parviainen, Hannu},
doi = {10.1093/mnras/stv894},
journal = {MNRAS},
number = {April},
pages = {3233--3238},
title = {{PYTRANSIT: fast and easy exoplanet transit modelling in PYTHON}},
url = {http://mnras.oxfordjournals.org/cgi/doi/10.1093/mnras/stv894},
volume = {450},
year = {2015}
}
Author
------
- [Hannu Parviainen](mailto:hpparvi@gmail.com), Instituto de Astrofísica de Canarias
Raw data
{
"_id": null,
"home_page": "",
"name": "PyTransit",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "astronomy,astrophysics,exoplanets",
"author": "",
"author_email": "Hannu Parviainen <hpparvi@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/20/bc/6fe17c6eb7e1b3b85a12e88ba657e5ef9905141a9533ecc7ccc24a7024b0/PyTransit-2.6.1.tar.gz",
"platform": null,
"description": "PyTransit\n=========\n\n[![Licence](http://img.shields.io/badge/license-GPLv2-blue.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)\n[![MNRAS](https://img.shields.io/badge/MNRAS-10.1093%2Fmnras%2Fstv894-blue.svg)](http://mnras.oxfordjournals.org/content/450/3/3233)\n[![arXiv](http://img.shields.io/badge/arXiv-1504.07433-blue.svg?style=flat)](http://arxiv.org/abs/1504.07433)\n[![ASCL](https://img.shields.io/badge/ASCL-A1505.024-blue.svg?style=flat)](http://ascl.net/1505.024)\n[![DOI](https://zenodo.org/badge/5871/hpparvi/PyTransit.svg)](https://zenodo.org/badge/latestdoi/5871/hpparvi/PyTransit)\n\nFast and easy-to-use tools for exoplanet transit light curve modelling with Python. PyTransit offers optimised CPU and \nGPU implementations of popular exoplanet transit models with a unified interface, and thrives to be *the fastest and the \nmost versatile* tool for transit modelling in Python. \n\nPyTransit makes transit model evaluation trivial whether modelling straightforward single-passband transit light curves or\nmore complex science-cases, such as transmission spectroscopy. Further, the model can be evaluated for a large set of\nparameter sets simultaneously in parallel to optimize the evaluation speed with population-based MCMC samplers and \noptimization methods, such as emcee and DE-MCMC.\n\n```Python\nfrom pytransit import RoadRunnerModel\n\ntm = RoadRunnerModel('quadratic')\ntm.set_data(times)\n\ntm.evaluate(k=0.1, ldc=[0.2, 0.1], t0=0.0, p=1.0, a=3.0, i=0.5*pi)\n\ntm.evaluate(k=[0.10, 0.12], ldc=[[0.2, 0.1, 0.5, 0.1]], t0=0.0, p=1.0, a=3.0, i=0.5*pi)\n\ntm.evaluate(k=[[0.10, 0.12], [0.11, 0.13]], ldc=[[0.2, 0.1, 0.5, 0.1],[0.4, 0.2, 0.75, 0.1]],\n t0=[0.0, 0.01], p=[1, 1], a=[3.0, 2.9], i=[.5*pi, .5*pi])\n```\n\n![](doc/source/basic_example_1.svg)\n![](doc/source/basic_example_2.svg)\n![](doc/source/basic_example_3.svg)\n\nThe package has been used in research since 2010, and is described in [Parviainen (2015)](http://arxiv.org/abs/1504.07433), \n[Parviainen (2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract),\nand [Parviainen (2020b)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.3356P/abstract).\n\n \n## Examples and tutorials\n\n### RoadRunner transit model\n\nRoadRunner [(Parviainen, 2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract) is a fast exoplanet transit model that can use any radially symmetric function to model stellar limb darkening \nwhile still being faster to evaluate than the analytical transit model for quadratic limb darkening.\n\n- [RRModel example 1](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_1.ipynb) \n shows how to use RoadRunner with the included limb darkening models.\n- [RRModel example 2](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_2.ipynb)\n shows how to use RoadRunner with your own limb darkening model.\n- [RRModel example 3](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_3.ipynb) \n shows how to use an LDTk-based limb darkening model LDTkM with RoadRunner.\n\n### Transmission spectroscopy transit model\n\nTransmission spectroscopy transit model (TSModel) is a special version of the RoadRunner model dedicated to modelling \ntransmission spectrum light curves. \n \n - [TSModel Example 1](https://github.com/hpparvi/PyTransit/blob/dev/notebooks/roadrunner/tsmodel_example_1.ipynb)\n\n\n## Documentation\n\nRead the docs at [pytransit.readthedocs.io](https://pytransit.readthedocs.io).\n\n## News\n- **21.10.2020, version 2.5**\n - Version 2.5 makes modelling of TTVs trivial with ``pytransit.RoadRunnerModel`` and ``pytransit.QuadraticModel``.\n - See the [TTV modelling example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/ttv_model_example.ipynb) for an example of how to evaluate the models for a TTV analysis.\n\n- **14.10.2020, version 2.4**\n - Version 2.4 adds ``pytransit.EclipseModel`` to model secondary eclipses with as little hassle as possible.\n - See the [secondary eclipse model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/example_eclipse_model.ipynb)\n for an example of how to use it.\n\n- **16.9.2020, Version 2.3** \n - Version 2.3 adds ``OblateStarModel`` to model transits over gravity-darkened rapidly rotating star as presented by Barnes (2009).\n - See the [oblate star model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/osmodel_example_1.ipynb)\n for an example of usage.\n\n- **13.9.2020, Version 2.2**\n - Version 2.2 brings a significant speedup to the evaluation speed of all models. The normalised planet-star distances are\n now calculated using a Taylor-series expansion of the planet's (x,y) sky-plane position. The method gives a 2-6 x speedup to the transit\n model evaluation and is detailed in Parviainen & Korth (2020, submitted to MNRAS)\n\n- **7.7.2020, Version 2.1** \n - Version 2.1 introduces the *RoadRunner* transit model (Parviainen, submitted to MNRAS, 2020), a fast exoplanet transit model \n that can use any radially symmetric function to model stellar limb darkening while still being faster to evaluate than \n the analytical transit model for quadratic limb darkening.\n - See the [basic example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_1.ipynb),\n the [custom limb darkening notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_2.ipynb),\n and the [LDTk limb darkening model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_3.ipynb).\n\n\n\nInstallation\n------------\n### PyPI\n\nThe easiest way to install PyTransit is by using `pip`\n\n pip install pytransit\n\n### GitHub\n\nClone the repository from github and do the normal python package installation\n\n git clone https://github.com/hpparvi/PyTransit.git\n cd PyTransit\n python setup.py install\n\n\nCiting\n------\n\nIf you use PyTransit in your reserach, please cite\n\nParviainen, H. MNRAS 450, 3233\u20133238 (2015) (DOI:10.1093/mnras/stv894).\n\nor use this ready-made BibTeX entry\n\n @article{Parviainen2015,\n author = {Parviainen, Hannu},\n doi = {10.1093/mnras/stv894},\n journal = {MNRAS},\n number = {April},\n pages = {3233--3238},\n title = {{PYTRANSIT: fast and easy exoplanet transit modelling in PYTHON}},\n url = {http://mnras.oxfordjournals.org/cgi/doi/10.1093/mnras/stv894},\n volume = {450},\n year = {2015}\n }\n\nAuthor\n------\n - [Hannu Parviainen](mailto:hpparvi@gmail.com), Instituto de Astrof\u00edsica de Canarias\n",
"bugtrack_url": null,
"license": "GPLv2",
"summary": "Fast and painless exoplanet transit light curve modelling.",
"version": "2.6.1",
"project_urls": {
"homepage": "https://github.com/hpparvi/PyTransit"
},
"split_keywords": [
"astronomy",
"astrophysics",
"exoplanets"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9541d22625e979bdcc6039d0d1034b20c0f793ae4d50dee5837f671d39bdb33a",
"md5": "6cba95d3003f2bbdb1af6bfac977df09",
"sha256": "054d219a552aa8d5b7d18c2ac868fc904324fe9df148c95b8ba1628d4ce075b5"
},
"downloads": -1,
"filename": "PyTransit-2.6.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6cba95d3003f2bbdb1af6bfac977df09",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10841039,
"upload_time": "2024-02-03T19:39:46",
"upload_time_iso_8601": "2024-02-03T19:39:46.384694Z",
"url": "https://files.pythonhosted.org/packages/95/41/d22625e979bdcc6039d0d1034b20c0f793ae4d50dee5837f671d39bdb33a/PyTransit-2.6.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "20bc6fe17c6eb7e1b3b85a12e88ba657e5ef9905141a9533ecc7ccc24a7024b0",
"md5": "e0020593d752b2043dcc7cc9791e04c3",
"sha256": "43eb157368eb909024c86015fc68497d77181efe153ebda9681086717adc5c08"
},
"downloads": -1,
"filename": "PyTransit-2.6.1.tar.gz",
"has_sig": false,
"md5_digest": "e0020593d752b2043dcc7cc9791e04c3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 10700939,
"upload_time": "2024-02-03T19:39:50",
"upload_time_iso_8601": "2024-02-03T19:39:50.648817Z",
"url": "https://files.pythonhosted.org/packages/20/bc/6fe17c6eb7e1b3b85a12e88ba657e5ef9905141a9533ecc7ccc24a7024b0/PyTransit-2.6.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-03 19:39:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hpparvi",
"github_project": "PyTransit",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "arviz",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "scipy",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "xarray",
"specs": []
},
{
"name": "tables",
"specs": []
},
{
"name": "uncertainties",
"specs": []
},
{
"name": "numba",
"specs": []
},
{
"name": "astropy",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "tqdm",
"specs": []
},
{
"name": "semantic_version",
"specs": []
},
{
"name": "setuptools",
"specs": []
},
{
"name": "deprecated",
"specs": []
},
{
"name": "seaborn",
"specs": []
},
{
"name": "emcee",
"specs": []
},
{
"name": "ldtk",
"specs": []
},
{
"name": "pyopencl",
"specs": []
},
{
"name": "corner",
"specs": []
},
{
"name": "celerite",
"specs": []
},
{
"name": "pyrr",
"specs": []
}
],
"lcname": "pytransit"
}