Loading peak_integration.py +7 −5 Original line number Diff line number Diff line Loading @@ -1802,12 +1802,14 @@ class PeakHistogram(object): fit_points = fit_points.reshape((-1,self.ndims)) # self.detector_mask = None # if self.detector_mask is None: # detector_mask = fit_data==fit_data if self.detector_mask is not None: detector_mask = rebin_histogram(self.detector_mask.astype(int), bins)>0 fit_data = fit_data[detector_mask.ravel()] fit_points = fit_points[detector_mask.ravel(),:] if np.any(np.array([len(b) for b in bins])!=self.shape): # all subbins must be in detector mask, 0.99 to account for numerical error mask = rebin_histogram(self.detector_mask.astype(float), bins, mode='density') > 0.99 else: mask = self.detector_mask fit_data = fit_data[mask.ravel()] fit_points = fit_points[mask.ravel(),:] ########################################################################### # initialization and bounds on parameters Loading Loading
peak_integration.py +7 −5 Original line number Diff line number Diff line Loading @@ -1802,12 +1802,14 @@ class PeakHistogram(object): fit_points = fit_points.reshape((-1,self.ndims)) # self.detector_mask = None # if self.detector_mask is None: # detector_mask = fit_data==fit_data if self.detector_mask is not None: detector_mask = rebin_histogram(self.detector_mask.astype(int), bins)>0 fit_data = fit_data[detector_mask.ravel()] fit_points = fit_points[detector_mask.ravel(),:] if np.any(np.array([len(b) for b in bins])!=self.shape): # all subbins must be in detector mask, 0.99 to account for numerical error mask = rebin_histogram(self.detector_mask.astype(float), bins, mode='density') > 0.99 else: mask = self.detector_mask fit_data = fit_data[mask.ravel()] fit_points = fit_points[mask.ravel(),:] ########################################################################### # initialization and bounds on parameters Loading