Combining Multiple Quarters of Kepler Data with Lightkurve#
Learning Goals#
By the end of this tutorial, you will:
Understand a Kepler Quarter.
Understand how to download multiple quarters of data at once.
Learn how to normalize Kepler data.
Understand how to combine multiple quarters of data.
Introduction#
The Kepler, K2, and TESS telescopes observe stars for long periods of time. These long, time series observations are broken up into separate chunks, called quarters for the Kepler mission, campaigns for K2, and sectors for TESS.
Building light curves with as much data as is available is useful when searching for small signals, such as planetary transits or stellar pulsations. In this tutorial, we will learn how to use Lightkurve’s tools to download and stitch together multiple quarters of Kepler observations.
It is recommended to first read the tutorial discussing how to use Kepler light curve products with Lightkurve. That tutorial will introduce you to some specifics of how Kepler, K2, and TESS make observations, and how these are displayed as light curves. It also introduces some important terms and concepts that are referred to in this tutorial.
This tutorial demonstrates how to access and combine multiple quarters of data from the Kepler space telescope, using the Lightkurve package.
When accessing Kepler data through MAST, it will be stored in three-month chunks, corresponding to a quarter of observations. By combining and normalizing these separate observations, you can form a single light curve that spans all observed quarters. Utilizing all of the data available is especially important when looking at repeating signals, such as planet transits and stellar oscillations.
We will use the Kepler mission as an example, but these tools are extensible to TESS and K2 as well.
Imports#
This tutorial requires the Lightkurve package, which in turn uses matplotlib
for plotting.
import lightkurve as lk
%matplotlib inline
What is a Kepler Quarter?#
In order to search for planets around other stars, the Kepler space telescope performed near-continuous monitoring of a single field of view, from an Earth-trailing orbit. However, this posed a challenge. If the space telescope is trailing Earth and maintaining steady pointing, its solar panels would slowly receive less and less sunlight.
In order to make sure the solar panels remained oriented towards the Sun, Kepler performed quarterly rolls, one every 93 days. The infographic below helps visualize this, and shows the points in the orbit where the rolls took place.
After each roll, Kepler retained its fine-pointing at the same field of view. Because the camera rotated by 90 degrees, all of the target stars fell on different parts of the charge-coupled device (CCD) camera. This had an effect on the amount of flux recorded for the same star, because different CCD pixels have different sensitivities. The way in which the flux from the same stars was distributed on the CCD (called the point spread function or PSF) also changed after each roll, due to focus changes and other instrumental effects. As a result, the aperture mask set for a star had to be recomputed after each roll, and may capture slightly different amounts of flux.
The data obtained between rolls is referred to as a quarter. While there are changes to the flux systematics, not much else changes quarter to quarter, and the majority of the target list remains identical. This means that, after removing systematic trends (such as was done for the presearch data conditioning simple aperture photometry (PDCSAP) flux), multiple quarters together can form one continuous observation.
Figure: Infographic showcasing the necessity of Kepler’s quarterly rolls and its Earth-trailing orbit. Source: Kepler Science Center.
Note: Observations by K2 and TESS are also broken down into chunks of a month or more, called campaigns (for K2) and sectors (for TESS). While not discussed in this tutorial, the tools below work for these data products as well.
Downloading Multiple KeplerLightCurve
Objects at Once#
To start, we can use Lightkurve’s search_lightcurve()
function to see what data are available for our target star on the Mikulski Archive for Space Telescopes (MAST) archive. We will use the star Kepler-8, a star somewhat larger than the Sun, and the host of a hot Jupiter planet.
#Temporarily using KOI-10 to get around a software bug. KOI-10 is the same object as Kepler-8
search_result = lk.search_lightcurve("KOI-10", mission="Kepler")
search_result
# | mission | year | author | exptime | target_name | distance |
---|---|---|---|---|---|---|
s | arcsec | |||||
0 | Kepler Quarter 03 | 2009 | Kepler | 60 | kplr006922244 | 0.0 |
1 | Kepler Quarter 02 | 2009 | Kepler | 60 | kplr006922244 | 0.0 |
2 | Kepler Quarter 02 | 2009 | Kepler | 60 | kplr006922244 | 0.0 |
3 | Kepler Quarter 02 | 2009 | Kepler | 60 | kplr006922244 | 0.0 |
4 | Kepler Quarter 03 | 2009 | Kepler | 60 | kplr006922244 | 0.0 |
5 | Kepler Quarter 03 | 2009 | Kepler | 60 | kplr006922244 | 0.0 |
6 | Kepler Quarter 00 | 2009 | Kepler | 1800 | kplr006922244 | 0.0 |
7 | Kepler Quarter 01 | 2009 | Kepler | 1800 | kplr006922244 | 0.0 |
8 | Kepler Quarter 02 | 2009 | Kepler | 1800 | kplr006922244 | 0.0 |
... | ... | ... | ... | ... | ... | ... |
40 | Kepler Quarter 13 | 2012 | Kepler | 60 | kplr006922244 | 0.0 |
41 | Kepler Quarter 11 | 2012 | Kepler | 60 | kplr006922244 | 0.0 |
42 | Kepler Quarter 12 | 2012 | Kepler | 1800 | kplr006922244 | 0.0 |
43 | Kepler Quarter 11 | 2012 | Kepler | 1800 | kplr006922244 | 0.0 |
44 | Kepler Quarter 13 | 2012 | Kepler | 1800 | kplr006922244 | 0.0 |
45 | Kepler Quarter 14 | 2012 | Kepler | 1800 | kplr006922244 | 0.0 |
46 | Kepler Quarter 15 | 2013 | Kepler | 1800 | kplr006922244 | 0.0 |
47 | Kepler Quarter 17 | 2013 | Kepler | 1800 | kplr006922244 | 0.0 |
48 | Kepler Quarter 16 | 2013 | Kepler | 1800 | kplr006922244 | 0.0 |
49 | Kepler Quarter | 2009 | KBONUS-BKG | 1765 | Gaia DR3 2116730994965905280 | 0.0 |
In this list, each row represents a different observing quarter, for a total of 18 quarters across four years. The observation column lists the Kepler Quarter. The target_name represents the Kepler Input Catalogue (KIC) ID of the target, and the productFilename column is the name of the FITS files downloaded from MAST. The distance column shows the separation on the sky between the searched coordinates and the downloaded objects — this is only relevant when searching for specific coordinates in the sky, and not when looking for individual objects.
Instead of downloading a single quarter using the download()
function, we can use the download_all()
function to access all 18 quarters at once (this might take a while).
lc_collection = search_result.download_all()
lc_collection
LightCurveCollection of 50 objects:
0: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=3 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
1: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=2 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
2: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=2 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
3: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=2 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
4: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=3 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
5: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=3 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
6: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=0 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
7: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=1 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
8: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=2 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
9: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=3 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
10: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=5 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
11: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=5 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
12: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=5 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
13: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=4 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
14: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=7 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
15: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=4 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
16: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=4 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
17: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=6 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
18: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=6 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
19: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=6 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
20: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=6 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
21: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=7 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
22: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=4 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
23: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=5 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
24: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=11 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
25: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=10 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
26: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=10 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
27: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=10 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
28: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=9 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
29: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=11 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
30: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=9 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
31: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=9 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
32: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=10 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
33: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=8 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
34: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=9 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
35: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=13 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
36: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=13 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
37: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=12 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
38: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=12 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
39: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=12 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
40: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=13 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
41: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=11 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
42: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=12 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
43: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=11 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
44: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=13 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
45: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=14 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
46: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=15 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
47: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=17 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
48: <KeplerLightCurve LABEL="KIC 6922244" QUARTER=16 AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
49: <KeplerLightCurve LABEL="KIC 6922244" AUTHOR=Kepler FLUX_ORIGIN=pdcsap_flux>
All of the downloaded data are stored in a LightCurveCollection
. This object acts as a wrapper for 18 separate KeplerLightCurve
objects, listed above.
We can access the KeplerLightCurve
objects and interact with them as usual through the LightCurveCollection
.
lc_Q4 = lc_collection[4]
lc_Q4
time | flux | flux_err | quality | timecorr | centroid_col | centroid_row | cadenceno | sap_flux | sap_flux_err | sap_bkg | sap_bkg_err | pdcsap_flux | pdcsap_flux_err | sap_quality | psf_centr1 | psf_centr1_err | psf_centr2 | psf_centr2_err | mom_centr1 | mom_centr1_err | mom_centr2 | mom_centr2_err | pos_corr1 | pos_corr2 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
electron / s | electron / s | d | pix | pix | electron / s | electron / s | electron / s | electron / s | electron / s | electron / s | pix | pix | pix | pix | pix | pix | pix | pix | pix | pix | ||||
Time | float32 | float32 | int32 | float32 | float64 | float64 | int32 | float32 | float32 | float32 | float32 | float32 | float32 | int32 | float64 | float32 | float64 | float32 | float64 | float32 | float64 | float32 | float32 | float32 |
260.2143210568829 | ——— | ——— | 0 | 1.987517e-03 | 682.16836 | 196.67978 | 210580 | 4.3587668e+04 | 3.8921989e+01 | 8.9399231e+02 | 5.1594305e-01 | ——— | ——— | 0 | ——— | ——— | ——— | ——— | 682.16836 | 1.2054562e-03 | 196.67978 | 1.2812527e-03 | -8.4362505e-03 | 1.5843662e-02 |
260.2150021317357 | 5.2495184e+04 | 4.7668571e+01 | 0 | 1.987492e-03 | 682.15101 | 196.66538 | 210581 | 4.3527820e+04 | 3.8907539e+01 | 8.9389331e+02 | 5.1598632e-01 | 5.2495184e+04 | 4.7668571e+01 | 0 | ——— | ——— | ——— | ——— | 682.15101 | 1.2134294e-03 | 196.66538 | 1.2945539e-03 | -8.4477188e-03 | 1.5839601e-02 |
260.2156833065892 | 5.2559660e+04 | 4.7679863e+01 | 0 | 1.987467e-03 | 682.15004 | 196.66783 | 210582 | 4.3581277e+04 | 3.8918823e+01 | 8.9379425e+02 | 5.1602966e-01 | 5.2559660e+04 | 4.7679863e+01 | 0 | ——— | ——— | ——— | ——— | 682.15004 | 1.2113123e-03 | 196.66783 | 1.2924013e-03 | -8.4591899e-03 | 1.5835539e-02 |
260.21636438144196 | 5.2671750e+04 | 4.7703503e+01 | 0 | 1.987441e-03 | 682.15180 | 196.66575 | 210583 | 4.3674371e+04 | 3.8939987e+01 | 8.9369525e+02 | 5.1607299e-01 | 5.2671750e+04 | 4.7703503e+01 | 0 | ——— | ——— | ——— | ——— | 682.15180 | 1.2104654e-03 | 196.66575 | 1.2913347e-03 | -8.4706582e-03 | 1.5831478e-02 |
260.2170454562947 | 5.2561789e+04 | 4.7697510e+01 | 10000000 | 1.987416e-03 | 682.15086 | 196.66659 | 210584 | 4.3582648e+04 | 3.8935253e+01 | 8.9359625e+02 | 5.1611626e-01 | 5.2561789e+04 | 4.7697510e+01 | 10000000 | ——— | ——— | ——— | ——— | 682.15086 | 1.2097340e-03 | 196.66659 | 1.2909683e-03 | -8.4821275e-03 | 1.5827416e-02 |
260.2177264309212 | 5.2589480e+04 | 4.7680447e+01 | 0 | 1.987391e-03 | 682.14946 | 196.66482 | 210585 | 4.3605512e+04 | 3.8920563e+01 | 8.9349725e+02 | 5.1615953e-01 | 5.2589480e+04 | 4.7680447e+01 | 0 | ——— | ——— | ——— | ——— | 682.14946 | 1.2114982e-03 | 196.66482 | 1.2925542e-03 | -8.4935939e-03 | 1.5823355e-02 |
260.2184076057747 | 5.2487945e+04 | 4.7663097e+01 | 0 | 1.987366e-03 | 682.15102 | 196.66527 | 210586 | 4.3520812e+04 | 3.8905224e+01 | 8.9339832e+02 | 5.1620287e-01 | 5.2487945e+04 | 4.7663097e+01 | 0 | ——— | ——— | ——— | ——— | 682.15102 | 1.2124446e-03 | 196.66527 | 1.2930199e-03 | -8.5050650e-03 | 1.5819294e-02 |
260.21908868062746 | 5.2550023e+04 | 4.7679539e+01 | 0 | 1.987341e-03 | 682.15235 | 196.66555 | 210587 | 4.3572320e+04 | 3.8918407e+01 | 8.9329932e+02 | 5.1624614e-01 | 5.2550023e+04 | 4.7679539e+01 | 0 | ——— | ——— | ——— | ——— | 682.15235 | 1.2131265e-03 | 196.66555 | 1.2935847e-03 | -8.5165333e-03 | 1.5815234e-02 |
260.21976975548023 | 5.2570027e+04 | 4.7683289e+01 | 10000000000000 | 1.987315e-03 | 682.15118 | 196.66717 | 210588 | 4.3588812e+04 | 3.8920471e+01 | 8.9320032e+02 | 5.1628941e-01 | 5.2570027e+04 | 4.7683289e+01 | 10000000000000 | ——— | ——— | ——— | ——— | 682.15118 | 1.2116940e-03 | 196.66717 | 1.2925321e-03 | -8.5280025e-03 | 1.5811171e-02 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
290.55084583978896 | 5.2546117e+04 | 4.7851994e+01 | 0 | 7.517998e-04 | 682.15338 | 196.65293 | 255121 | 4.3919590e+04 | 3.9030067e+01 | 9.6427539e+02 | 5.1776206e-01 | 5.2546117e+04 | 4.7851994e+01 | 0 | ——— | ——— | ——— | ——— | 682.15338 | 1.2116003e-03 | 196.65293 | 1.2890502e-03 | -1.3724205e-03 | 3.7641455e-03 |
290.5515270107426 | 5.2575066e+04 | 4.7882950e+01 | 0 | 7.517707e-04 | 682.15214 | 196.65048 | 255122 | 4.3943750e+04 | 3.9034000e+01 | 9.6430493e+02 | 5.1770419e-01 | 5.2575066e+04 | 4.7882950e+01 | 0 | ——— | ——— | ——— | ——— | 682.15214 | 1.2100190e-03 | 196.65048 | 1.2879083e-03 | -1.3769064e-03 | 3.7664026e-03 |
290.55220798163646 | 5.2606797e+04 | 4.7919701e+01 | 0 | 7.517416e-04 | 682.14585 | 196.65285 | 255123 | 4.3970234e+04 | 3.9042503e+01 | 9.6433453e+02 | 5.1764625e-01 | 5.2606797e+04 | 4.7919701e+01 | 0 | ——— | ——— | ——— | ——— | 682.14585 | 1.2117918e-03 | 196.65285 | 1.2878241e-03 | -1.3813910e-03 | 3.7686590e-03 |
290.5528890525311 | 5.2560762e+04 | 4.7936836e+01 | 0 | 7.517125e-04 | 682.15246 | 196.65063 | 255124 | 4.3931977e+04 | 3.9033802e+01 | 9.6436407e+02 | 5.1758838e-01 | 5.2560762e+04 | 4.7936836e+01 | 0 | ——— | ——— | ——— | ——— | 682.15246 | 1.2100219e-03 | 196.65063 | 1.2881348e-03 | -1.3858761e-03 | 3.7709156e-03 |
290.5535702234338 | 5.2557785e+04 | 4.7962467e+01 | 0 | 7.516834e-04 | 682.14762 | 196.64942 | 255125 | 4.3929566e+04 | 3.9031979e+01 | 9.6439362e+02 | 5.1753038e-01 | 5.2557785e+04 | 4.7962467e+01 | 0 | ——— | ——— | ——— | ——— | 682.14762 | 1.2100174e-03 | 196.64942 | 1.2884859e-03 | -1.3903620e-03 | 3.7731724e-03 |
290.5542512943284 | 5.2567332e+04 | 4.7991310e+01 | 0 | 7.516543e-04 | 682.15169 | 196.65056 | 255126 | 4.3937578e+04 | 3.9032516e+01 | 9.6442322e+02 | 5.1747245e-01 | 5.2567332e+04 | 4.7991310e+01 | 0 | ——— | ——— | ——— | ——— | 682.15169 | 1.2109885e-03 | 196.65056 | 1.2888695e-03 | -1.3948473e-03 | 3.7754292e-03 |
290.55493236522307 | 5.2621078e+04 | 4.8039234e+01 | 0 | 7.516252e-04 | 682.15130 | 196.65295 | 255127 | 4.3982383e+04 | 3.9049072e+01 | 9.6445270e+02 | 5.1741451e-01 | 5.2621078e+04 | 4.8039234e+01 | 0 | ——— | ——— | ——— | ——— | 682.15130 | 1.2094381e-03 | 196.65295 | 1.2877872e-03 | -1.3993324e-03 | 3.7776858e-03 |
290.55561353611847 | 5.2529473e+04 | 4.8044136e+01 | 0 | 7.515961e-04 | 682.15264 | 196.65070 | 255128 | 4.3906195e+04 | 3.9028255e+01 | 9.6448224e+02 | 5.1735651e-01 | 5.2529473e+04 | 4.8044136e+01 | 0 | ——— | ——— | ——— | ——— | 682.15264 | 1.2116528e-03 | 196.65070 | 1.2898610e-03 | -1.4038184e-03 | 3.7799426e-03 |
290.5562946070131 | 5.2552406e+04 | 4.8076981e+01 | 0 | 7.515670e-04 | 682.14950 | 196.65157 | 255129 | 4.3925348e+04 | 3.9031090e+01 | 9.6451184e+02 | 5.1729858e-01 | 5.2552406e+04 | 4.8076981e+01 | 0 | ——— | ——— | ——— | ——— | 682.14950 | 1.2102434e-03 | 196.65157 | 1.2884049e-03 | -1.4083036e-03 | 3.7821995e-03 |
lc_Q4.plot();
Note: The example given above also works for downloading target pixel files (TPFs). This will produce a TargetPixelFileCollection
object instead.
Investigating the Data#
Let’s first have a look at how these observations differ from one another. We can plot the simple aperture photometry (SAP) flux of all of the observations in the LightCurveCollection
to see how they compare.
ax = lc_collection[0].plot(column='sap_flux', label=None)
for lc in lc_collection[1:]:
lc.plot(ax=ax, column='sap_flux', label=None)
In the figure above, each quarter of data looks strikingly different, with global patterns repeating every four quarters as Kepler has made a full rotation.
The change in flux within each quarter is in part driven by changes in the telescope focus, which are caused by changes in the temperature of Kepler’s components as the spacecraft orbits the Sun. The changes are also caused by an effect called differential velocity aberration (DVA), which causes stars to drift over the course of a quarter, depending on their distance from the center of Kepler’s field of view.
While the figure above looks messy, all the systematic effects mentioned above are well understood, and have been detrended in the PDCSAP flux. For a more detailed overview, see the Kepler Data Characteristics Handbook, specifically: Section 5. Ongoing Phenomena.
Normalizing a Light Curve#
If we want to see the actual variation of the targeted object over the course of these observations, the plot above isn’t very useful to us. It is also not useful to have flux expressed in physical units, because it is affected by the observing conditions such as telescope focus and pointing (see above).
Instead, it is a common practice to normalize light curves by dividing by their median value. This means that the median of the newly normalized light curve will be equal to 1, and that the relative size of signals in the observation (such as transits) will be maintained.
A normalization can be performed using the normalize()
method of a KeplerLightCurve
, for example:
lc_collection[4].normalize().plot();
In the figure above, we have plotted the normalized PDCSAP flux for Quarter 4. The median normalized flux is at 1, and the transit depths lie around 0.991, indicating a 0.9% dip in brightness due to the planet transiting the star.
The LightCurveCollection
also has a plot()
method. We can use it to plot the PDCSAP flux. The method automatically normalizes the flux in same way we did for a single quarter above.
lc_collection.plot();
As the above figure shows, this method only normalizes the flux on a “per quarter” basis. It is convenient, but it does not normalize all quarters to the same value. We’ll explore how to create a uniform light curve in the section below.
Combining Multiple Observations into a Single Light Curve#
Finally, we can combine these different light curves into a single KeplerLightCurve
object. This is done using the stitch()
method. This method concatenates all quarters in our LightCurveCollection
together, and normalizes them at the same time, in the manner we saw above.
lc_stitched = lc_collection.stitch()
lc_stitched
time | flux | flux_err | quality | cadenceno | sap_flux | sap_flux_err | sap_quality |
---|---|---|---|---|---|---|---|
electron / s | electron / s | ||||||
Time | float64 | float64 | int32 | int32 | float64 | float64 | int32 |
323.535469887247 | 9.9982172e-01 | 9.0666197e-04 | 0 | 303550 | 4.4123199e+04 | 3.9178436e+01 | 0 |
323.5361509627983 | 1.0015014e+00 | 9.0694579e-04 | 0 | 303551 | 4.4196961e+04 | 3.9191528e+01 | 0 |
323.53683203834953 | 9.9916983e-01 | 9.0646150e-04 | 0 | 303552 | 4.4094609e+04 | 3.9169014e+01 | 0 |
323.53751321390155 | 1.0004932e+00 | 9.0684980e-04 | 0 | 303553 | 4.4152727e+04 | 3.9185482e+01 | 0 |
323.5381942894601 | 1.0016636e+00 | 9.0715149e-04 | 0 | 303554 | 4.4204141e+04 | 3.9197262e+01 | 0 |
323.53887536501134 | 1.0004702e+00 | 9.0694142e-04 | 0 | 303555 | 4.4151770e+04 | 3.9184967e+01 | 0 |
323.53955654056335 | 1.0002652e+00 | 9.0699492e-04 | 0 | 303556 | 4.4142805e+04 | 3.9183792e+01 | 0 |
323.54023751611385 | 1.0009918e+00 | 9.0719474e-04 | 0 | 303557 | 4.4174742e+04 | 3.9188377e+01 | 0 |
323.5409185916724 | 1.0010544e+00 | 9.0732594e-04 | 0 | 303558 | 4.4177527e+04 | 3.9188877e+01 | 0 |
... | ... | ... | ... | ... | ... | ... | ... |
1590.8386504729278 | 1.0013921e+00 | 1.5821219e-04 | 0 | 72523 | 4.4960405e+04 | 8.3422705e+00 | 0 |
1590.8590848185122 | 1.0014743e+00 | 1.5822535e-04 | 0 | 72524 | 4.4955587e+04 | 8.3435369e+00 | 0 |
1590.8795192642137 | 1.0015966e+00 | 1.5824659e-04 | 10000010000000 | 72525 | 4.4972721e+04 | 8.3468628e+00 | 10000010000000 |
1590.8999538100325 | 1.0013949e+00 | 1.5824737e-04 | 0 | 72526 | 4.4957718e+04 | 8.3462369e+00 | 0 |
1590.9203881556168 | 1.0018461e+00 | 1.5826061e-04 | 0 | 72527 | 4.4968369e+04 | 8.3480504e+00 | 0 |
1590.9408227014355 | 1.0015758e+00 | 1.5827502e-04 | 0 | 72528 | 4.4952959e+04 | 8.3489480e+00 | 0 |
1590.961257147137 | 1.0023616e+00 | 1.5829698e-04 | 0 | 72529 | 4.4968049e+04 | 8.3509350e+00 | 0 |
1590.9816914927214 | 1.0018577e+00 | 1.5831348e-04 | 0 | 72530 | 4.4957296e+04 | 8.3522815e+00 | 0 |
1591.0021260380745 | 1.0025455e+00 | 1.5843290e-04 | 0 | 72531 | 4.4942709e+04 | 8.3533206e+00 | 0 |
This returns a single KeplerLightCurve
! It is in all ways identical to KeplerLightCurve
of a single quarter, just longer. We can plot it the usual way.
lc_stitched.plot();
In this final normalized light curve, the interesting observational features of the star are more clear. Specifically: repeating transits that can be used to characterize planets and a noisy stellar flux that can be used to study brightness variability through asteroseismology.
Normalizing individual Kepler Quarters before combining them to form a single light curve isn’t the only way to make sure different quarters are consistent with one another. For a breakdown of other available methods and their benefits, see Section 6. Stitching Kepler Quarters Together in Kinemuchi et al. 2012.
About this Notebook#
Authors: Oliver Hall (oliver.hall@esa.int), Geert Barentsen
Updated On: 2020-09-15
Citing Lightkurve and Astropy#
If you use lightkurve
or astropy
for published research, please cite the authors. Click the buttons below to copy BibTeX entries to your clipboard.
lk.show_citation_instructions()
When using Lightkurve, we kindly request that you cite the following packages:
- lightkurve
- astropy
- astroquery — if you are using search_lightcurve() or search_targetpixelfile().
- tesscut — if you are using search_tesscut().