code: def C_D(self):
          
          if not hasattr(self, '_C_D'):
              if self._noise_map is not None:
                  self._C_D = self._noise_map**2
              else:
                  self._C_D = self.covariance_matrix(self.data, self.background_rms, self.exposure_map)
          return self._C_D
docs: Covariance matrix of all pixel values in 2d numpy array (only diagonal component)
          The covariance matrix is estimated from the data.
          WARNING: For low count statistics, the noise in the data may lead to biased estimates of the covariance matrix.
  
          :return: covariance matrix of all pixel values in 2d numpy array (only diagonal component).