fn
nuttall
→Tensornuttall(M: int, sym: bool = True, dtype: DTypeLike = None, device: DeviceLike = None)Nuttall four-term window.
A four-term cosine-sum window with coefficients optimised by Nuttall to drive the peak side-lobe to approximately , the deepest practical suppression among four-term windows. Useful for very-high-dynamic-range spectral analysis at the cost of a wider main lobe.
Parameters
MintNumber of samples in the output window; must be
>= 0.symbool= TrueSymmetric (
True, default) or periodic (False) variant.dtypeDTypeLike= NoneDesired dtype of the output tensor.
deviceDeviceLike= NoneTarget device for the output tensor.
Returns
Tensor1-D tensor of length M.
Notes
Sample formula (four-term general_cosine with coefficients
[0.3635819, 0.4891775, 0.1365995, 0.0106411]):
The main-lobe is roughly wide.
Examples
>>> from lucid.signal.windows import nuttall
>>> nuttall(5)
Tensor([0.0004, 0.2270, 1.0000, 0.2270, 0.0004])