mindspore.ops.kaiser_window

mindspore.ops.kaiser_window(window_length, periodic=True, beta=12.0, *, dtype=None)[source]

Kaiser window function.

\[w(n) = \frac{I_{0}\left( \beta\sqrt{1 - \frac{4n^{2}}{(M - 1)^{2}}} \right)}{I_{0}(\beta)}\]

with

\[- \frac{M - 1}{2} \leq n \leq \frac{M - 1}{2}\]

where \(I_0\) is the modified zeroth-order Bessel function.

Parameters
  • window_length (int) – The size of window.

  • periodic (bool, optional) – If True , return a periodic window. If False, return a symmetric window. Default True .

  • beta (float, optional) – Shape parameter, when beta gets large, the window narrows. Default: 12.0 .

Keyword Arguments

dtype (mindspore.dtype, optional) – The data type specified. Default None .

Returns

A 1-D tensor.

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore
>>> output = mindspore.ops.kaiser_window(5)
>>> print(output)
[5.27734413e-05 1.01719688e-01 7.92939834e-01 7.92939834e-01
 1.01719688e-01]
>>> output = mindspore.ops.kaiser_window(5, periodic=False)
>>> print(output)
[5.27734413e-05 2.15672745e-01 1.00000000e+00 2.15672745e-01
 5.27734413e-05]