bartorch.hann_window#
- bartorch.hann_window()#
Hann (raised-cosine) apodization window over a centred k-space grid.
The kernel is \(W(u) = \tfrac12 (1 + \cos(\pi u / r))\) for \(u < r\) and zero beyond, with \(u\) normalized as in
fermi_window()and \(r\) theradius.- Parameters:
shape (tuple of int) – Grid shape, any number of axes.
radius (float, default=1.0) – Coordinate at which the window reaches zero, as a fraction of the Nyquist edge.
geometry ({"radial", "separable"}, default='radial') – As in
fermi_window().device (torch.device or str, default=None) – Device of the window.
- Returns:
Real
float32window of shapeshape.- Return type:
torch.Tensor
- Raises:
ValueError – If
radiusis not positive,geometryis neither value, or an axis is empty.