# Quickstart¶

## Installation¶

git clone https://github.com/ekaterinailin/AltaiPony.git
cd AltaiPony
python setup.py install


You will also need to install k2sc (Aigrain et al. 2016) from this fork of the original version:

git clone https://github.com/ekaterinailin/k2sc.git
cd k2sc
python3 setup.py install


In some cases you will have to install pybind11, too:

pip install pybind11


## Getting Started¶

Working with Kepler and TESS light curves is similar, K2 light curves need extra love, so we treat them separately. For each mission, there is a notebook that will guide you through the basic applications.

### Kepler Light Curves¶

If you are working with KeplerLightCurve objects, i.e. light curves from the original Kepler mission, try this notebook. This shows how to fetch a light curve from MAST, de-trend it with a Savitzky-Golay filter from scipy, and find some flares.

### TESS Light Curves¶

If you are working with TessLightCurve objects, i.e. light curves from the TESS mission, you may want to try this other notebook instead. In this one, you can also test the injection recovery feature of AltaiPony, and obtain recovery probability and a corrected equivalent duration (ED, aka luminosity independent flare energy).

### K2 Light Curves¶

If you are working with KeplerLightCurve objects, i.e. light curves from the K2 mission, this last notebook is for you. It will run k2sc’s GP de-trending and find flares in a typical K2 long cadence light curve despite its heavy instrumental artifacts.