cosmic_ray_reject — ASTROSTACK cosmic op

• Data kinds: image2d → image2d

• Call: import fullseye as fs; fs.ledger.cosmic_ray_reject(frame, sigma=5.0, f_lim=2.0, replace_box=5, iters=1) (implementation को सीधे call करना हो तो import astrostack; astrostack.cosmic_ray_reject(frame, sigma=5.0, f_lim=2.0, replace_box=5, iters=1), registry से लेना हो तो opsastrostack.get("cosmic_ray_reject"))

• Ledger के ज़रिए return value: fullseye.ledger.cosmic_ray_reject(...) केवल घोषित out type image2d का value लौटाता है (मूल function सहायक जानकारी भी लौटाता है)। जो हिस्सा छोड़ दिया गया है उसकी ज़रूरत हो तो fullseye.ledger.cosmic_ray_reject.raw(...) का उपयोग करें, या astrostack.cosmic_ray_reject को सीधे call करें।

• मूल function का return: (cleaned, mask) -> image2d

उपयोग

एक frame से cosmic ray हटाना (Laplacian sharpness)।

van Dokkum, *Cosmic-Ray Rejection by Laplacian Edge Detection*, PASP 113, 1420 (2001), विचार यह है —— cosmic rays तारों से अधिक तीखी होती हैं। तारे PSF से धुंधले होते हैं और इसलिए हमेशा कई pixels में फैले होते हैं, जबकि cosmic rays optics से नहीं गुज़रतीं और 1 से कुछ pixels के भीतर उठती हैं। इसलिए

1. Laplacian L के धनात्मक भाग को noise से normalise करके significance S = L / (2 sigma_noise) बनाएँ, और

2. इसकी तुलना fine-structure image F = median3 - median7(median3) से करें; केवल जहाँ L / F f_lim से अधिक हो उसे cosmic ray माना जाता है।

शर्त 2 के बिना, तारे का केंद्र हमेशा cosmic ray जैसा दिखता है (तारे भी स्थानीय रूप से नुकीले होते हैं)। f_lim वही सीमा है; मूल पेपर 2.0 की सिफ़ारिश करता है।

iters बढ़ाने से हटाना → फिर से मापना दोहराया जाता है (जब बड़े hits के wings बचे रहें)। बदलने के लिए replace_box window में बिना दूषित pixels का median उपयोग होता है।

(cleaned, mask) लौटाता है:

• cleaned —— (H, W) float64, cosmic-ray pixels बदली हुई image।

• mask —— (H, W) bool, True = cosmic ray माना गया pixel।

Raises ValueError: यदि 2-D नहीं / non-finite मान हैं / *sigma* non-positive है / *f_lim* non-positive है / *replace_box* 3 से कम या सम (even) है।

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• astro_stacking — py -3.11 examples/astro_stacking.py

वे अगले ops जिनसे type जुड़ता है (image2d को input के रूप में लेते हैं)

frame_quality · noise_sigma · star_detect · psf_fit · aperture_photometry · frame_align

इसी category के (cosmic)

cosmic_ray_reject_stack


*Provenance: astrostack.py — ASTROSTACK operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.