regular backup

This commit is contained in:
Jianshun Gao 2023-09-08 14:20:25 +02:00
parent d84e6da902
commit aa13f41dd9
2 changed files with 250 additions and 60 deletions

View File

@ -167,6 +167,8 @@ class ImageAnalyser():
center = self._center
if span is None:
span = self._span
if not x in
x_start = int(center[0] - span[0] / 2)
x_end = int(center[0] + span[0] / 2)
@ -193,7 +195,14 @@ class ImageAnalyser():
dataSet[key].attrs['x_span'] = span[0]
dataSet[key].attrs['y_span'] = span[1]
return dataSet.isel(x=slice(x_start, x_end), y=slice(y_start, y_end))
res = dataSet.isel(x=slice(x_start, x_end), y=slice(y_start, y_end))
res = res.assign_coords(
{
'x': np.linspace(x_start, x_end - 1, span[0]),
'y': np.linspace(y_start, y_end - 1, span[1]),
}
)
return res
def get_OD(self, imageAtom, imageBackground, imageDrak):
"""Calculate the OD image for absorption imaging.

File diff suppressed because one or more lines are too long