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:
dataSetAtoms = dataSet[self._image_name['atoms']] - dataSet[self._image_name['dark']]
scanAxis = list(get_scanAxis(dataSet))
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:
OptimumRef = self._fringeRemoval.fringe_removal(dataSet[self._image_name['atoms']])
OptimumRef = self._fringeRemoval.fringe_removal(dataSetAtoms)
dataSet = dataSet.assign(
{
@ -310,7 +312,7 @@ class ImageAnalyser():
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:
@ -395,7 +397,7 @@ class ImageAnalyser():
dataSet = read_hdf5_file(filePath, group, **kwargs)
scanAxis = dataSet.scanAxis
dataSet = dataSet[self._image_name['background']]
dataSet = dataSet[self._image_name['background']] - dataSet[self._image_name['dark']]
dataSet.attrs['scanAxis'] = scanAxis
if crop:

File diff suppressed because one or more lines are too long