Finding Data

There are several ways to create a FlareLightCurve in AltaiPony. For a quickstart, all you need is your target’s TOC, EPIC or KIC (and campaign, quarter, or sector). Local TESS, Kepler and K2 light curves can be read with from_path, but you can can also query MAST with fom_mast. You can read in a light curve directly or convert a target pixel file. The latter is required if you want to use k2sc for de-trending. Familiarity with lightkurve is advantageous in any case.

Fetch a TESS light curve from MAST:

>>> from altaipony.lcio import from_mast
>>> flc = from_mast("TIC 358108509", mode="LC", mission="TESS", c=1)

Or a K2 target pixel file, and convert it to a FlareLightCurve using some extra arguments like flux_type, cadence, and aperture_mask :

>>> flc = from_mast("EPIC 211119999", mode="TPF", mission="K2", c=4, flux_type="PDCSAP_FLUX", cadence="long", aperture_mask="default")

You can also fetch some remote file, de-trend it, store it as an AltaiPony light curve, and read it back in again, like so:

>>> flc = from_mast("TIC 358108509", mode="LC", mission="TESS", c=1)
>>> dflc = flc.detrend("savgol")
>>> dflc.to_fits("ponylc.fits")
>>> ...
>>> from altaipony.lcio import from_path
>>> rflc = from_path("ponylc.fits", mode="AltaiPony", mission="TESS")

Functions

from_mast(targetid, mission, c[, mode]) Download light curve derived from TPF or LC directly from MAST using the great search functionality in lightkurve, and construct a FlareLightCurve.
from_path(path, mode, mission, **kwargs) Construct a FlareLightCurve from a local LC or TPF file.
search_lightcurvefile(target[, radius, …]) Searches the public data archive at MAST for a Kepler or TESS LightCurveFile.
search_targetpixelfile(target[, radius, …]) Searches the public data archive at MAST for a Kepler or TESS ~lightkurve.targetpixelfile.TargetPixelFile.