本文簡要介紹 python 語言中 scipy.signal.windows.kaiser_bessel_derived
的用法。
用法:
scipy.signal.windows.kaiser_bessel_derived(M, beta, *, sym=True)#
返回 Kaiser-Bessel 派生窗口。
- M: int
輸出窗口中的點數。如果為零,則返回空數組。當它為負數時會拋出異常。請注意,此窗口僅針對偶數個點定義。
- beta: 浮點數
Kaiser 窗口形狀參數。
- sym: 布爾型,可選
該參數的存在隻是為了符合其他窗口函數提供的接口,並且可以被
get_window
調用。當為 True(默認)時,生成一個對稱窗口,用於濾波器設計。
- w: ndarray
窗口,標準化為滿足Princen-Bradley 條件。
參數 ::
返回 ::
注意:
它被設計為適合與修正離散餘弦變換 (MDCT) 一起使用,主要用於音頻信號處理和音頻編碼。
參考:
[1]Bosi、Marina 和 Richard E. Goldberg。數字音頻編碼和標準簡介。多德雷赫特:克魯沃,2003 年。
[2]維基百科,“Kaiser window”,https://en.wikipedia.org/wiki/Kaiser_window
例子:
根據維基百科參考 [2] 繪製 Kaiser-Bessel 派生窗口:
>>> import numpy as np >>> from scipy import signal >>> import matplotlib.pyplot as plt >>> fig, ax = plt.subplots() >>> N = 50 >>> for alpha in [0.64, 2.55, 7.64, 31.83]: ... ax.plot(signal.windows.kaiser_bessel_derived(2*N, np.pi*alpha), ... label=f"{alpha=}") >>> ax.grid(True) >>> ax.set_title("Kaiser-Bessel derived window") >>> ax.set_ylabel("Amplitude") >>> ax.set_xlabel("Sample") >>> ax.set_xticks([0, N, 2*N-1]) >>> ax.set_xticklabels(["0", "N", "2N+1"]) >>> ax.set_yticks([0.0, 0.2, 0.4, 0.6, 0.707, 0.8, 1.0]) >>> fig.legend(loc="center") >>> fig.tight_layout() >>> fig.show()
相關用法
- Python SciPy windows.kaiser用法及代碼示例
- Python SciPy windows.gaussian用法及代碼示例
- Python SciPy windows.parzen用法及代碼示例
- Python SciPy windows.triang用法及代碼示例
- Python SciPy windows.flattop用法及代碼示例
- Python SciPy windows.hamming用法及代碼示例
- Python SciPy windows.tukey用法及代碼示例
- Python SciPy windows.nuttall用法及代碼示例
- Python SciPy windows.get_window用法及代碼示例
- Python SciPy windows.general_gaussian用法及代碼示例
- Python SciPy windows.cosine用法及代碼示例
- Python SciPy windows.exponential用法及代碼示例
- Python SciPy windows.bartlett用法及代碼示例
- Python SciPy windows.barthann用法及代碼示例
- Python SciPy windows.boxcar用法及代碼示例
- Python SciPy windows.general_cosine用法及代碼示例
- Python SciPy windows.chebwin用法及代碼示例
- Python SciPy windows.taylor用法及代碼示例
- Python SciPy windows.lanczos用法及代碼示例
- Python SciPy windows.blackman用法及代碼示例
- Python SciPy windows.general_hamming用法及代碼示例
- Python SciPy windows.bohman用法及代碼示例
- Python SciPy windows.blackmanharris用法及代碼示例
- Python SciPy windows.dpss用法及代碼示例
- Python SciPy windows.hann用法及代碼示例
注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.signal.windows.kaiser_bessel_derived。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。