photutils/background/background_2d.py
def _calc_bkg_bkgrms(self):
        """
        Calculate the background and background RMS estimate in each of
        the meshes.

        Both meshes are computed at the same time here method because
        the filtering of both depends on the background mesh.

        The ``background_mesh`` and ``background_rms_mesh`` images are
        equivalent to the low-resolution "MINIBACKGROUND" and
        "MINIBACK_RMS" background maps in SExtractor, respectively.
        """

        if self.sigma_clip is not None:
            data_sigclip = self.sigma_clip(self.mesh_data, axis=1)
        else:
            data_sigclip = self.mesh_data
        self._data_sigclip = data_sigclip

        self._mesh_shape = (self.nyboxes, self.nxboxes)
        self.mesh_yidx, self.mesh_xidx = np.unravel_index(self.mesh_idx,
                                                          self._mesh_shape)

        # needed for background_mesh_ma and background_rms_mesh_ma
        # properties
        self.bkg1d = self.bkg_estimator(data_sigclip, axis=1)
        self.bkgrms1d = self.bkgrms_estimator(data_sigclip, axis=1)

        # make the 2D mesh arrays
        if len(self.bkg1d) == (self.nxboxes * self.nyboxes):
            bkg = self._make_2d_array(self.bkg1d)
            bkgrms = self._make_2d_array(self.bkgrms1d)
        else:
            bkg = self._interpolate_meshes(self.bkg1d)
            bkgrms = self._interpolate_meshes(self.bkgrms1d)

        self.background_mesh = bkg
        self.background_rms_mesh = bkgrms

        # filter the 2D mesh arrays
        if not np.array_equal(self.filter_size, [1, 1]):
            self._filter_meshes()

        return

        Calculate the background and background RMS estimate in each of
        the meshes.

        Both meshes are computed at the same time here method because
        the filtering of both depends on the background mesh.

        The ``background_mesh`` and ``background_rms_mesh`` images are
        equivalent to the low-resolution "MINIBACKGROUND" and
        "MINIBACK_RMS" background maps in SExtractor, respectively.
        
Calculate the background and background RMS estimate in each of
the meshes.

Both meshes are computed at the same time here method because
the filtering of both depends on the background mesh.


Calculate the background and background RMS estimate in each of the meshes . Both meshes are computed at the same time here method because the filtering of both depends on the background mesh .
def _calc_bkg_bkgrms(self):
        if self.sigma_clip is not None:
            data_sigclip = self.sigma_clip(self.mesh_data, axis=1)
        else:
            data_sigclip = self.mesh_data
        self._data_sigclip = data_sigclip
        self._mesh_shape = (self.nyboxes, self.nxboxes)
        self.mesh_yidx, self.mesh_xidx = np.unravel_index(self.mesh_idx,
                                                          self._mesh_shape)
        self.bkg1d = self.bkg_estimator(data_sigclip, axis=1)
        self.bkgrms1d = self.bkgrms_estimator(data_sigclip, axis=1)
        if len(self.bkg1d) == (self.nxboxes * self.nyboxes):
            bkg = self._make_2d_array(self.bkg1d)
            bkgrms = self._make_2d_array(self.bkgrms1d)
        else:
            bkg = self._interpolate_meshes(self.bkg1d)
            bkgrms = self._interpolate_meshes(self.bkgrms1d)
        self.background_mesh = bkg
        self.background_rms_mesh = bkgrms
        if not np.array_equal(self.filter_size, [1, 1]):
            self._filter_meshes()
        return
def _calc_bkg_bkgrms ( self ) : if self . sigma_clip is not None : data_sigclip = self . sigma_clip ( self . mesh_data , axis = 1 ) else : data_sigclip = self . mesh_data self . _data_sigclip = data_sigclip self . _mesh_shape = ( self . nyboxes , self . nxboxes ) self . mesh_yidx , self . mesh_xidx = np . unravel_index ( self . mesh_idx , self . _mesh_shape ) self . bkg1d = self . bkg_estimator ( data_sigclip , axis = 1 ) self . bkgrms1d = self . bkgrms_estimator ( data_sigclip , axis = 1 ) if len ( self . bkg1d ) == ( self . nxboxes * self . nyboxes ) : bkg = self . _make_2d_array ( self . bkg1d ) bkgrms = self . _make_2d_array ( self . bkgrms1d ) else : bkg = self . _interpolate_meshes ( self . bkg1d ) bkgrms = self . _interpolate_meshes ( self . bkgrms1d ) self . background_mesh = bkg self . background_rms_mesh = bkgrms if not np . array_equal ( self . filter_size , [ 1 , 1 ] ) : self . _filter_meshes ( ) return
Calculate the background and background RMS estimate in each of
the meshes.
Calculate the background and background RMS estimate in each of the meshes .
"""
        Calculate the background and background RMS estimate in each of
        the meshes.

        Both meshes are computed at the same time here method because
        the filtering of both depends on the background mesh.

        The ``background_mesh`` and ``background_rms_mesh`` images are
        equivalent to the low-resolution "MINIBACKGROUND" and
        "MINIBACK_RMS" background maps in SExtractor, respectively.
        """ # needed for background_mesh_ma and background_rms_mesh_ma # properties # make the 2D mesh arrays # filter the 2D mesh arrays
self