TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-08

tensorplay.signal.windows.exponential

tensorplay.signal.windows.exponential(M: int, *, center: float | None = None, tau: float = 1.0, sym: bool = True, dtype: dtype | None = None, layout: Layout = tensorplay.strided, device: device | None = None, requires_grad: bool = False) → Tensor[source]

Computes a window with an exponentially decaying waveform, also known as the Poisson window.

The samples decay exponentially with the distance from the window center:

wn=exp⁡(−∣n−c∣τ)w_n = \exp{\left(-\frac{|n - c|}{\tau}\right)}

where c is the center of the window.

The window is scaled so that its largest value is 1. The value 1 itself does not occur when M is even and sym is True.

Parameters:

M (int) – number of points of the returned window.

Keyword Arguments:
  • center (float, optional) – location of the window center. Default: M / 2 if sym is False, else (M - 1) / 2.

  • tau (float, optional) – decay parameter, conceptually a percentage in (0, 100]. With tau = 100 the window degenerates to a constant. Default: 1.0.

  • sym (bool, optional) – if False, returns a periodic window, which is the usual choice for spectral analysis. If True, returns a symmetric window, which is the usual choice for filter design. Default: True.

  • dtype (tensorplay.dtype, optional) – the desired data type of the returned tensor. Default: if None, uses the global default (see tensorplay.set_default_dtype()).

  • layout (tensorplay.Layout, optional) – the desired layout of the returned tensor. Default: tensorplay.strided.

  • device (tensorplay.device, optional) – the desired device of the returned tensor. Default: if None, uses the current default tensor device (see tensorplay.set_default_device()).

  • requires_grad (bool, optional) – whether autograd should record operations on the returned tensor. Default: False.

Examples:

>>> # Symmetric exponential window of length 10 with decay 1.0.
>>> # The center is (M - 1) / 2 with M = 10.
>>> tensorplay.signal.windows.exponential(10)
tensor([0.0111, 0.0302, 0.0821, 0.2231, 0.6065, 0.6065, 0.2231, 0.0821, 0.0302, 0.0111])

>>> # Periodic exponential window of length 10 with decay 0.5.
>>> tensorplay.signal.windows.exponential(10, sym=False, tau=0.5)
tensor([0., 0.0003, 0.0025, 0.0183, 0.1353, 1., 0.1353, 0.0183, 0.0025, 0.0003])

On this page

Ask DeepWiki