countrate_to_counts — REPRCONV algebra op

• Data kinds: countrate → counts

• Call: import fullseye as fs; fs.ledger.countrate_to_counts(countrate, gate_s=0.001) (implementation को सीधे call करना हो तो import reprconv; reprconv.countrate_to_counts(countrate, gate_s=0.001), registry से लेना हो तो opsreprconv.get("countrate_to_counts"))

उपयोग

count rate [Hz] → गिनती counts। countrate से निकास (उलटने योग्य)।

unit ही conversion की पूरी सामग्री है: [1/s] * [s] = [1]। gate_s integration window के seconds हैं, default 1 ms। counts "हर time bin में photon count" का type है, इसलिए rate series को सीधे counts कहलाने देने पर यह 7 orders of magnitude के अंतर के साथ चुपचाप पार हो जाता है (TYPE_CHECKS दोनों को केवल "non-negative 1-D" के रूप में देखता है)।

counts_to_countrate के साथ round trip में measured max|Δ| = 9.3e-10 (मान की range 1e3-1e7 Hz है, इसलिए यह relative 1e-16 = double precision rounding की 1 unit है। केवल absolute value देखें तो बड़ा लगता है, इसलिए rate जैसी बहुत चौड़ी range वाली मात्राएँ relative में बताई जाती हैं)।

★2 बार लगाने पर भी exception नहीं आता। TYPE_TO_SORT countrate को counts में fold करता है, इसलिए exit सीधे entrance से जुड़ जाता है। measured (2026-09-08, 1,200 Hz को gate 1 ms से): 1 बार में 1.2000 counts, 1 बार और गुज़ारने पर 0.0012 counts -- 1,000 गुना की गड़बड़ी, बिना negative value या NaN के पार हो जाती है। केवल मानों से "rate है या count" तय करने का कोई तरीका नहीं है, इसलिए इस 1 मामले को check से नहीं बल्कि केवल caller के अनुशासन से बचाया जा सकता है (जोड़ा गया path लिखकर रखें)।

Args:

countrate: (N,) non-negative rate [Hz]।

gate_s: integration window [s]। > 0।

Returns:

(N,) float64 non-negative counts।

Raises:

ValueError: negative rate / gate_s <= 0 / गलत shape / non-finite।

संदर्भ (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 करते हैं)

• representation_roundtrip — py -3.11 examples/representation_roundtrip.py

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

counts_to_countrate

इसी category के (algebra)

angle_to_matrix · matrix_to_angle · rot_scale_to_matrix · matrix_to_rot_scale · shift_to_vector · vector_to_shift · cscalar_to_polar · polar_to_cscalar


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

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