Metadata-Version: 2.1
Name: tessapps
Version: 0.7.0
Summary: TESS Aperture Photometry Pollution eStimator
Author: Leonidas Liponis
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Classifier: License :: Other/Proprietary License
Requires-Dist: numpy>=1.21.2
Requires-Dist: scipy>=1.7.2
Requires-Dist: astropy>=5.0
Requires-Dist: astroquery>=0.4.6
Requires-Dist: matplotlib>=3.5
Requires-Dist: lightkurve>=2.0
Project-URL: Homepage, https://pypi.org/project/tessapps
Project-URL: Repository, https://codeberg.org/leolip128/tessapps

# TESS Aperture Photometry Pollution eStimator [![PyPI](https://img.shields.io/pypi/v/tessapps)](https://pypi.org/project/tessapps/) <a id="top"></a>

*Note: this module is not yet fully developed. For commercial use, please wait for v1.0.0. It is expected to be released by the end of 2026.*

## Description

A python module that calculates a contamination factor in the aperture region of a TPF based on the relative flux of the background stars and the target.

<p align="center">
    <img src="https://codeberg.org/leolip128/tessapps/raw/branch/main/documentation/other/images/TESSapps.png" alt="TESSapps logo" style="width:36.79%; height:auto;">
</p>

Full documentation is available [here](https://codeberg.org/leolip128/tessapps/src/branch/main/documentation/README.md).

## Installation

Python >=3.10 is required. More information about dependencies can be found [here](https://codeberg.org/leolip128/tessapps/src/branch/main/documentation/installation/README.md).

### Prerequisites

These are the packages that support Python >=3.10:

- ```numpy``` (>=1.21.2): to make all calculations
- ```scipy``` (>=1.7.2): to integrate the gaussian function
- ```astropy``` (>=5.0): to build data used in this module
- ```astroquery``` (>=0.4.6): to find stars in the target's region
- ```matplotlib``` (>=3.5): to plot the results
- ```lightkurve``` (>=2.0): to fetch and load TPF files

Install with ```pip install tessapps```.

## Example

A TPF is needed to run this module. Here is an example with HAT-P-1:

```python
import tessapps as tapps
import tessapps.search_parameters_to_tpf as tspt

tpf = tspt.tpf_finder(TIC=346338552, sector=84, exptime=120)
contamination, error = tapps.run(tpf, result=True)
```
```
>>> The background contributes (54.370 ± 0.194)% of the total flux in the aperture region.
```

The first number is the contamination factor, and the second is its error. More information about usage in [here](https://codeberg.org/leolip128/tessapps/src/branch/main/documentation/usage/README.md).

## Authors

Leonidas Liponis, Physicist (Aristotle University of Thessaloniki)

## License

<a href="https://codeberg.org/leolip128/tessapps">TESSapps</a> © 2026 by <a href="https://codeberg.org/leolip128">Leonidas Liponis</a> is licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>.

## Links

PyPI page: https://pypi.org/project/tessapps

Codeberg page: https://codeberg.org/leolip128/tessapps

Email (for contact): lliponis (at) physics (dot) auth (dot) gr

## AI Disclosure

No LLMs were used in the making of this project. All code was generated and verified by humans, so it will only contain human-made mistakes. All commits made by bots will be refused, and commits made by humans will be checked: published code should be fully understandable by the authors.

## To-Do list

- add description
- redo the examples since they reference the flux instead of the contamination factor
- add the scoring function
- add more stuff in this to-do list

[Back to the top](#top)
