Skip to content
Back to skills

Multiband Lomb Scargle Period

ASecurity

Estimate periodicity from irregularly sampled multi-band time series using the multiband Lomb-Scargle periodogram, then phase-fold observations

  • 61 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 12, 2026
datapython

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add wenmin-wu/ds-skills --skill multiband-lomb-scargle-period --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Multiband Lomb Scargle Period?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Multiband Lomb Scargle Period
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wenmin-wu-multiband-lomb-scargle-period/badge)](https://www.skillsdirectory.com/skills/wenmin-wu-multiband-lomb-scargle-period)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: timeseries-multiband-lomb-scargle-period
description: Estimate periodicity from irregularly sampled multi-band time series using the multiband Lomb-Scargle periodogram, then phase-fold observations
domain: timeseries
---

# Multiband Lomb-Scargle Period Estimation

## Overview

For irregularly sampled multi-band time series (e.g. photometric light curves), the multiband Lomb-Scargle periodogram estimates the dominant period by jointly fitting all bands. After finding the best period, phase-fold observations (time mod period) to expose the underlying shape. The period and phase-folded features are powerful for classification of periodic signals.

## Quick Start

```python
import numpy as np
from gatspy.periodic import LombScargleMultiband

def estimate_period(times, values, errors, bands, t_min=0.1, t_max=10.0):
    """Estimate period from multi-band irregular time series.
    
    Args:
        times: observation timestamps
        values: measured values (flux)
        errors: measurement uncertainties
        bands: passband identifiers per observation
        t_min, t_max: period search range
    """
    model = LombScargleMultiband(fit_period=True)
    model.optimizer.set(
        period_range=(t_min, t_max),
        first_pass_coverage=5)
    model.fit(times, values, dy=errors, filts=bands)
    return model.best_period

def phase_fold(times, period):
    """Fold time series by estimated period."""
    return (times / period) % 1.0

# Usage
period = estimate_period(df.mjd, df.flux, df.flux_err, df.passband)
df['phase'] = phase_fold(df.mjd, period)
```

## Key Decisions

- **Multiband jointly**: fitting all bands simultaneously is more robust than per-band
- **Period range**: set t_min > median cadence, t_max < half the observation span
- **first_pass_coverage=5**: coarse grid density; increase for more precision
- **Phase features**: after folding, compute per-phase-bin statistics as features

## References

- Source: [the-plasticc-astronomy-starter-kit](https://www.kaggle.com/code/michaelapers/the-plasticc-astronomy-starter-kit)
- Competition: PLAsTiCC Astronomical Classification

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.