Token导航 LogoToken导航TokenDH.com
研究检索只读clawhub未标认证来源可访问clear审计通过

exoplanet-detection-period-box-least-squares系外行星探测周期盒最小二乘法

Agent Skill

exoplanet-detection-period-box-least-squares 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,088

周安装

87

GitHub Stars

公开资料未说明

下载量

696
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:exoplanet-detection-period-box-least-squares(系外行星探测周期盒最小二乘法)
来源仓库:https://github.com/wu-uk/exoplanet-detection-period-box-least-squares
安装命令:
openclaw skills install exoplanet-detection-period-box-least-squares
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install exoplanet-detection-period-box-least-squares

简介

应用盒最小二乘法 (BLS) 检测凌日系外行星周期信号。

  • 适合天文光变曲线分析与周期性事件识别时使用。exoplanet-detection-period-box-least-squares 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 需在 OpenClaw 中通过 clawhub 安装,输入光度数据后执行周期图计算。
  • 建议评估是否涉及科学计算库调用或高精度数值处理权限。
  • 适用于天体物理学中的系外行星探测算法实现场景。

SKILL.md

name
box-least-squares
description
Box Least Squares (BLS) periodogram for detecting transiting exoplanets and eclipsing binaries. Use when searching for periodic box-shaped dips in light curves. Alternative to Transit Least Squares, available in astropy.timeseries. Based on Kovács et al. (2002).

Box Least Squares (BLS) Periodogram

The Box Least Squares (BLS) periodogram is a statistical tool for detecting transiting exoplanets and eclipsing binaries in photometric time series data. BLS models a transit as a periodic upside-down top hat (box shape) and finds the period, duration, depth, and reference time that best fit the data.

Overview

BLS is built into Astropy and provides an alternative to Transit Least Squares (TLS). Both search for transits, but with different implementations and performance characteristics.

Key parameters BLS searches for:

  • Period (orbital period)
  • Duration (transit duration)
  • Depth (how much flux drops during transit)
  • Reference time (mid-transit time of first transit)

Installation

BLS is part of Astropy:

pip install astropy

Basic Usage

import numpy as np
import astropy.units as u
from astropy.timeseries import BoxLeastSquares

# Prepare data
# time, flux, and flux_err should be numpy arrays or Quantities
t = time * u.day  # Add units if not already present
y = flux
dy = flux_err  # Optional but recommended

# Create BLS object
model = BoxLeastSquares(t, y, dy=dy)

# Automatic period search with specified duration
duration = 0.2 * u.day  # Expected transit duration
periodogram = model.autopower(duration)

# Extract results
best_period = periodogram.period[np.argmax(periodogram.power)]
print(f"Best period: {best_period:.5f}")

Using autopower vs power

autopower: Automatic Period Grid

Recommended for initial searches. Automatically determines appropriate period grid:

# Specify duration (or multiple durations)
duration = 0.2 * u.day
periodogram = model.autopower(duration)

# Or search multiple durations
durations = [0.1, 0.15, 0.2, 0.25] * u.day
periodogram = model.autopower(durations)

power: Custom Period Grid

For more control over the search:

# Define custom period grid
periods = np.linspace(2.0, 10.0, 1000) * u.day
duration = 0.2 * u.day

periodogram = model.power(periods, duration)

Warning: Period grid quality matters! Too coarse and you'll miss the true period.

Objective Functions

BLS supports two objective functions:

1. Log Likelihood (default)

Maximizes the statistical likelihood of the model fit:

periodogram = model.autopower(0.2 * u.day, objective='likelihood')

2. Signal-to-Noise Ratio (SNR)

Uses the SNR with which the transit depth is measured:

periodogram = model.autopower(0.2 * u.day, objective='snr')

The SNR objective can improve reliability in the presence of correlated noise.

Complete Example

import numpy as np
import matplotlib.pyplot as plt
import astropy.units as u
from astropy.timeseries import BoxLeastSquares

# Load and prepare data
data = np.loadtxt('light_curve.txt')
time = data[:, 0] * u.day
flux = data[:, 1]
flux_err = data[:, 3]

# Create BLS model
model = BoxLeastSquares(time, flux, dy=flux_err)

# Run BLS with automatic period grid
# Try multiple durations to find best fit
durations = np.linspace(0.05, 0.3, 10) * u.day
periodogram = model.autopower(durations, objective='likelihood')

# Find peak
max_power_idx = np.argmax(periodogram.power)
best_period = periodogram.period[max_power_idx]
best_duration = periodogram.duration[max_power_idx]
best_t0 = periodogram.transit_time[max_power_idx]
max_power = periodogram.power[max_power_idx]

print(f"Period: {best_period:.5f}")
print(f"Duration: {best_duration:.5f}")
print(f"T0: {best_t0:.5f}")
print(f"Power: {max_power:.2f}")

# Plot periodogram
import matplotlib.pyplot as plt
plt.plot(periodogram.period, periodogram.power)
plt.xlabel('Period [days]')
plt.ylabel('BLS Power')
plt.show()

Peak Statistics for Validation

Use compute_stats() to calculate detailed statistics about a candidate transit:

# Get statistics for the best period
stats = model.compute_stats(
    periodogram.period[max_power_idx],
    periodogram.duration[max_power_idx],
    periodogram.transit_time[max_power_idx]
)

# Key statistics for validation
print(f"Depth: {stats['depth']:.6f}")
print(f"Depth uncertainty: {stats['depth_err']:.6f}")
print(f"SNR: {stats['depth_snr']:.2f}")
print(f"Odd/Even mismatch: {stats['depth_odd'] - stats['depth_even']:.6f}")
print(f"Number of transits: {stats['transit_count']}")

# Check for false positives
if abs(stats['depth_odd'] - stats['depth_even']) > 3 * stats['depth_err']:
    print("Warning: Significant odd-even mismatch - may not be planetary")

Validation criteria:

  • High depth SNR (>7): Strong signal
  • Low odd-even mismatch: Consistent transit depth
  • Multiple transits observed: More reliable
  • Reasonable duration: Not too long or too short for orbit

Period Grid Sensitivity

The BLS periodogram is sensitive to period grid spacing. The autoperiod() method provides a conservative grid:

# Get automatic period grid
periods = model.autoperiod(durations, minimum_period=1*u.day, maximum_period=10*u.day)
print(f"Period grid has {len(periods)} points")

# Use this grid with power()
periodogram = model.power(periods, durations)

Tips:

  • Use autopower() for initial searches
  • Use finer grids around promising candidates
  • Period grid quality matters more for BLS than for Lomb-Scargle

Comparing BLS Results

To compare multiple peaks:

# Find top 5 peaks
sorted_idx = np.argsort(periodogram.power)[::-1]
top_5 = sorted_idx[:5]

print("Top 5 candidates:")
for i, idx in enumerate(top_5):
    period = periodogram.period[idx]
    power = periodogram.power[idx]
    duration = periodogram.duration[idx]

    stats = model.compute_stats(period, duration, periodogram.transit_time[idx])

    print(f"\
{i+1}. Period: {period:.5f}")
    print(f"   Power: {power:.2f}")
    print(f"   Duration: {duration:.5f}")
    print(f"   SNR: {stats['depth_snr']:.2f}")
    print(f"   Transits: {stats['transit_count']}")

Phase-Folded Light Curve

After finding a candidate, phase-fold to visualize the transit:

# Fold the light curve at the best period
phase = ((time.value - best_t0.value) % best_period.value) / best_period.value

# Plot to verify transit shape
import matplotlib.pyplot as plt
plt.plot(phase, flux, '.')
plt.xlabel('Phase')
plt.ylabel('Flux')
plt.show()

BLS vs Transit Least Squares (TLS)

Both methods search for transits, but differ in implementation:

Box Least Squares (BLS)

Pros:

  • Built into Astropy (no extra install)
  • Fast for targeted searches
  • Good statistical framework
  • compute_stats() provides detailed validation

Cons:

  • Simpler transit model (box shape)
  • Requires careful period grid setup
  • May be less sensitive to grazing transits

Transit Least Squares (TLS)

Pros:

  • More sophisticated transit models
  • Generally more sensitive
  • Better handles grazing transits
  • Automatic period grid is more robust

Cons:

  • Requires separate package
  • Slower for very long time series
  • Less control over transit shape

Recommendation: Try both! TLS is often more sensitive, but BLS is faster and built-in.

Integration with Preprocessing

BLS works best with preprocessed data. Consider this pipeline:

  1. Quality filtering: Remove flagged data points
  2. Outlier removal: Clean obvious artifacts
  3. Detrending: Remove stellar variability (rotation, trends)
  4. BLS search: Run period search on cleaned data
  5. Validation: Use compute_stats() to check candidate quality

Key Considerations

  • Preprocessing should preserve transit shapes (use gentle methods like flatten())
  • Don't over-process - too aggressive cleaning removes real signals
  • BLS needs reasonable period and duration ranges
  • Always validate with multiple metrics (power, SNR, odd-even)

Common Issues

Issue: No clear peak

Causes:

  • Transits too shallow
  • Wrong duration range
  • Period outside search range
  • Over-aggressive preprocessing

Solutions:

  • Try wider duration range
  • Extend period search range
  • Use less aggressive flatten() window
  • Check raw data for transits

Issue: Period is 2× or 0.5× expected

Causes:

  • Missing alternating transits
  • Data gaps
  • Period aliasing

Solutions:

  • Check both periods manually
  • Examine odd-even statistics
  • Look at phase-folded plots for both periods

Issue: High odd-even mismatch

Cause:

  • Not a planetary transit
  • Eclipsing binary
  • Instrumental artifact

Solution:

  • Check stats['depth_odd'] vs stats['depth_even']
  • May not be a transiting planet

Dependencies

pip install astropy numpy matplotlib
# Optional: lightkurve for preprocessing
pip install lightkurve

References

Official Documentation

Key Papers

  • Kovács, Zucker, & Mazeh (2002): Original BLS paper - A&A 391, 369
  • Hartman & Bakos (2016): VARTOOLS implementation - A&C 17, 1

Related Resources

When to Use BLS

Use BLS when:

  • You want a fast, built-in solution
  • You need detailed validation statistics (compute_stats)
  • Working within the Astropy ecosystem
  • You want fine control over period grid

Use TLS when:

  • Maximum sensitivity is critical
  • Dealing with grazing or partial transits
  • Want automatic robust period grid
  • Prefer more sophisticated transit models

Use Lomb-Scargle when:

  • Searching for general periodic signals (not specifically transits)
  • Detecting stellar rotation, pulsation
  • Initial exploration of periodicity

For exoplanet detection, both BLS and TLS are valid choices. Try both and compare results!

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

88.36%
按下载量换算615

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills