light-curve-preprocessing

Preprocess astronomical light curves with sigma clipping, flattening, and quality flag handling.

4|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill light-curve-preprocessing-generalreasoning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: light-curve-preprocessing
Source: https://github.com/GeneralReasoning/env-skillsbench/tree/main/exoplanet-detection-period/environment/skills/light-curve-preprocessing
Command: npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill light-curve-preprocessing-generalreasoning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Raw light curves often contain outliers, long-term trends, and data-quality flags that can mask or distort intrinsic signals. This Skill provides a practical recipe for cleaning, detrending, and stabilizing time-series data to enable robust period analysis and variability studies.

Core Features & Use Cases

  • Outlier removal using sigma clipping
  • Long-term trend removal (flattening) and optional detrending of high-frequency variability
  • Data-quality flag handling and visualization of preprocessing stages
  • End-to-end preprocessing pipeline for exoplanet transit searches or stellar variability investigations
  • Visual verification of each step to ensure signal preservation

Quick Start

Run a preprocessing pipeline on your light curve data to remove outliers, detrend, and flatten the signal before period analysis.

Frequently Asked Questions about light-curve-preprocessing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I preprocess light curves for period analysis?

To preprocess light curves for period analysis, apply sigma clipping to remove outliers, flatten the data to eliminate long-term trends, and filter out poor quality flags. This prepares time-series data for robust periodogram analysis and transit searches.

How do I remove outliers from TESS or Kepler time-series data?

Remove outliers from TESS or Kepler time-series data using sigma clipping. This process identifies and discards data points that deviate significantly from the statistical norm, preventing anomalous signals from distorting intrinsic stellar variability.

Does lightkurve work with this light curve preprocessing pipeline?

Lightkurve is supported as the underlying framework for this light curve preprocessing pipeline. It enables handling data quality flags, flattening long-term trends, and stabilizing time-series data from missions like Kepler and TESS.

What's the best way to detrend astronomical light curves for transit searches?

The best way to detrend astronomical light curves for transit searches is to apply a flattening filter that removes low-frequency variability while preserving high-frequency planetary transit signals. Visual verification of each step ensures signal preservation.

Why does data quality flag handling matter for exoplanet light curves?

Data quality flag handling matters for exoplanet light curves because flagged points often represent instrumental systematics or cosmic ray events. Filtering these ensures that reproducible preprocessing steps do not interpret artifacts as intrinsic stellar variability.