Skip to main content

TransitFetcher

An automated space-based (Kepler/TESS) exoplanet transit retrieval and preprocessing pipeline.

Simply provide a host star name (e.g. Kepler-10), then TransitFetcher automatically downloads and extracts all individual transit light curves (from MAST via lightkurve) for known transiting planets in the system!

Installation

Install the latest stable release from PyPI:

pip install transitfetcher

Usage

TransitFetcher only has one function: fetch(), which retrieves and (optionally) plots various transit light curves. For example,

from transitfetcher import fetch

fetch("Kepler-10")

Function Parameters

fetch(
    target,
    output_root=None,
    includes=["Kepler", "TESS"],
    normalize_flux=False,
    plot_entire_lightcurve=True,
    plot_individual_transits=True,
    plot_folded_transits=True,
    plot_riverplot=True,
    generate_transitfit_csvs=False
)
Parameter Type Default Description Notes
target str Required Target name or identifier. Do not include planet letters (e.g. "Kepler-10" NOT "Kepler-10 b").
output_root str or Path None Root directory for output files. None defaults to the current working directory.
includes list[str] ["Kepler", "TESS"] Missions to include when searching for transit data. Only accepts "Kepler" and/or "TESS".
normalize_flux bool False Prioritize flux-detrended data (by Savitzky-Golay filtering) when processing transits.
plot_entire_lightcurve bool True Generate unfolded light curve plots by quarter/sector.
plot_individual_transits bool True Generate plots for individual transit events.
plot_folded_transits bool True Generate phase-folded transit plots by quarter/sector. Always uses detrended data
plot_riverplot bool True Generate transit river plots by mission. Always uses detrended data
generate_transitfit_csvs bool False Generate configuration CSV files for TransitFit.

Output

For each target, TransitFetcher creates a dedicated output directory containing the retrieved light curves, extracted transit events, plots, and other auxiliary files. Directories containing planet-specific outputs (folded_transit_plots, individual_transit_csv, individual_transit_plot, and transitfit_configs) are further organized into sub-directories for each known transiting planet in the system.

TransitFetcher_<target>/
├── folded_transit_plots/       # Phase-folded light curves per planet (always detrended)
│   ├── <planet_1>/
│   ├── <planet_2>/
│   └── ...
├── individual_transit_csv/     # Individual transit CSVs (detrended if normalize_flux=True)
│   ├── <planet_1>/
│   ├── <planet_2>/
│   └── ...
├── individual_transit_plot/    # Individual transit plots (detrended if normalize_flux=True)
│   ├── <planet_1>/
│   ├── <planet_2>/
│   └── ...
├── lightcurve_plots/           # Full mission light curve plots (detrended if normalize_flux=True)
├── river_plots/                # River plots for each mission per planet (always detrended)
├── transitfit_configs/         # Configuration files for further TransitFit use
│   ├── <planet_1>/
│   ├── <planet_2>/
│   └── ...
├── <target>_lc_flattened.csv         # Combined detrended light curve
├── <target>_lc_unflattened.csv       # Combined original light curve
└── <target>_transit_ephemerides.csv  # Planetary parameters queried from exo.MAST

Usage Notes

  • TransitFetcher does not perform transit fitting or parameter inference of any kind. It is intended for automatic extraction of individual transit events to be subsequently analyzed using arbitrary methods and software, particularly geared towards transit timing variation (TTV) studies.
  • TransitFetcher currently uses lightkurve.SearchResult.download_all() for MAST light curve downloads. While direct bulk downloads via astroquery.mast may be supported in the future, TransitFetcher currently does not, and so you may see yourself rate limited if you were to fetch many target light curves using a for loop.
  • It is highly recommended to keep normalize_flux as False (default) to preserve original flux values. TransitFetcher uses a Savitzky-Golay filter (polynomial degree 2) with a window length of at least 4x the transit duration or 25 hours (51 for Kepler and 751 for TESS), which may be unreliable for some transits. Users should always manually inspect folded transit plots if normalize_flux is True.

To-do

  • Bulk TESS-Kepler MAST query download for target argument as list of planets
  • Input checking/validation
  • K2 mission support

Metadata

Release files for transitfetcher 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for transitfetcher 1.0.0
File Size Uploaded Provenance Actions
transitfetcher-1.0.0.tar.gz 14.5 kB Without provenance Details for transitfetcher-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for transitfetcher 1.0.0
File Interpreter ABI Platform Actions
transitfetcher-1.0.0-py3-none-any.whl Python 3 none any Details for transitfetcher-1.0.0-py3-none-any.whl

Total release size: 27.6 kB

Release files / transitfetcher-1.0.0.tar.gz

Download URL transitfetcher-1.0.0.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
39686a12a01485a5dba4e82faa3e2081cffd17a00fdc464060d54d3b7507cc36
BLAKE2b-256 checksum
How to use checksums
80dc48d5b52877a8e698f370e8e6c3e1e28af51074e2e355365cb04df5159e66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.5

Release files / transitfetcher-1.0.0-py3-none-any.whl

Download URL transitfetcher-1.0.0-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6fe60367fe253b545956fc4f7c6532179ddd50e9d0ccb5edb21bf7388338c04
BLAKE2b-256 checksum
How to use checksums
4aae838ccd5143e28e235d8657639ae6f4370326d06dbbceb826103dc16103c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.5

Security for transitfetcher 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page