get_2d_nea

Contents

get_2d_nea#

get_2d_nea(func, xx='-7:7:15j', yy='-7:7:15j', norm_by_step=True, **kwargs)[source]#

Get the Noise Equivalent Area (NEA) of a 2D function.

Parameters:
  • func (callable) – 2D PSF function such that pixels = func(x, y, **kwargs), where x and y are the open mesh-grid xx[None, :] (shape (1, N)) and yy[:, None] (shape (M, 1)), returns an array of shape (..., M, N).

  • 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.

  • **kwargs – Goes to func.

Returns:

numpy.ndarray – NEA (integrated over xx and yy), of shape (...).

Notes

pixels_to_nea treats 2D inputs as a set of 1D profiles: func must return an array with at least one leading axis, i.e. of shape (n, M, N), for the NEA to be computed over the 2D images.