# Klip Postprocessing Eval

> Evaluates the accuracy and computational efficiency of PCA-based PSF subtraction algorithms for high-contrast astronomical imaging. Specifically, it measures how well the algorithm mitigates speckle noise while recovering planetary signals compared to a reference implementation. Use when the user wants to benchmark on Beta Pictoris ($\beta$ Pic), HR8799, or asks about evaluating this task. Reports SNR.

- Skill: `qhjqhj00/klip-postprocessing-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/klip-postprocessing-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/klip-postprocessing-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/klip-postprocessing-eval

---


# klip-postprocessing-eval

> A PyTorch Benchmark for High-Contrast Imaging Post Processing — Ko, Douglas, and Hom (2024) (arXiv:2409.16466, 2024)

## What this evaluates

Evaluates the accuracy and computational efficiency of PCA-based PSF subtraction algorithms for high-contrast astronomical imaging. Specifically, it measures how well the algorithm mitigates speckle noise while recovering planetary signals compared to a reference implementation.

## Datasets

- **Beta Pictoris ($\beta$ Pic)** — total ?; splits: test (-1)
- **HR8799** — total ?; splits: test (-1)

## Metrics

- `SNR` **(primary)** — range: ratio
  - Signal-to-Noise Ratio calculated for each detected planet in the processed image. Defined as the peak planet flux divided by the local background noise standard deviation.
- `computation time` — range: seconds
  - Wall-clock time required to run full-frame PCA PSF subtraction on the dataset.

## Input / output format

**Input**: Multi-frame astronomical image cubes (sequences) for the Beta Pictoris and HR8799 systems.

**Output**: Processed single-frame images after PSF subtraction, SNR values for detected planets, and total processing time.

## Scoring recipe

```python
def evaluate(dataset, model_output):
    # model_output contains processed image and metadata
    planets = detect_planets(model_output.image)
    snr_values = []
    for planet in planets:
        snr = planet.peak_flux / local_background_noise_std(model_output.image, planet.mask)
        snr_values.append(snr)
    time_taken = model_output.computation_time
    return {"snr": snr_values, "time": time_taken}
```

## Common pitfalls

- The benchmark only compares full-frame PCA, ignoring pyKLIP's additional annular and subsection features that could improve SNR but increase runtime.
- SNR values are measured only for successfully detected planets; masked gray regions in the images are excluded from the calculation.

## Evidence (verbatim from paper)

> To benchmark our package torchKLIP against pyKLIP, we compared the SNR and computation time using full-frame PCA on the  $\beta$  Pic and HR8799 datasets.

## Citation

```bibtex
@misc{ko2024torchklip,
  title={A PyTorch Benchmark for High-Contrast Imaging Post Processing},
  author={Ko, Douglas, and Hom (2024)},
  year={2024},
  note={arXiv:2409.16466}
}
```

- arXiv: 2409.16466

