norm_psf

dnois.optics.norm_psf(psf: Tensor, dims: tuple[int, int] = (-2, -1)) Tensor

Normalizes PSF so that all its pixels sum up to 1.

Parameters:
  • psf (Tensor) – PSF to normalize. It cannot be complex of have negative elements.

  • dims (tuple[int, int]) – Indices of spatial dimensions of psf. Default: (-2, -1).

Returns:

Normalized PSF.

Return type:

Tensor