PointSpreadFunction.generate_kernel¶
giant.point_spread_functions.psf_meta
:
- abstract PointSpreadFunction.generate_kernel()[source]¶
Generates a square kernel centered at the centroid of the PSF normalized to have a volume (sum) of 1.
Essentially this evaluates \(z = f(x, y)\) for x in \([x_0-size//2, x_0+size//2]\) and y in \([y_0-size//2, y_0+size//2]\) where x0 is the x location of the centroid of the PSF and y0 is the y location of the centroid of the PSF.
The resulting values are then normalized to sum to 1 so that the result can be applied using convolution without changing the overall signal level.
- Returns:
A normalized kernel of the PSF centered at the centroid
- Return type:
ndarray