fullseye

cepstrum — ACOUSTICS bearing op

使い方

The spectrum of the log spectrum — periodic structure in frequency.

A harmonic family or a family of modulation sidebands is periodic along the frequency axis, so it collapses to a single line along the cepstrum’s quefrency axis (in seconds). Two things this finds that a spectrum does not: an echo at delay tau (a rahmonic at q = tau) and a sideband family spaced df apart (a rahmonic at q = 1/df). The second is the bearing case — sidebands around a gear mesh spaced at the shaft rate.

mode:

log(0) is handled by flooring the magnitude at floor_ratio times its own maximum (default 1e-12, i.e. -240 dB) rather than letting -inf enter the inverse transform, where it would make the entire cepstrum NaN. The number of floored bins is returned as floored_bins — a large count means the signal is band-limited and the cepstrum is dominated by the flooring, not by the signal.

min_quefrency (seconds) excludes the low-quefrency region from the peak search. This is not cosmetic. The first few bins carry the spectral envelope — the overall shape of the spectrum, which is large and has nothing to do with periodic structure — and they dominate. Measured on an AM tone with sidebands 50 Hz apart, the five largest cepstral values sit at 0.000125, 0.00025, 0.000375, 0.000625 and 0.001 s, i.e. all of them are the envelope, and the default peak search returns 0.000125 s rather than the 1/50 = 0.02 s a reader would expect. Excluding the envelope is the standard practice (“liftering”) and is the caller’s decision, so it is an argument with a visible default of 0.

Returns a dict: quefrency (s), cepstrum, rate, mode, floored_bins, min_quefrency, peak_quefrency, peak_amplitude, peak_rate_hz (1/peak_quefrency — the sideband spacing or repetition rate the rahmonic corresponds to). The peak is taken over min_quefrency < q < n/(2*rate); the cepstrum is symmetric past that.

Measured ground truths:

mode="power" is exactly twice mode="real" (measured max difference 0.000e+00).

Raises ValueError: everything :func:_as_signal refuses, an unknown mode, floor_ratio outside (0, 1), a negative min_quefrency, a min_quefrency at or past the half-length of the record (nothing would be left to search), an identically zero signal, and a signal shorter than 4 samples.

詳しい使い方ガイド

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(table を入力に取れる)

istft

同カテゴリ(bearing)

envelope_spectrum · bearing_defect_frequencies · spectral_kurtosis


Provenance: acoustics.py — ACOUSTICS operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。

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