By the end of this tutorial, you will:
This tutorial is aimed at first time users who may not have used Lightkurve before.
First we must install and import the Lightkurve package. We can do this as follows:
# This step is not necessary if you have already installed Lightkurve
!pip install lightkurve --quiet
%matplotlib inline
import lightkurve as lk
The light curves of stars created by the TESS mission are stored at the Mikulksi Archive for Space Telescopes (MAST) archive, along with metadata about the observations, such as which CCD channel was used at each time.
Lightkurve’s built-in tools allow us to search for light curve files in the archive, and download them and their metadata. In this example, we will start by downloading one sector of TESS data for a star named V1357 Cyg, also known as Cygnus X-1. V1357 Cyg is a galactic X-ray source in the constellation Cygnus.
Using Lightkurve’s search_lightcurve function, we can find an itemized list of light curves produced by different data analysis pipelines:
search_result = lk.search_lightcurve("V1357 Cyg")
search_result
By clicking on each of the "author" links above, you will obtain a description of the product and how each one is different from the other. The acronym SPOC refers to the TESS data calibration pipeline provided by NASA Ames, and QLP refers to the Quiclook Pipeline in use by the mission team at MIT.
We can download the first data product by specifying its index number in rectangular brackets:
lc = search_result[0].download()
lc.plot();
If you are new to Python, it is likely that you feel more comfortable inspecting and analyzing a light curve in Excel than in Python. That is fine! We can save the light curve data as an Excel spreadsheet named "V1357Cyg.xlsx" as follows:
lc.to_excel("V1357Cyg.xlsx")
This file will be available on your local drive. If you run this notebook in a Google Colab environment, you can download the file as follows:
from google.colab import files
files.download("V1357Cyg.xlsx")