LocalBackground

class photutils.background.LocalBackground(inner_radius, outer_radius, bkg_estimator=MedianBackground(sigma_clip=SigmaClip(sigma=3.0, sigma_lower=3.0, sigma_upper=3.0, maxiters=10, cenfunc='median', stdfunc='std', grow=False)))[source]

Bases: object

Class to compute a local background using a circular annulus aperture.

Parameters:
inner_radiusfloat

The inner radius of the circular annulus in pixels.

outer_radiusfloat

The outer radius of the circular annulus in pixels.

bkg_estimatorcallable, optional

A callable object (a function or e.g., an instance of any BackgroundBase subclass) used to estimate the background in each aperture. The callable object must take in a 2D ndarray or MaskedArray and have an axis keyword. The default is an instance of MedianBackground with sigma clipping (i.e., sigma-clipped median).

Methods Summary

__call__(data, x, y[, mask])

Measure the local background in a circular annulus.

Methods Documentation

__call__(data, x, y, mask=None)[source]

Measure the local background in a circular annulus.

Parameters:
data2D ndarray

The 2D array on which to measure the local background.

x, yfloat or 1D float ndarray

The aperture center (x, y) position(s) at which to measure the local background.

mask2D bool ndarray, optional

A boolean mask with the same shape as data where a True value indicates the corresponding element of data is masked. Masked data are excluded from all calculations.

Returns:
valuefloat or 1D float ndarray

The local background values.