sinc_filter#
- deepinv.physics.blur.sinc_filter(factor=2, length=11, windowed=True, device='cpu')[source]#
Anti-aliasing sinc filter, optionally multiplied by a Kaiser window.
The kaiser window parameter is computed as follows:
\[A = 2.285 \cdot (L - 1) \cdot 3.14 \cdot \Delta f + 7.95\]where \(\Delta f = 2 (2 - \sqrt{2}) / \text{factor}\). Then, the beta parameter is computed as:
\[\begin{split}\begin{equation*} \beta = \begin{cases} 0 & \text{if } A \leq 21 \\ 0.5842 \cdot (A - 21)^{0.4} + 0.07886 \cdot (A - 21) & \text{if } 21 < A \leq 50 \\ 0.1102 \cdot (A - 8.7) & \text{otherwise} \end{cases} \end{equation*}\end{split}\]- Parameters:
factor (float, torch.Tensor) – Downsampling factor. If Tensor, can only have one element.
length (int) – Length of the filter.
windowed (bool) – Whether to multiply by Kaiser window.
device (torch.device, str) – device to put the filter on (cpu or cuda)