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:
"airy": Airy disk (seeget_profilemodel);"gaussian","gauss","normal": Gaussian profile integrated over pixels (seeinteg_gaussian2D_erf).
shape (
tupleofint, 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 (
tupleoffloat, optional) –(x, y)coordinates of the PSF with respect to the center of the image, in shape-units. Default is (0, 0).normal_scatter (
floatorNone, 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 forprofile="airy"(shape-units, float or array_like for several PSFs);sigma: mandatory forprofile="gaussian"(shape-units).
- Returns:
psf (
numpy.ndarray) – PSF image(s), of shape(ny * oversampling, nx * oversampling), or(n, ny * oversampling, nx * oversampling)fornradii or sigmas.centroid (
numpy.ndarray) – Position of the PSF centroid, in (oversampled) pixels ofpsf, computed aspsf.shape[-2:] / 2 - 0.5 + position * oversampling.pixelarea (
float) – Area of a single oversampled pixel, in shape-units squared.
- Raises:
KeyError – If the mandatory
radiusorsigmais not given.NotImplementedError – If
profileis not supported.