get_2dpsf_nea

Contents

get_2dpsf_nea#

get_2dpsf_nea(name, xx='-7:7:15j', yy='-7:7:15j', norm_by_step=True, position=(0, 0), **kwargs)[source]#

Get the Noise Equivalent Area (NEA) of an astropy 2D PSF model.

Parameters:
  • name (str) –

    Name of the 2D PSF model from astropy, see get_profilemodel. Shortcuts:

    • "airy", "airydisk": "AiryDisk2D"

    • "gaussian", "gauss", "normal": "Gaussian2D"

    • "moffat": "Moffat2D"

    • "sersic": "Sersic2D"

    • "ricker", "mexican", "mexicanhat": "RickerWavelet2D"

    • "lorentz": "Lorentz2D"

  • xx (str or array_like, optional) – Coordinates where the PSF is evaluated. A string is interpreted as a numpy.r_ slice expression. Default is "-7:7:15j".

  • yy (str or array_like, optional) – Coordinates where the PSF is evaluated. A string is interpreted as a numpy.r_ slice expression. Default is "-7:7:15j".

  • norm_by_step (bool, optional) – If True, multiply the NEA by the pixel area (xx[1] - xx[0]) * (yy[1] - yy[0]) (xx and yy must then be regularly spaced), such that the result does not depend on the sampling. Default is True.

  • position (tuple of float, optional) – (x, y) location of the PSF centroid. Default is (0, 0).

  • **kwargs – Goes to get_profilemodel, and from there to the astropy model initializer, see https://docs.astropy.org/en/latest/modeling/predef_models2D.html. Models other than AiryDisk2D and Gaussian2D require normalized=False (the NEA does not depend on the amplitude).

Returns:

numpy.ndarray – Noise equivalent area, in units of xx squared if norm_by_step (in pixels of the sampling grid otherwise).

Notes

The model must be evaluated on a stack of PSFs (see Notes of get_2d_nea), e.g. by giving its size parameter as an array of shape (n, 1, 1).