Transit period from lightcurves

From XuShuwenn/RedAct · View interactive version

Transit period from lightcurves is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Detect exoplanet orbital periods in noisy stellar light curves by filtering, detrending, Box Least Squares search, harmonic checks, and refinement.

How to use this skill

Skill file

Transit Period Detection from Noisy Light Curves

This skill provides a robust workflow to recover a transiting exoplanet's orbital period from a light curve dominated by stellar variability (e.g., rotation with starspots). It focuses on resilient preprocessing and uses the Box Least Squares (BLS) periodogram for period identification, with safeguards against common pitfalls and aliases. Transit Least Squares (TLS) can be used when resources allow, but BLS is prioritized for reliability and speed.

When to Use

Activate this skill when you have:

Core Workflow

Follow these steps end-to-end. Keep units consistent (days for time).

1) Data ingestion and initial QA

2) Outlier removal

3) Detrending/flattening to remove stellar variability

4) BLS period search (Astropy)

5) Candidate validation and harmonic checks

6) Output

Verification

Before finalizing:

Common Pitfalls and How to Avoid Them

Optional Script Usage

A helper script is included to run this workflow end-to-end with configurable options:

Example:

The script prints diagnostics (candidate periods, power, basic SNR, harmonic check results) and writes the final period as a single line to the output file.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.