photutils/background/background_2d.py
def _interpolate_meshes(self, data, n_neighbors=10, eps=0., power=1.,
                            reg=0.):
        """
        Use IDW interpolation to fill in any masked pixels in the
        low-resolution 2D mesh background and background RMS images.

        This is required to use a regular-grid interpolator to expand
        the low-resolution image to the full size image.

        Parameters
        ----------
        data : 1D `~numpy.ndarray`
            A 1D array of mesh values.

        n_neighbors : int, optional
            The maximum number of nearest neighbors to use during the
            interpolation.

        eps : float, optional
            Set to use approximate nearest neighbors; the kth neighbor
            is guaranteed to be no further than (1 + ``eps``) times the
            distance to the real *k*-th nearest neighbor. See
            `scipy.spatial.cKDTree.query` for further information.

        power : float, optional
            The power of the inverse distance used for the interpolation
            weights.  See the Notes section for more details.

        reg : float, optional
            The regularization parameter. It may be used to control the
            smoothness of the interpolator. See the Notes section for
            more details.

        Returns
        -------
        result : 2D `~numpy.ndarray`
            A 2D array of the mesh values where masked pixels have been
            filled by IDW interpolation.
       """

        yx = np.column_stack([self.mesh_yidx, self.mesh_xidx])
        coords = np.array(list(product(range(self.nyboxes),
                                       range(self.nxboxes))))
        f = ShepardIDWInterpolator(yx, data)
        img1d = f(coords, n_neighbors=n_neighbors, power=power, eps=eps,
                  reg=reg)

        return img1d.reshape(self._mesh_shape)

        Use IDW interpolation to fill in any masked pixels in the
        low-resolution 2D mesh background and background RMS images.

        This is required to use a regular-grid interpolator to expand
        the low-resolution image to the full size image.

        Parameters
        ----------
        data : 1D `~numpy.ndarray`
            A 1D array of mesh values.

        n_neighbors : int, optional
            The maximum number of nearest neighbors to use during the
            interpolation.

        eps : float, optional
            Set to use approximate nearest neighbors; the kth neighbor
            is guaranteed to be no further than (1 + ``eps``) times the
            distance to the real *k*-th nearest neighbor. See
            `scipy.spatial.cKDTree.query` for further information.

        power : float, optional
            The power of the inverse distance used for the interpolation
            weights.  See the Notes section for more details.

        reg : float, optional
            The regularization parameter. It may be used to control the
            smoothness of the interpolator. See the Notes section for
            more details.

        Returns
        -------
        result : 2D `~numpy.ndarray`
            A 2D array of the mesh values where masked pixels have been
            filled by IDW interpolation.
       
Use IDW interpolation to fill in any masked pixels in the
low-resolution 2D mesh background and background RMS images.

This is required to use a regular-grid interpolator to expand
the low-resolution image to the full size image.

Parameters

data : 1D `~numpy.ndarray`
A 1D array of mesh values.

n_neighbors : int, optional
The maximum number of nearest neighbors to use during the
interpolation.

eps : float, optional
Set to use approximate nearest neighbors; the kth neighbor
is guaranteed to be no further than (1 + ``eps``) times the
distance to the real *k*-th nearest neighbor. See
`scipy.spatial.cKDTree.query` for further information.

power : float, optional
The power of the inverse distance used for the interpolation
weights.  See the Notes section for more details.

reg : float, optional
The regularization parameter. It may be used to control the
smoothness of the interpolator. See the Notes section for
more details.

Returns

result : 2D `~numpy.ndarray`
A 2D array of the mesh values where masked pixels have been
filled by IDW interpolation.
Use IDW interpolation to fill in any masked pixels in the low - resolution 2D mesh background and background RMS images . This is required to use a regular - grid interpolator to expand the low - resolution image to the full size image . Parameters data : 1D ` ~numpy . ndarray ` A 1D array of mesh values . n_neighbors : int optional The maximum number of nearest neighbors to use during the interpolation . eps : float optional Set to use approximate nearest neighbors ; the kth neighbor is guaranteed to be no further than ( 1 + ` ` eps ` ` ) times the distance to the real * k * - th nearest neighbor . See ` scipy . spatial . cKDTree . query ` for further information . power : float optional The power of the inverse distance used for the interpolation weights . See the Notes section for more details . reg : float optional The regularization parameter . It may be used to control the smoothness of the interpolator . See the Notes section for more details . Returns result : 2D ` ~numpy . ndarray ` A 2D array of the mesh values where masked pixels have been filled by IDW interpolation .
def _interpolate_meshes(self, data, n_neighbors=10, eps=0., power=1.,
                            reg=0.):
        yx = np.column_stack([self.mesh_yidx, self.mesh_xidx])
        coords = np.array(list(product(range(self.nyboxes),
                                       range(self.nxboxes))))
        f = ShepardIDWInterpolator(yx, data)
        img1d = f(coords, n_neighbors=n_neighbors, power=power, eps=eps,
                  reg=reg)
        return img1d.reshape(self._mesh_shape)
def _interpolate_meshes ( self , data , n_neighbors = 10 , eps = 0. , power = 1. , reg = 0. ) : yx = np . column_stack ( [ self . mesh_yidx , self . mesh_xidx ] ) coords = np . array ( list ( product ( range ( self . nyboxes ) , range ( self . nxboxes ) ) ) ) f = ShepardIDWInterpolator ( yx , data ) img1d = f ( coords , n_neighbors = n_neighbors , power = power , eps = eps , reg = reg ) return img1d . reshape ( self . _mesh_shape )
Use IDW interpolation to fill in any masked pixels in the
low-resolution 2D mesh background and background RMS images.
Use IDW interpolation to fill in any masked pixels in the low - resolution 2D mesh background and background RMS images .
"""
        Use IDW interpolation to fill in any masked pixels in the
        low-resolution 2D mesh background and background RMS images.

        This is required to use a regular-grid interpolator to expand
        the low-resolution image to the full size image.

        Parameters
        ----------
        data : 1D `~numpy.ndarray`
            A 1D array of mesh values.

        n_neighbors : int, optional
            The maximum number of nearest neighbors to use during the
            interpolation.

        eps : float, optional
            Set to use approximate nearest neighbors; the kth neighbor
            is guaranteed to be no further than (1 + ``eps``) times the
            distance to the real *k*-th nearest neighbor. See
            `scipy.spatial.cKDTree.query` for further information.

        power : float, optional
            The power of the inverse distance used for the interpolation
            weights.  See the Notes section for more details.

        reg : float, optional
            The regularization parameter. It may be used to control the
            smoothness of the interpolator. See the Notes section for
            more details.

        Returns
        -------
        result : 2D `~numpy.ndarray`
            A 2D array of the mesh values where masked pixels have been
            filled by IDW interpolation.
       """
self
data
n_neighbors
eps
power
reg