Data Analysis
light-curve-preprocessing avatar

light-curve-preprocessing

Preprocessing and cleaning astronomical light curves using Lightkurve. Tools for outlier removal, flattening, trend detrending, and quality flag handling for time-series analysis.

Introduction

This skill provides a robust framework for cleaning and preparing raw astronomical light curve data for subsequent period analysis, such as transit detection or stellar variability studies. It is designed for researchers, data scientists, and astronomers working with time-series photometry from missions like TESS or Kepler. The skill enables users to mitigate common instrumental and environmental artifacts that often contaminate celestial observations. By leveraging the industry-standard Lightkurve library alongside NumPy, it allows for iterative data refinement, ensuring that real physical signals like transits or pulsations are preserved while noise is effectively suppressed.

  • Perform multi-stage outlier removal using sigma-clipping or custom statistical thresholds to discard erroneous data points.

  • Apply flattening techniques, including Savitzky-Golay filters, to remove low-frequency instrumental trends and stellar rotation signals.

  • Implement iterative sine fitting to isolate and remove specific periodic high-frequency noise components from the light curve.

  • Handle diverse data quality flags, with specific support for TESS mission conventions to identify and remove corrupted time intervals.

  • Provide visualization capabilities to inspect the impact of each preprocessing step on the time-series integrity.

  • Facilitate the preservation of transit shapes through carefully tuned window-length parameters during detrending.

  • Ensure all processing steps are performed in the correct logical sequence: flag filtering, outlier removal, and then trend analysis.

  • Input data should ideally be formatted in standard light curve structures (Time, Flux, Error, Flags); outputs are cleaned versions of these same arrays.

  • Be cautious with iterative filtering; over-processing or overly aggressive window lengths can inadvertently remove genuine astrophysical signals like shallow planetary transits.

  • Always include flux error estimates in your analysis to ensure subsequent period-finding algorithms apply correct statistical weighting.

  • Use visual validation at each stage of the pipeline to verify that signal-to-noise ratios are improving rather than degrading due to parameter misconfiguration.

Repository Stats

Stars
1,084
Forks
271
Open Issues
38
Language
PDDL
Default Branch
main
Sync Status
Idle
Last Synced
Apr 30, 2026, 11:06 AM
View on GitHub