torch_kaiser_window {torch} | R Documentation |
Kaiser_window
Description
Kaiser_window
Usage
torch_kaiser_window(
window_length,
periodic,
beta,
dtype = NULL,
layout = NULL,
device = NULL,
requires_grad = NULL
)
Arguments
window_length |
(int) length of the window. |
periodic |
(bool, optional) If TRUE, returns a periodic window suitable for use in spectral analysis. If FALSE, returns a symmetric window suitable for use in filter design. |
beta |
(float, optional) shape parameter for the window. |
dtype |
( |
layout |
( |
device |
( |
requires_grad |
(bool, optional) If autograd should record operations on the returned tensor. Default: |
kaiser_window(window_length, periodic=TRUE, beta=12.0, *, dtype=None, layout=torch.strided, device=None, requires_grad=FALSE) -> Tensor
Computes the Kaiser window with window length window_length
and shape parameter beta
.
Let I_0 be the zeroth order modified Bessel function of the first kind (see torch_i0()
) and
N = L - 1
if periodic
is FALSE and L
if periodic
is TRUE,
where L
is the window_length
. This function computes:
out_i = I_0 \left( \beta \sqrt{1 - \left( {\frac{i - N/2}{N/2}} \right) ^2 } \right) / I_0( \beta )
Calling torch_kaiser_window(L, B, periodic=TRUE)
is equivalent to calling
torch_kaiser_window(L + 1, B, periodic=FALSE)[:-1])
.
The periodic
argument is intended as a helpful shorthand
to produce a periodic window as input to functions like torch_stft()
.
Note
If window_length
is one, then the returned window is a single element
tensor containing a one.