BkgZoomInterpolator#
- class photutils.background.BkgZoomInterpolator(*, order=3, mode='reflect', cval=0.0, clip=True)[source]#
Bases:
_BkgZoomInterpolatorDeprecated since version 3.0: BkgZoomInterpolator is deprecated and will be removed in version 4.0.
Class to generate a 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
Background2Dclass.- 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.
Notes
When resizing the mesh to the full image size, the samples are considered as the centers of regularly-spaced grid elements (i.e.,
zoomgrid_modeis True). This makes zoom’s behavior consistent withscipy.ndimage.map_coordinatesandskimage.transform.resizeDeprecated since version 3.0: BkgZoomInterpolator is deprecated and will be removed in version 4.0.
Methods Summary
__call__(data, **kwargs)Resize the 2D mesh array.
Methods Documentation
- __call__(data, **kwargs)#
Resize the 2D mesh array.
- Parameters:
- data2D
ndarray The low-resolution 2D mesh array.
- **kwargsdict
Additional keyword arguments passed to the interpolator.
- data2D
- Returns:
- result2D
ndarray The resized background or background RMS image.
- result2D
Notes
If
datais anQuantity, units are stripped before interpolation. Unit re-assignment is the caller’s responsibility.