This commit is contained in:
Jianshun Gao 2023-09-28 16:51:44 +02:00
parent 87d6ff49c9
commit e82cc5bb77
2 changed files with 4922 additions and 4 deletions

View File

@ -296,11 +296,13 @@ class ImageAnalyser():
if fringeRemoval: if fringeRemoval:
dataSetAtoms = dataSet[self._image_name['atoms']] - dataSet[self._image_name['dark']]
scanAxis = list(get_scanAxis(dataSet)) scanAxis = list(get_scanAxis(dataSet))
if not scanAxis[1] is None: if not scanAxis[1] is None:
OptimumRef = self._fringeRemoval.fringe_removal(dataSet[self._image_name['atoms']].stack(_imgIdx=scanAxis)) OptimumRef = self._fringeRemoval.fringe_removal(dataSetAtoms.stack(_imgIdx=scanAxis))
else: else:
OptimumRef = self._fringeRemoval.fringe_removal(dataSet[self._image_name['atoms']]) OptimumRef = self._fringeRemoval.fringe_removal(dataSetAtoms)
dataSet = dataSet.assign( dataSet = dataSet.assign(
{ {
@ -310,7 +312,7 @@ class ImageAnalyser():
dataSet = dataSet.assign( dataSet = dataSet.assign(
{ {
self._image_name['OD']: xr.apply_ufunc(self.get_OD_no_dark, dataSet[self._image_name['atoms']], dataSet[self._image_name['optimumBackground']], **kwargs) self._image_name['OD']: xr.apply_ufunc(self.get_OD_no_dark, dataSetAtoms, dataSet[self._image_name['optimumBackground']], **kwargs)
} }
) )
else: else:
@ -395,7 +397,7 @@ class ImageAnalyser():
dataSet = read_hdf5_file(filePath, group, **kwargs) dataSet = read_hdf5_file(filePath, group, **kwargs)
scanAxis = dataSet.scanAxis scanAxis = dataSet.scanAxis
dataSet = dataSet[self._image_name['background']] dataSet = dataSet[self._image_name['background']] - dataSet[self._image_name['dark']]
dataSet.attrs['scanAxis'] = scanAxis dataSet.attrs['scanAxis'] = scanAxis
if crop: if crop:

File diff suppressed because one or more lines are too long