class photutils.background.BkgZoomInterpolator(*, order=3, mode='reflect', cval=0.0, grid_mode=True, clip=True)[source]

Bases: object

This class generates full-sized background and background RMS images from lower-resolution mesh images using the zoom (spline) interpolator.

This class must be used in concert with the Background2D class.

orderint, optional

The order of the spline interpolation used to resize the low-resolution background and background RMS mesh images. The value must be an integer in the range 0-5. The default is 3 (bicubic interpolation).

mode{‘reflect’, ‘constant’, ‘nearest’, ‘wrap’}, optional

Points outside the boundaries of the input are filled according to the given mode. Default is ‘reflect’.

cvalfloat, optional

The value used for points outside the boundaries of the input if mode='constant'. Default is 0.0

grid_modebool, optional

If True (default), the samples are considered as the centers of regularly-spaced grid elements. If False, the samples are treated as isolated points. For zooming 2D images, this keyword should be set to True, which makes zoom’s behavior consistent with scipy.ndimage.map_coordinates and skimage.transform.resize. The False option is provided only for backwards-compatibility.

clipbool, optional

Whether to clip the output to the range of values in the input image. This is enabled by default, since higher order interpolation may produce values outside the given input range.

Methods Summary

__call__(mesh, bkg2d_obj)

Resize the 2D mesh array.

Methods Documentation

__call__(mesh, bkg2d_obj)[source]

Resize the 2D mesh array.

mesh2D ndarray

The low-resolution 2D mesh array.

bkg2d_objBackground2D object

The Background2D object that prepared the mesh array.

result2D ndarray

The resized background or background RMS image.