code: def _pruneMMD(self, minimum_solid_angle):
          
  
          logger.info('Pruning mask based on minimum solid angle of %.2f deg^2'%(minimum_solid_angle))
  
          solid_angle_mmd = self.solid_angle_mmd*(self.solid_angle_mmd > minimum_solid_angle)
          if solid_angle_mmd.sum() == 0:
              msg = "Pruned mask contains no solid angle."
              logger.error(msg)
              raise Exception(msg)
  
          self.solid_angle_mmd = solid_angle_mmd
  
          # Compute which magnitudes the clipping correspond to
          index_mag_1, index_mag_2 = np.nonzero(self.solid_angle_mmd)
          self.mag_1_clip = self.roi.bins_mag[1:][np.max(index_mag_1)]
          self.mag_2_clip = self.roi.bins_mag[1:][np.max(index_mag_2)]
  
          logger.info('Clipping mask 1 at %.2f mag'%(self.mag_1_clip) )
          logger.info('Clipping mask 2 at %.2f mag'%(self.mag_2_clip) )
          self.mask_1.mask_roi_sparse = np.clip(self.mask_1.mask_roi_sparse, 0., self.mag_1_clip)
          self.mask_2.mask_roi_sparse = np.clip(self.mask_2.mask_roi_sparse, 0., self.mag_2_clip)
docs: Remove regions of magnitude-magnitude space where the unmasked solid angle is
          statistically insufficient to estimate the background.
  
          INPUTS:
              solid_angle[1]: minimum solid angle (deg^2)