pixels_to_nea#
- pixels_to_nea(pixels, norm=1)[source]#
Compute the Noise Equivalent Area (NEA) from sampled pixels.
\[\mathrm{NEA} = \mathrm{norm} \times \frac{\left(\sum p\right)^2}{\sum p^2}\]The sums ignore NaNs and are done over the last axis if
pixels.ndim == 2(1D profiles), or over the last 2 axes otherwise (2D profiles).- Parameters:
pixels (
numpy.ndarray) – Input pixels, of shape(n, nx)(1D profiles) or(..., ny, nx)(2D profiles).norm (
float, optional) – Normalization factor, typically the pixel size (1D) or area (2D). Default is 1.
- Returns:
numpy.ndarray– Noise Equivalent Area.- Warns:
UserWarning – If
pixelshas more than 3 dimensions.