dual op• 数据种类:signal × signal → table
• 调用:import acoustics; acoustics.transfer_function(x, y, rate, win=None, hop=None, window='hann', estimator='h1', ref=1.0, floor_db=-200.0)(或 opsacoustics.get("transfer_function"))
以 `x 为输入、y 为输出估计 H(f)`,并给出相干。
> 以下的详细说明为原文 —— 摘要与标题已翻译。
`estimator`:
• `"h1" — Pxy / Pxx`. Unbiased when the noise is on the output.
The usual default and the right one for a driven test.
• `"h2" — Pyy / conj(Pxy)`. Unbiased when the noise is on the
input. It over-estimates the magnitude wherever H1 under-estimates it,
so the two together bracket the truth, and `|H1/H2| = gamma**2` exactly —
an identity worth checking rather than a coincidence.
Returns a dict: `freqs, response (complex), magnitude`,
`magnitude_db (relative to ref), phase_rad, coherence`,
`estimator, n_frames, win, hop, rate`.
Measured at 16 kHz over 16384 samples, win = 1024, 31 frames, white input:
• `y = 2.5 * x: mean |H| = 2.5000000000`, max deviation from 2.5 over
all bins 1.78e-15, mean `|phase|` 2.7e-17, mean coherence
1.0000000000.
• `y = 0.8 * x[n-37]`: the phase is a straight line in frequency of slope
`-2 pi * 37 / 16000` s. A least-squares fit to the unwrapped phase over
200-7000 Hz gives a group delay of 37.000004 samples against a true 37
(error 4.3e-06 samples), and `mean |H| = 0.792220` over the same bins
against a true 0.8 (max deviation 0.050).
• `y = 2.5 * x + n` with output noise at 0 dB SNR: H1 gives
`mean |H| = 2.523390` — 0.94 % from the truth — while H2 gives
5.043020, a factor of 2.0 too large, exactly as the theory predicts
when the noise sits on the output. And `|H1/H2|` equals the coherence
pointwise to 5.6e-16 (both mean 0.509143), which is the identity worth
knowing: the ratio of the two estimators *is* the coherence.
That third row is why the coherence is returned with the response. The H2
number is off by 100 % and there is nothing about 5.04 that looks wrong.
Raises `ValueError: everything :func:coherence` refuses, plus an
unknown `estimator and ref <= 0`.
• acoustic_condition_monitoring 族使用指南
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者・年份)与用途见上面的族使用指南。
• acoustic_condition_monitoring — py -3.11 examples/acoustic_condition_monitoring.py
table 作为输入)dual)*Provenance: acoustics.py — ACOUSTICS 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.