Metadata-Version: 2.4
Name: tesscentroidvetting
Version: 1.4.1
Summary: TESS Centroid Vetting
Author-email: Rafael Rodrigues <rafael.rodrgs@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/exo-pt/TESS-Centroid_vetting
Keywords: TESS,centroids,exoplanets,PRF,vetting,transits,python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Astronomy
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: astropy
Requires-Dist: astroquery
Requires-Dist: scipy
Requires-Dist: lightkurve
Dynamic: license-file

# TESS centroid_vetting
[![PyPI Badge](https://img.shields.io/pypi/v/tesscentroidvetting)](https://pypi.org/project/tesscentroidvetting/)
# Overview

`TESS-Centroid_vetting` provides photometric centroid offset analysis for vetting exoplanet candidates identified in TESS (Transiting Exoplanet Survey Satellite) data.<br/>
It was inspired by the graphical representation of the centroid in the Data Validation (DV) reports of Threshold Crossing Events (TCEs) produced by the TESS Science Processing Operations Center (SPOC) pipeline<br/>
The centroid representation allows identifying the source of the dips in a light curve, discarding potential false positives and identifying possible sources of contamination.<br/>
It is an open-source Python package that can analyze any TESS Target Pixel File.

![Img](https://raw.githubusercontent.com/exo-pt/TESS-Centroid_vetting/main/tesscentroidvetting_example.png)

# Method

The method is similar to the centroid offset analysis in TESS SPOC TCE DV reports, which measures centroids using difference imaging with PRF-based (pixel response function) centroid fitting.

`TESS-Centroid_vetting` lets users customize some parameters to handle edge cases, including:

- **Pixel masking:** ignores selected pixels during calculation, which helps avoid pixels that could skew the results (e.g., a nearby variable star).
- **In-transit / out-of-transit duration:** can be customized to avoid problematic cadences.

#### Current limitations (v1.4.0):

- The centroid uncertainties are not available.
- Multi-sector centroid fitting is not available.

Comparability with TESS TCE DVs: it has been evaluated in an ad-hoc basis that the result from `TESS-Centroid_vetting` is comparable to TESS TCE DVs. However, it has not been systematically evaluated yet.

# Documentation

Read the docs generated by DeepWiki:
[![Ask DeepWiki](https://img.shields.io/badge/Ask-DeepWiki-6b4fbb)](https://deepwiki.com/exo-pt/TESS-Centroid_vetting)

## Installation

Since version 1.2.0, a package is available at PyPi:
[![PyPI Badge](https://img.shields.io/pypi/v/tesscentroidvetting)](https://pypi.org/project/tesscentroidvetting/)
So, the simplest way of installing TESS-Centroid_Vetting is using pip:

`pip install tesscentroidvetting`

## Dependencies:
- numpy
- matplotlib
- astropy
- astroquery
- scipy
- lightkurve
- ipywidgets - only needed if interact=True in show_transit_margins()

## Usage
See the notebooks in Examples directory for usage.

## Acknowledgments
Sam Lee (https://github.com/orionlee) for implementing star's proper motion correction and transit margins display function, advising and testing. 
<br><br>
Michelle Kunimoto (https://github.com/mkunimoto) for writing **TESS-Plots**, whose code was used for the PRF centroid calculation.
<br><br>
Last but not least, Nora Eisner for [Planet Hunters Coffee Chat](https://github.com/noraeisner/PH_Coffee_Chat) series, introducing python for exoplanet detection (the difference image calculation was first borrowed from there), and for [Planet Hunters TESS](https://www.zooniverse.org/projects/nora-dot-eisner/planet-hunters-tess) citizen project, whose community [forum](https://www.zooniverse.org/projects/nora-dot-eisner/planet-hunters-tess/talk) is an invaluable source of knowledge and place to exchange views between amateurs and experts.

## Contributors
Rafael Rodrigues, Sam Lee

# References

TESS TCE DVs are described in:

- Twicken et al. 2020, TESS Science Data Products Description Document, https://archive.stsci.edu/missions/tess/doc/EXP-TESS-ARC-ICD-TM-0014-Rev-F.pdf

Their centroid offset analysis, based on the one developed for the Kepler mission, is described in:

- Twicken 2019, Data Validation: Difference Imaging and Centroid Analysis, https://ntrs.nasa.gov/citations/20190029148
- Bryson et al. 2013, Identification of Background False Positives from Kepler Data, https://iopscience.iop.org/article/10.1086/671767

