This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / signal / windows / _windows / kaiser_bessel_derived

function

scipy.signal.windows._windows:kaiser_bessel_derived

source: build-install/usr/lib/python3.14/site-packages/scipy/signal/windows/_windows.py:1488

Signature

def kaiser_bessel_derived(M, beta, *, sym = True, xp = None, device = None)

Summary

Return a Kaiser-Bessel derived window.

Parameters

M : int

Number of points in the output window. If zero, an empty array is returned. An exception is thrown when it is negative. Note that this window is only defined for an even number of points.

beta : float

Kaiser window shape parameter.

sym : bool, optional

This parameter only exists to comply with the interface offered by the other window functions and to be callable by get_window. When True (default), generates a symmetric window, for use in filter design.

xp : array_namespace, optional

Optional array namespace. Should be compatible with the array API standard, or supported by array-api-compat. Default: numpy

device : any

optional device specification for output. Should match one of the supported device specification in xp.

Returns

w : ndarray

The window, normalized to fulfil the Princen-Bradley condition.

Notes

It is designed to be suitable for use with the modified discrete cosine transform (MDCT) and is mainly used in audio signal processing and audio coding.

Examples

Plot the Kaiser-Bessel derived window based on the wikipedia reference [2]_:
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=}")
✗
[<matplotlib.lines.Line2D object at 0x7f3f43628ad0>]
[<matplotlib.lines.Line2D object at 0x7f3f43628c20>]
[<matplotlib.lines.Line2D object at 0x7f3f43628d70>]
[<matplotlib.lines.Line2D object at 0x7f3f43628ec0>]
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_yticks([0.0, 0.2, 0.4, 0.6, 0.707, 0.8, 1.0])
fig.legend(loc="center")
✗
<matplotlib.legend.Legend object at 0x7f3f4362acf0>
fig.tight_layout()
fig.show()
✓

See also

kaiser

Aliases

  • scipy.signal.windows.kaiser_bessel_derived

Referenced by