{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Understanding Crowding in TESS data\n", "\n", "Welcome everyone to our *TESS* Lightkurve tutorial!\n", "\n", "## Authors\n", "\n", "[Rebekah Hounsell](https://heasarc.gsfc.nasa.gov/docs/tess/helpdesk.html) - Support scientist for *TESS* in the NASA GSFC GI Office. \n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Learning goals\n", "\n", "In this tutorial, we will teach the user about crowding in the *TESS* data products and how to correct for it. \n", "\n", "The tutorial assumes a basic knowledge of python and astronomy, and will walk the user through several of the concepts outlined below:\n", "\n", "1. Downloading and comparing LightCurve Object data\n", "2. Examining a TargetPixel File (TPF) for crowding\n", "3. Creating a light curve from a TPF\n", "4. Removing the effects of scattered light and noise\n", "5. Removing the effects of crowding\n", "\n", "This tutorial is designed for users that have previous experience with *Lightkurve*." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Imports\n", "\n", "This tutorial requires the use of specific packages:\n", "- [**Lightkurve**](https://docs.lightkurve.org/index.html) to work with *TESS* data (v2.0.1)\n", "- [**Matplotlib**](https://matplotlib.org/) for plotting.\n", "- [**Numpy**](https://numpy.org) for manipulating the data." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## First time users\n", "\n", "If you are not that experienced with *Python*, or cannot download *Lightkurve*, you can run this notebook as a [Colab notebook](https://colab.research.google.com/notebooks/intro.ipynb?utm_source=scs-index). Colaboratory allows users to write and execute *Python* in your browser with zero configuration required. \n", "\n", "All you need is a Google account and to copy and paste in the following command at the top of your colab notebook:\n", "\n", "`!pip install git+https://github.com/lightkurve/lightkurve.git --quiet`\n", "\n", "This downloads the *Lightkurve* package." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import lightkurve as lk\n", "import matplotlib.pyplot as plt\n", "from lightkurve.correctors import RegressionCorrector, DesignMatrix\n", "from lightkurve.correctors import PLDCorrector\n", "import warnings" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Introduction into crowding \n", "\n", "*TESS* photometry, while high-cadence and of high quality, does suffer from crowding issues. \n", "A single *TESS* pixel corresponds to 21 arcseconds (~0.35 arc min) on sky and the *TESS* Pixel Response Function (PRF) is very large compared to the pixel. A target of interest may therefore be contaminated by any number of neighboring objects, and it is important that the light from these other objects be accounted for and removed. \n", "\n", "For exoplanets, if this excess flux is not removed, it can cause a decrease in the apparent planet transit depth and lead to a systematic underestimation of the planet radii.\n", "\n", "[LightCurve Objects](https://docs.lightkurve.org/tutorials/1-getting-started/what-are-lightcurve-objects.html) have been corrected for this crowding via the data processing pipeline developed by the Science Processing Operations Center (SPOC). A description of this correction and its application is provided in Section 2.3.11 of [this paper](https://iopscience.iop.org/article/10.1086/667698/pdf). The correction however is applied only to the PDCSAP flux and not the SAP flux. \n", "\n", "The crowding correction applied focuses on two parameters:\n", " - The crowding metric: This reflects what fraction of the flux in the aperture is due to the target itself, not the nearby light sources. \n", " - The flux fraction: Similar to excess flux leaking into the aperture, a fraction of the PRF of the target may not be captured in it. To account for this missing fraction, the flux fraction is computed.\n", " \n", "If PDCSAP flux is not available, the user may apply the corrections outlined below to remove not only the instrumental noise, but any additional crowding effect." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. Downloading and comparing LightCurve Object data\n", "\n", "In this tutorial we will be examining at the binary star system [WR21a](https://en.wikipedia.org/wiki/WR_21a). Let's first see if there are any LightCurve objects avalible for download. " ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "SearchResult containing 4 data products.\n", "\n", "
# | mission | year | author | exptime | target_name | distance |
---|---|---|---|---|---|---|
s | arcsec | |||||
0 | TESS Sector 09 | 2019 | QLP | 1800 | 464570167 | 0.0 |
1 | TESS Sector 10 | 2019 | QLP | 1800 | 464570167 | 0.0 |
2 | TESS Sector 36 | 2021 | SPOC | 120 | 464570167 | 0.0 |
3 | TESS Sector 37 | 2021 | SPOC | 120 | 464570167 | 0.0 |