An optimized transit-fitting algorithm to search for periodic transits of small planets
Motivation
We present a new method to detect planetary transits from time-series photometry, the Transit Least Squares (TLS) algorithm. While the commonly used Box Least Squares (BLS, Kovács et al. 2002) algorithm searches for rectangular signals in stellar light curves, TLS searches for transit-like features with stellar limb-darkening and including the effects of planetary ingress and egress. Moreover, TLS analyses the entire, unbinned data of the phase-folded light curve. These improvements yield a ~10 % higher detection efficiency (and similar false alarm rates) compared to BLS. The higher detection efficiency of our freely available Python implementation comes at the cost of higher computational load, which we partly compensate by applying an optimized period sampling and transit duration sampling, constrained to the physically plausible range. A typical Kepler K2 light curve, worth of 90 d of observations at a cadence of 30 min, can be searched with TLS in 10 seconds real time on a standard laptop computer, just as with BLS.
Installation
TLS can be installed conveniently using: pip install transitleastsquares
If you have multiple versions of Python and pip on your machine, try: pip3 install transitleastsquares
The latest version can be pulled from github::
git clone https://github.com/hippke/tls.git
cd tls
python setup.py install
If the command python does not point to Python 3 on your machine, you can try to replace the last line with python3 setup.py install. If you don't have git on your machine, you can find installation instructions here. TLS also runs on Python 2, but without multi-threading.
Dependencies: Python 3, NumPy, numba, batman-package, tqdm, optional: argparse (for the command line version), astroquery (for LD and stellar density priors from Kepler K1, K2, and TESS).
If you have trouble installing, please open an issue.
Getting started
Here is a short animation of a real search for planets in Kepler K2 data. For more examples, have a look at the tutorials and the documentation.
Attribution
Please cite Hippke & Heller (2019, A&A 623, A39) if you find this code useful in your research. The BibTeX entry for the paper is:
@ARTICLE{2019A&A...623A..39H,
author = {{Hippke}, Michael and {Heller}, Ren{\'e}},
title = "{Optimized transit detection algorithm to search for periodic transits of small planets}",
journal = {\aap},
year = "2019",
month = "Mar",
volume = {623},
eid = {A39},
pages = {A39},
doi = {10.1051/0004-6361/201834672},
archivePrefix = {arXiv},
eprint = {1901.02015},
primaryClass = {astro-ph.EP},
adsurl = {https://ui.adsabs.harvard.edu/\#abs/2019A&A...623A..39H},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
Contributing Code, Bugfixes, or Feedback
We welcome and encourage contributions. If you have any trouble, open an issue.
Copyright 2019 Michael Hippke & René Heller.
Metadata
Release files for foldedleastsquares 1.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| foldedleastsquares-1.1.12.tar.gz | 36.8 kB | Without provenance | Details for foldedleastsquares-1.1.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| foldedleastsquares-1.1.12-py3-none-any.whl | Python 3 | none | any | Details for foldedleastsquares-1.1.12-py3-none-any.whl |
Total release size: 476.7 kB
Release files / foldedleastsquares-1.1.12.tar.gz
| Download URL | foldedleastsquares-1.1.12.tar.gz |
|---|---|
| Size | 36.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8146dd829222715d43398ac749e0c4a7cfdd2482c7b725ade0da266708ed9695
|
|
BLAKE2b-256 checksum How to use checksums |
29af7225f4763504a7e2f4309c6cf9cf1689d044bc70199342ba9dd65268ea20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.18
|
Release files / foldedleastsquares-1.1.12-py3-none-any.whl
| Download URL | foldedleastsquares-1.1.12-py3-none-any.whl |
|---|---|
| Size | 439.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd8d8d64c42d3bd8462e3c9def9164afa16c8c45814c99d8db4a7363c45f2f4d
|
|
BLAKE2b-256 checksum How to use checksums |
e64fa575b195fa783f27c3afdc2a5b6d8942721c6b0265a140d4f58d5feca8a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.18
|
Security for foldedleastsquares 1.1.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.