Commit 5a39cd57 authored by christoph's avatar christoph
Browse files

difference image possible in SumDirect

parent d0d105e8
......@@ -434,7 +434,7 @@ class Hydra:
print ( "Integrating pixelwise " + scan )
self.scans[scan].apply_rois_pw(self.roi_obj)
def SumDirect(self, scan_numbers):
def SumDirect( self, scan_numbers, index=None ):
""" **SumDirect**
Creates a summed 2D image of a given scan or list of scans.
......@@ -463,9 +463,18 @@ class Hydra:
en_column=en_column, moni_column=self.moni_column)
if im_sum is None:
im_sum = np.zeros(scan.edfmats[0].shape ,"f")
im_sum[:] += scan.edfmats.sum(axis=0)
return im_sum
im_sum1 = np.zeros(scan.edfmats[0].shape ,"f")
im_sum2 = np.zeros(scan.edfmats[0].shape ,"f")
if not index:
im_sum1[:] += scan.edfmats.sum(axis=0)
else:
im_sum1[:] += scan.edfmats[0:index,:,:].sum(axis=0)
im_sum2[:] += scan.edfmats[index:,:,:].sum(axis=0)
if not index:
return im_sum1
else:
return im_sum2-im_sum1
def get_eloss_new(self, method='sum'):
""" **get_eloss_new**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment