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), wherexandyare the open mesh-gridxx[None, :](shape(1, N)) andyy[:, None](shape(M, 1)), returns an array of shape(..., M, N).xx (
stror array_like, optional) – Coordinates where the PSF is evaluated. A string is interpreted as anumpy.r_slice expression. Default is"-7:7:15j".yy (
stror array_like, optional) – Coordinates where the PSF is evaluated. A string is interpreted as anumpy.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])(xxandyymust 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 overxxandyy), of shape(...).
Notes
pixels_to_neatreats 2D inputs as a set of 1D profiles:funcmust 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.