imutil.imstat.give_stats

imutil.imstat.give_stats(
    item,
    mask=None,
    extension=None,
    statsecs=None,
    percentiles=(1, 99),
    num_extrema=(1, 1),
    return_header=False,
)

Calculates simple statistics.

item is now intentionally accepted as either ~numpy.ndarray or path-like FITS input. For CCDData/HDU inputs, pass their .data explicitly.

Parameters

percentiles : sequence of float or None = (1, 99)

Percentiles to calculate. If None, percentile calculation is skipped.

num_extrema : 2-tuple of int or None = (1, 1)

Number of low and high extreme values to report as (n_lo, n_hi). If None, extrema calculation is skipped.

Notes

Sections may have different sizes. Overlapping sections count their shared pixels once per section. Masks and non-finite pixels are excluded.

Raises

: ValueError

If no finite unmasked pixels remain in the selected sections.