aperture_stats_tbl

one_pass_fitting.background_measurement.aperture_stats_tbl(data, apertures, method='exact', sigma_clip=True, progress_bar=True)

Computes mean/median/mode/std in Photutils apertures.

Compute statistics for custom local background methods. This is primarily intended for estimating backgrounds via annulus apertures. The intent is that this falls easily into other code to provide background measurements.

Parameters

dataarray

The data for the image to be measured.

aperturesphotutils PixelAperture object (or subclass)

The phoutils aperture object to measure the stats in. i.e. the object returned via CirularAperture, CircularAnnulus, or RectangularAperture etc.

method: str

The method by which to handle the pixel overlap. Defaults to computing the exact area. NOTE: Currently, this will actually fully include a pixel where the aperture has ANY overlap, as a median is also being performed. If the method is set to ‘center’ the pixels will only be included if the pixel’s center falls within the aperture.

sigma_clip: bool

Flag to activate sigma clipping of background pixels

progress_bar: bool

Whether to show progress bar or not. Default True

Returns

stats_tblastropy.table.Table
An astropy Table with the columns:
  • X, Y : Position of aperture

  • aperture_mean : clipped mean of pixels in aperture

  • aperture_median : clipped median of pixels in aperture

  • aperture_mode : clipped mode of pixels in aperture

  • aperture_std : clipped std of pixels in aperture

  • aperture_area : total pixel overlap of aperture with data array