Commit e564e9c7 authored by Viktor Reshniak's avatar Viktor Reshniak
Browse files

binned_points

parent 5269ff40
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1510,7 +1510,7 @@ class PeaksIntegrator(object):

					binned_peak   = self.bin_peak(peak_id, bins, hkl_box_size=box_size, smooth=False)
					binned_data   = binned_peak.getSignalArray()
					# plot_volumes([binned_peak.getSignalArray(),self.smooth_op(peak_id,box_size,64)(binned_peak.getSignalArray().ravel()).reshape([64]*3)], plot_axes=False, show=True, elevation=15, azimuth=-40)
					binned_points = histogram_grid(binned_peak)[0]

					smooth_op   = self.smooth_op(peak_id,box_size,bins,binned_hist=binned_data)
					smooth_data = smooth_op(binned_data.ravel()).reshape([bins]*3)
@@ -1524,7 +1524,7 @@ class PeaksIntegrator(object):
					# box_size = self.valid_box_size(peak_id, 2*(box_std/peak_std)*h.peak_rad)

					# isolate peak and initialize ellipsoid
					ellipsoid = isolate_peak(points=histogram_grid(binned_peak)[0], data=smooth_data, nthresh=20, iters=2)
					ellipsoid = isolate_peak(points=binned_points, data=smooth_data, nthresh=20, iters=2)
					peak_rad  = np.max(ellipsoid[-3:])
					if peak_rad>5*np.min(ellipsoid[-3:]):
						# adjust for too 'flat' peaks - replace box_std with peak_std+2