BkgZoomInterpolator#

class photutils.background.BkgZoomInterpolator(*, order=3, mode='reflect', cval=0.0, clip=True, grid_mode=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.

Parameters:
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.

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.

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.

Deprecated since version 2.0.0: When this keyword is removed, the behavior will be grid_mode=True.

Methods Summary

__call__(data, **kwargs)

Resize the 2D mesh array.

Methods Documentation

__call__(data, **kwargs)[source]#

Resize the 2D mesh array.

Parameters:
data2D ndarray

The low-resolution 2D mesh array.

**kwargsdict

Additional keyword arguments passed to the interpolator.

Returns:
result2D ndarray

The resized background or background RMS image.