@@ -302,7 +302,7 @@ def stackUpdated(self, positioners=None):
302302 numpy .add (self ._stackImageData [i :i + step ,:],
303303 numpy .sum (tmpData , 2 ),
304304 self ._stackImageData [i :i + step ,:])
305- tmpData . shape = step * shape [1 ], shape [2 ]
305+ tmpData = tmpData . reshape ( step * shape [1 ], shape [2 ])
306306 tmpMax = numpy .nanmax (tmpData , axis = 0 )
307307 numpy .add (mcaData0 , numpy .sum (tmpData , 0 ), mcaData0 )
308308 mcaMax = numpy .max ([mcaMax , tmpMax ], axis = 0 )
@@ -317,7 +317,7 @@ def stackUpdated(self, positioners=None):
317317 step = 1
318318 for i in range (shape [0 ]):
319319 tmpData = self ._stack .data [i :i + step ,:,:]
320- tmpData . shape = tmpData .shape [1 :]
320+ tmpData = tmpData .reshape ( tmpData . shape [1 :])
321321 numpy .add (self ._stackImageData ,
322322 tmpData ,
323323 self ._stackImageData )
@@ -748,7 +748,7 @@ def calculateMcaDataObject(self, normalize=False, mask=None, mcamax=False):
748748 row_dict [r ].append (c )
749749 for r in row_list :
750750 tmpMcaData = self ._stack .data [r :r + 1 , row_dict [r ], :]
751- tmpMcaData . shape = - 1 , mcaData .shape [0 ]
751+ tmpMcaData = tmpMcaData . reshape ( - 1 , mcaData .shape [0 ])
752752 mcaData += numpy .sum (tmpMcaData , axis = 0 , dtype = numpy .float64 )
753753 if mcamax :
754754 mcaMax = numpy .max ([mcaMax , numpy .max (tmpMcaData , axis = 0 )], axis = 0 )
@@ -793,7 +793,7 @@ def calculateMcaDataObject(self, normalize=False, mask=None, mcamax=False):
793793 row_dict [r ].append (c )
794794 for r in row_list :
795795 tmpMcaData = self ._stack .data [r :r + 1 , row_dict [r ], :]
796- tmpMcaData . shape = - 1 , mcaData .shape [0 ]
796+ tmpMcaData = tmpMcaData . reshape ( - 1 , mcaData .shape [0 ])
797797 mcaData += tmpMcaData .sum (axis = 0 , dtype = numpy .float64 )
798798 if mcamax :
799799 mcaMax = numpy .max ([mcaMax , numpy .max (tmpMcaData , axis = 0 )], axis = 0 )
@@ -832,7 +832,7 @@ def calculateMcaDataObject(self, normalize=False, mask=None, mcamax=False):
832832 if "McaLiveTime" in self ._stack .info :
833833 selectedPixels = actualSelectionMask > 0
834834 liveTime = self ._stack .info ["McaLiveTime" ][:]
835- liveTime . shape = actualSelectionMask .shape
835+ liveTime = liveTime . reshape ( actualSelectionMask .shape )
836836 liveTime = liveTime [selectedPixels ].sum ()
837837 if normalize :
838838 liveTime = liveTime / float (npixels )
@@ -940,7 +940,7 @@ def calculateROIImages(self, index1, index2, imiddle=None, energy=None):
940940 minImage = numpy .zeros (leftImage .shape , numpy .int32 )
941941 for i in range (i1 , i2 ):
942942 tmpData = self ._stack .data [i ]
943- tmpData . shape = leftImage .shape
943+ tmpData = tmpData . reshape ( leftImage .shape )
944944 if i == i1 :
945945 minImageData = tmpData * 1.0
946946 maxImageData = tmpData * 1.0
@@ -974,7 +974,7 @@ def calculateROIImages(self, index1, index2, imiddle=None, energy=None):
974974 istep = 1
975975 for i in range (i1 , i2 ):
976976 tmpData = self ._stack .data [i :i + istep ]
977- tmpData . shape = roiImage .shape
977+ tmpData = tmpData . reshape ( roiImage .shape )
978978 if i == i1 :
979979 minImageData = tmpData * 1.0
980980 maxImageData = tmpData * 1.0
0 commit comments