Coltess is a lightweight Python package for extracting light curves from TESS (Transiting Exoplanet Survey Satellite) Full Frame Images (FFIs).
- 🌟 Automated catalog generation from Gaia DR3
- 📥 Direct FFI downloads from MAST archive
- 🔭 Aperture photometry with local background subtraction
- ⚡ Parallel processing for analyzing thousands of images efficiently
- 📊 Periodogram analysis using Lomb-Scargle
- 🎯 Simple API designed for both interactive and scripted workflows
| Feature | Coltess | Lightkurve |
|---|---|---|
| Target | Raw FFI photometry | Pre-processed light curves + TPFs |
| Use case | Custom apertures, faint targets | Quick analysis of cataloged targets |
| Data products | DIY light curves | Official SPOC/QLP products |
| Flexibility | Full control | Standardized pipeline |
| Speed | Slower (raw processing) | Faster (pre-computed) |
When to use Coltess:
- You need custom aperture sizes
- Your target isn't in the TESS Input Catalog
- You want complete control over the photometry
- You're analyzing very faint sources
When to use Lightkurve:
- Your target has official light curves
- You want quick exploratory analysis
- You need TESS pipeline systematics corrections
pip install coltessgit clone https://github.com/yourusername/coltess.git
cd coltess
pip install -e .Core requirements:
- numpy
- pandas
- astropy >= 5.0
- astroquery
- photutils >= 1.5
- scipy
- matplotlib
- requests
Extract a light curve for Lambda Tau in just a few lines:
Note for Windows users: Parallel processing requires if __name__ == '__main__' guard in scripts. Windows + Jupyter users should use WSL or process images sequentially.
from coltess import create_catalog, get_tess_sectors, download_tess_sector_script
from coltess import process_images_parallel, load_photometry_data
import matplotlib.pyplot as plt
# 1. Create catalog and get star info
star = create_catalog("lambda tau", radius_arcmin=10.0, output_file="catalog.csv")
# 2. Find available TESS sectors
sectors = get_tess_sectors(star)
sector = int(sectors["sector"][0])
# 3. Download sector script
script_path = download_tess_sector_script(sector)
# 4. Process images in parallel
process_images_parallel(
script_file=script_path,
catalog_file="catalog.csv",
output_dir="photometry_results",
star=star
)
# 5. Load and plot light curve
times, fluxes = load_photometry_data("photometry_results", star)
plt.scatter(times, fluxes)
plt.xlabel("Julian Date")
plt.ylabel("Flux (e⁻/s)")
plt.title(f"Light Curve: {star.name}")
plt.show()Please refer to the examples folder.
Container for star information and photometry data.
Attributes:
name(str): Star identifierra(float): Right ascension in degreesdec(float): Declination in degreesgaia_id(str, optional): Gaia DR3 source IDtimes(np.ndarray, optional): Observation times (JD)fluxes(np.ndarray, optional): Measured fluxes
Main photometry processing class.
Parameters:
aperture_radius(int): Aperture radius in pixels (default: 10)annulus_inner(int): Inner annulus radius (default: 12)annulus_outer(int): Outer annulus radius (default: 14)zeropoint(float): Magnitude zeropoint (default: 20.44)
Methods:
process_image(fits_file, catalog_file, target_star, output_dir): Process single FITS imageload_catalog(catalog_file): Load Gaia catalog from CSV
Create Gaia DR3 catalog centered on target star.
Returns: StarData object with resolved coordinates
Resolve star name via SIMBAD.
Returns: StarData object
Query Gaia DR3 around sky position.
Returns: pandas DataFrame with sources
Find TESS sectors covering target.
Returns: pandas DataFrame with sector information
Download official MAST download script for sector.
Returns: Path to shell script
Download single TESS FFI using curl command.
Returns: Path to downloaded FITS file
Load light curve from photometry CSV files.
Returns: Tuple of (times, fluxes) as numpy arrays
Compute Lomb-Scargle periodogram.
Returns: Dictionary with periods, power, and detected peaks
Process TESS images in parallel.
Automatically downloads, analyzes, and cleans up temporary files for each image.
- Catalog Creation: Queries Gaia DR3 for all sources within a radius around your target
- Image Download: Retrieves TESS FFI files from MAST archive
- Source Matching: Identifies catalog sources within each image's field of view using WCS
- Centroid Refinement: Refines positions using center-of-mass centroiding
- Aperture Photometry:
- Measures flux in circular aperture around each source
- Estimates local background from surrounding annulus
- Subtracts background and calculates uncertainties
- Target Selection: Matches photometry to target star by position
Flux uncertainties are calculated including:
- Poisson noise from the source
- Sky background noise
- Background estimation uncertainty
The formula used is:
σ_flux = √(flux/gain + A_ap×σ_sky² + A_ap×σ_sky²/A_ann)
Where:
gain = 5.22 e⁻/ADU(TESS nominal)A_ap= aperture areaA_ann= annulus areaσ_sky= background standard deviation
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
If you use Coltess in your research, please cite:
@software{coltess2025,
author = {Manuel Garcia},
title = {Curves of Light from TESS (COLTESS): photometry tool for TESS FFIs},
year = {2026},
url = {https://github.com/alhazacod/coltess}
}Please also cite the relevant TESS papers:
- Ricker et al. 2015 (TESS Mission): 2015JATIS...1a4003R
And the data sources:
- Gaia DR3: 2023A&A...674A...1G
This package uses:
- Astropy for astronomical calculations
- Photutils for aperture photometry
- Astroquery for catalog access
- Data from the TESS mission and Gaia DR3
GPL-3.0-or-later - see LICENSE file for details
- 📧 Email: mangarciama@unal.edu.co
- 🐛 Issues: GitHub Issues
- 📖 Documentation: (coming soon)
- Write documentation.
- Use logging instead of prints.
Note: This is scientific research software. Always verify results and report any issues you encounter!