dual op• Data kinds: signal × signal → table
• Call: import fullseye as fs; fs.ledger.coherence(x, y, rate, win=None, hop=None, window='hann') (implementation को सीधे call करना हो तो import acoustics; acoustics.coherence(x, y, rate, win=None, hop=None, window='hann'), registry से लेना हो तो opsacoustics.get("coherence"))
ordinary coherence: y का कितना भाग x से linearly समझाया जाता है।
> नीचे का विस्तृत विवरण मूल text में है — सारांश और headings का अनुवाद हो चुका है।
gamma**2(f) = |Pxy|**2 / (Pxx * Pyy), Welch-averaged. It is bounded in [0, 1], and it is the number that says whether a transfer function is worth reading at a given frequency.
A single frame makes it identically 1.0 — the Cauchy-Schwarz inequality is an equality without averaging — so an unaveraged coherence is a perfect score that carries no information at all. That case is refused, not returned.
win defaults to the largest power of two leaving at least 8 frames, capped at 1024; the value used is returned.
Returns a dict: freqs, coherence, n_frames, win, hop, rate, mean_coherence, bias (the coherence a *pair of independent noise records* would show with this many frames, 1/n_frames — anything at or below this is indistinguishable from nothing).
Measured at 16 kHz over 16384 samples, win = 1024, 31 frames:
======================================= ============== ========
case mean coherence min
======================================= ============== ========
y = 2.5 * x (noiseless) 1.000000 1.0000
y = 0.8 * x delayed 37 samples 0.983003 0.9661
y = 2.5 x + independent noise, 0 dB SNR 0.509143 0.2219
y, x independent noise 0.035640 0.0001
======================================= ============== ========
Row three against its closed form: for output noise the expected coherence is SNR/(1+SNR) = 0.5000 at 0 dB, measured 0.5091. Row four against the bias floor 1/n_frames = 1/31 = 0.0323, measured 0.0356 — which is why bias is returned: an uncorrelated pair does not read zero, and reading 0.03 as "a little bit of coupling" is the mistake this number prevents. Row two shows the other honest limit: a pure delay is a perfectly linear system and still reads 0.983, not 1, because a delay of 37 samples moves signal across the frame boundaries the estimator averages over.
Raises ValueError: everything _as_signal refuses on either channel, unequal channel lengths, fewer than 2 frames, win longer than the record, an unknown window.
• acoustic_condition_monitoring family guide
• 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 में दिए गए हैं।
• acoustic_condition_monitoring — py -3.11 examples/acoustic_condition_monitoring.py
table को input के रूप में लेते हैं)dual)*Provenance: acoustics.py — ACOUSTICS operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.