get_gaussian2d

Contents

get_gaussian2d#

get_gaussian2d(xx, yy, sigma, mean=(0, 0), **kwargs)[source]#

Compute an exact pixel-integrated 2D Gaussian PSF.

The Gaussian profile is integrated over the area of each pixel using the error function (see integ_gaussian2D_erf).

Parameters:
  • xx (numpy.ndarray) – Regularly spaced x-coordinates of the pixel centers, of shape (nx,) or (1, nx).

  • yy (numpy.ndarray) – Regularly spaced y-coordinates of the pixel centers, of shape (ny,) or (ny, 1).

  • sigma (array_like) – Standard deviations of the Gaussian, in the same units as xx, of shape (..., 2) with the last axis being (sigma_y, sigma_x), e.g. (m, 1, 2) for m PSFs.

  • mean (tuple of float, optional) – (x, y) center of the Gaussian. Default is (0, 0).

  • **kwargs – Additional arguments passed to integ_gaussian2D_erf.

Returns:

numpy.ndarray – Pixel values, normalized such that the sum over an infinite grid equals 1, of shape (ny, nx) or (m, ny, nx).