get_profilepsf

Contents

get_profilepsf#

get_profilepsf(profile, shape=(10, 10), oversampling=10, position=(0, 0), normal_scatter=None, norm_pixels=False, **kwargs)[source]#

Compute the oversampled 2D PSF image for a given profile.

Parameters:
  • profile (str) –

    Name of the profile:

  • shape (tuple of int, optional) – Shape (ny, nx) of the (non-oversampled) image. Default is (10, 10).

  • oversampling (int, optional) – Number of sub-pixels per shape-unit along each axis. Default is 10.

  • position (tuple of float, optional) – (x, y) coordinates of the PSF with respect to the center of the image, in shape-units. Default is (0, 0).

  • normal_scatter (float or None, optional) – Additional Gaussian scattering (standard deviation) in shape-units, applied by convolution. Default is None.

  • norm_pixels (bool, optional) – If True, multiply the PSF by the pixel area, such that pixel values are the fraction of the flux in the pixel. Otherwise, pixel values are a surface density (per shape-unit squared). Default is False.

  • **kwargs –

    Additional arguments passed to the profile:

    • radius: mandatory for profile="airy" (shape-units, float or array_like for several PSFs);

    • sigma: mandatory for profile="gaussian" (shape-units).

Returns:

  • psf (numpy.ndarray) – PSF image(s), of shape (ny * oversampling, nx * oversampling), or (n, ny * oversampling, nx * oversampling) for n radii or sigmas.

  • centroid (numpy.ndarray) – Position of the PSF centroid, in (oversampled) pixels of psf, computed as psf.shape[-2:] / 2 - 0.5 + position * oversampling.

  • pixelarea (float) – Area of a single oversampled pixel, in shape-units squared.

Raises: