2023-05-04 13:47:33 +02:00
|
|
|
import numpy as np
|
|
|
|
import xarray as xr
|
2023-06-09 18:59:56 +02:00
|
|
|
import copy
|
2023-05-04 13:47:33 +02:00
|
|
|
|
2023-09-28 16:35:30 +02:00
|
|
|
from DataContainer.ReadData import read_hdf5_file
|
|
|
|
from Analyser.FringeRemoval import FringeRemoval
|
|
|
|
from ToolFunction.ToolFunction import get_scanAxis
|
|
|
|
|
2023-05-04 13:47:33 +02:00
|
|
|
|
|
|
|
class ImageAnalyser():
|
2023-07-05 15:16:56 +02:00
|
|
|
"""A class for operate with and analyse images
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
|
|
|
|
def __init__(self) -> None:
|
2023-07-05 15:16:56 +02:00
|
|
|
"""Initialize the class
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
self._image_name = {
|
|
|
|
'atoms': 'atoms',
|
|
|
|
'background': 'background',
|
|
|
|
'dark': 'dark',
|
|
|
|
'OD':'OD',
|
2023-09-28 16:35:30 +02:00
|
|
|
'optimumBackground':'optimumBackground'
|
2023-05-04 13:47:33 +02:00
|
|
|
}
|
|
|
|
self._center = None
|
|
|
|
self._span = None
|
|
|
|
self._fraction = None
|
2023-09-28 16:35:30 +02:00
|
|
|
|
|
|
|
self._fringeRemoval = FringeRemoval()
|
|
|
|
self.fringeRemovalReferenceImages = None
|
|
|
|
|
2023-05-04 13:47:33 +02:00
|
|
|
@property
|
|
|
|
def image_name(self):
|
2023-07-05 15:16:56 +02:00
|
|
|
"""The getter of the names of three standard images for absorption images
|
|
|
|
|
|
|
|
:return: The names of three standard images for absorption images
|
|
|
|
:rtype: dict
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
return self._image_name
|
|
|
|
|
|
|
|
@image_name.setter
|
|
|
|
def image_name(self, value):
|
2023-07-05 15:16:56 +02:00
|
|
|
"""The setter of the names of three standard images for absorption images.
|
|
|
|
It has to be a dict and have the follow format:
|
|
|
|
{
|
|
|
|
'atoms': the name of the image with atoms,
|
|
|
|
'background': the name of the image without atoms,
|
|
|
|
'dark': the name of the image without light,
|
|
|
|
'OD': the name of the calculated OD,
|
|
|
|
}
|
|
|
|
|
|
|
|
:param value: The names of three standard images for absorption images.
|
|
|
|
:type value: dict
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
self._image_name.update(value)
|
|
|
|
|
|
|
|
@property
|
|
|
|
def center(self):
|
2023-07-05 15:16:56 +02:00
|
|
|
"""The getter of the center of region of insterest (ROI)
|
|
|
|
|
|
|
|
:return: The center of region of insterest (ROI)
|
|
|
|
:rtype: tuple
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
return self._center
|
|
|
|
|
|
|
|
@center.setter
|
|
|
|
def center(self, value):
|
2023-07-05 15:16:56 +02:00
|
|
|
"""The setter of the center of region of insterest (ROI)
|
|
|
|
|
|
|
|
:param value: The center of region of insterest (ROI)
|
|
|
|
:type value: tuple
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
self._center = value
|
|
|
|
|
|
|
|
@property
|
|
|
|
def span(self):
|
2023-07-05 15:16:56 +02:00
|
|
|
"""The getter of the span of region of insterest (ROI)
|
|
|
|
|
|
|
|
:return: The span of region of insterest (ROI)
|
|
|
|
:rtype: tuple
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
return self._span
|
|
|
|
|
|
|
|
@span.setter
|
|
|
|
def span(self, value):
|
2023-07-05 15:16:56 +02:00
|
|
|
"""The setter of the span of region of insterest (ROI)
|
|
|
|
|
|
|
|
:param value: The span of region of insterest (ROI)
|
|
|
|
:type value: tuple
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
self._span = value
|
|
|
|
|
|
|
|
@property
|
|
|
|
def fraction(self):
|
2023-07-05 15:16:56 +02:00
|
|
|
"""The getter of the fraction used to remove the background in the region of insterest (ROI)
|
|
|
|
|
|
|
|
:return: The fraction used to remove the background
|
|
|
|
:rtype: tuple
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
return self._fraction
|
|
|
|
|
|
|
|
@fraction.setter
|
|
|
|
def fraction(self, value):
|
2023-07-05 15:16:56 +02:00
|
|
|
"""The setter of the fraction used to remove the background in the region of insterest (ROI)
|
|
|
|
|
|
|
|
:param value: The fraction used to remove the background
|
|
|
|
:type value: tuple
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
self._fraction = value
|
|
|
|
|
|
|
|
def get_offset_from_corner(self, dataArray, x_fraction=None, y_fraction=None, fraction=None, xAxisName='x', yAxisName='y'):
|
2023-07-05 15:16:56 +02:00
|
|
|
"""Calculate the background value based on the four coners of the image.
|
|
|
|
|
|
|
|
:param dataArray: The image
|
|
|
|
:type dataArray: xarray DataArray
|
|
|
|
:param x_fraction: The fraction of the pixels used x in axis, defaults to None
|
|
|
|
:type x_fraction: float, optional
|
|
|
|
:param y_fraction: The fraction of the pixels used y in axis, defaults to None
|
|
|
|
:type y_fraction: float, optional
|
|
|
|
:param fraction: The fraction of the pixels used to calculate the background, defaults to None
|
|
|
|
:type fraction: tuple, optional
|
|
|
|
:param xAxisName: The name of the x axis in dataArray, defaults to 'x'
|
|
|
|
:type xAxisName: str, optional
|
|
|
|
:param yAxisName: The name of the y axis in dataArray, defaults to 'y'
|
|
|
|
:type yAxisName: str, optional
|
|
|
|
:return: The value of the background
|
|
|
|
:rtype: float
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
|
|
|
|
if fraction is None:
|
|
|
|
if x_fraction is None:
|
|
|
|
x_fraction = self._fraction[0]
|
|
|
|
|
|
|
|
if y_fraction is None:
|
|
|
|
y_fraction = self._fraction[1]
|
|
|
|
else:
|
|
|
|
x_fraction = fraction[0]
|
|
|
|
y_fraction = fraction[1]
|
|
|
|
|
|
|
|
x_number = dataArray[xAxisName].shape[0]
|
|
|
|
y_number = dataArray[yAxisName].shape[0]
|
|
|
|
|
|
|
|
mean = dataArray.isel(x=slice(0, int(x_number * x_fraction)), y=slice(0 , int(y_number * y_fraction))).mean(dim=[xAxisName, yAxisName])
|
|
|
|
mean += dataArray.isel(x=slice(0, int(x_number * x_fraction)), y=slice(int(y_number - y_number * y_fraction) , int(y_number))).mean(dim=[xAxisName, yAxisName])
|
|
|
|
mean += dataArray.isel(x=slice(int(x_number - x_number * x_fraction) , int(x_number)), y=slice(0 , int(y_number * y_fraction))).mean(dim=[xAxisName, yAxisName])
|
|
|
|
mean += dataArray.isel(x=slice(int(x_number - x_number * x_fraction) , int(x_number)), y=slice(int(y_number - y_number * y_fraction) , int(y_number))).mean(dim=[xAxisName, yAxisName])
|
|
|
|
|
|
|
|
return mean / 4
|
|
|
|
|
|
|
|
def substract_offset(self, dataArray, **kwargs):
|
2023-07-05 15:16:56 +02:00
|
|
|
"""Remove the backgournd
|
|
|
|
|
|
|
|
:param dataArray: The image
|
|
|
|
:type dataArray: xarray DataArray
|
|
|
|
:return: The image after removing background
|
|
|
|
:rtype: xarray DataArray
|
|
|
|
"""
|
2023-06-09 18:59:56 +02:00
|
|
|
res = dataArray - self.get_offset_from_corner(dataArray, **kwargs)
|
|
|
|
res.attrs = copy.copy(dataArray.attrs)
|
|
|
|
return res
|
2023-05-04 13:47:33 +02:00
|
|
|
|
2023-09-28 16:35:30 +02:00
|
|
|
def crop_image(self, dataSet, center=None, span=None, fringeRemoval=False):
|
2023-07-05 15:16:56 +02:00
|
|
|
"""Crop the image according to the region of interest (ROI).
|
|
|
|
|
|
|
|
:param dataSet: The images
|
|
|
|
:type dataSet: xarray DataArray or DataSet
|
|
|
|
:param center: The center of region of insterest (ROI), defaults to None
|
|
|
|
:type center: tuple, optional
|
|
|
|
:param span: the span of region of insterest (ROI), defaults to None
|
|
|
|
:type span: tuple, optional
|
2023-09-28 16:54:37 +02:00
|
|
|
:param fringeRemoval: If also crop the reference background images for finges removal function, defaults to False
|
|
|
|
:type fringeRemoval: bool, optional
|
2023-07-05 15:16:56 +02:00
|
|
|
:return: The croped images
|
|
|
|
:rtype: xarray DataArray or DataSet
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
|
|
|
|
if center is None:
|
|
|
|
center = self._center
|
|
|
|
if span is None:
|
|
|
|
span = self._span
|
|
|
|
|
|
|
|
x_start = int(center[0] - span[0] / 2)
|
|
|
|
x_end = int(center[0] + span[0] / 2)
|
|
|
|
y_end = int(center[1] + span[1] / 2)
|
|
|
|
y_start = int(center[1] - span[1] / 2)
|
2023-06-02 18:42:18 +02:00
|
|
|
|
|
|
|
dataSet.attrs['x_start'] = x_start
|
|
|
|
dataSet.attrs['x_end'] = x_end
|
|
|
|
dataSet.attrs['y_end'] = y_end
|
|
|
|
dataSet.attrs['y_start'] = y_start
|
|
|
|
dataSet.attrs['x_center'] = center[0]
|
|
|
|
dataSet.attrs['y_center'] = center[1]
|
|
|
|
dataSet.attrs['x_span'] = span[0]
|
|
|
|
dataSet.attrs['y_span'] = span[1]
|
|
|
|
|
|
|
|
if isinstance(dataSet, type(xr.Dataset())):
|
|
|
|
for key in list(dataSet.data_vars):
|
|
|
|
dataSet[key].attrs['x_start'] = x_start
|
|
|
|
dataSet[key].attrs['x_end'] = x_end
|
|
|
|
dataSet[key].attrs['y_end'] = y_end
|
|
|
|
dataSet[key].attrs['y_start'] = y_start
|
|
|
|
dataSet[key].attrs['x_center'] = center[0]
|
|
|
|
dataSet[key].attrs['y_center'] = center[1]
|
|
|
|
dataSet[key].attrs['x_span'] = span[0]
|
|
|
|
dataSet[key].attrs['y_span'] = span[1]
|
2023-09-28 16:35:30 +02:00
|
|
|
|
|
|
|
if fringeRemoval:
|
|
|
|
scanAxis = list(get_scanAxis(self.fringeRemovalReferenceImages))
|
|
|
|
if not scanAxis[1] is None:
|
|
|
|
self._fringeRemoval.referenceImages = self.fringeRemovalReferenceImages.isel(x=slice(x_start, x_end), y=slice(y_start, y_end)).stack(_imgIdx=scanAxis)
|
|
|
|
else:
|
|
|
|
self._fringeRemoval.referenceImages = self.fringeRemovalReferenceImages.isel(x=slice(x_start, x_end), y=slice(y_start, y_end))
|
2023-05-04 13:47:33 +02:00
|
|
|
|
2023-05-04 19:16:35 +02:00
|
|
|
return dataSet.isel(x=slice(x_start, x_end), y=slice(y_start, y_end))
|
2023-05-04 13:47:33 +02:00
|
|
|
|
|
|
|
def get_OD(self, imageAtom, imageBackground, imageDrak):
|
2023-07-05 16:00:47 +02:00
|
|
|
"""Calculate the OD image for absorption imaging.
|
|
|
|
|
|
|
|
:param imageAtom: The image with atoms
|
|
|
|
:type imageAtom: numpy array
|
|
|
|
:param imageBackground: The image without atoms
|
|
|
|
:type imageBackground: numpy array
|
|
|
|
:param imageDrak: The image without light
|
|
|
|
:type imageDrak: numpy array
|
|
|
|
:return: The OD images
|
|
|
|
:rtype: numpy array
|
2023-07-05 15:16:56 +02:00
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
|
|
|
|
numerator = np.atleast_1d(imageBackground - imageDrak)
|
|
|
|
denominator = np.atleast_1d(imageAtom - imageDrak)
|
|
|
|
|
|
|
|
numerator[numerator == 0] = 1
|
|
|
|
denominator[denominator == 0] = 1
|
|
|
|
imageOD = np.abs(np.divide(denominator, numerator))
|
|
|
|
imageOD= -np.log(imageOD)
|
|
|
|
|
|
|
|
if len(imageOD) == 1:
|
|
|
|
return imageOD[0]
|
|
|
|
else:
|
|
|
|
return imageOD
|
2023-09-28 16:35:30 +02:00
|
|
|
|
|
|
|
def get_OD_no_dark(self, imageAtom, imageBackground):
|
|
|
|
"""Calculate the OD image for absorption imaging without dark images.
|
|
|
|
|
|
|
|
:param imageAtom: The image with atoms
|
|
|
|
:type imageAtom: numpy array
|
|
|
|
:param imageBackground: The image without atoms
|
|
|
|
:type imageBackground: numpy array
|
|
|
|
:param imageDrak: The image without light
|
|
|
|
:type imageDrak: numpy array
|
|
|
|
:return: The OD images
|
|
|
|
:rtype: numpy array
|
|
|
|
"""
|
|
|
|
|
|
|
|
numerator = np.atleast_1d(imageBackground)
|
|
|
|
denominator = np.atleast_1d(imageAtom)
|
|
|
|
|
|
|
|
numerator[numerator == 0] = 1
|
|
|
|
denominator[denominator == 0] = 1
|
|
|
|
imageOD = np.abs(np.divide(denominator, numerator))
|
|
|
|
imageOD= -np.log(imageOD)
|
|
|
|
|
|
|
|
if len(imageOD) == 1:
|
|
|
|
return imageOD[0]
|
|
|
|
else:
|
|
|
|
return imageOD
|
2023-05-04 13:47:33 +02:00
|
|
|
|
2023-05-07 23:41:31 +02:00
|
|
|
def get_Ncount(self, dataSet, dim=['x', 'y'], **kwargs):
|
2023-07-05 16:00:47 +02:00
|
|
|
"""Sum all the value in the image to give the Ncount.
|
|
|
|
|
|
|
|
:param dataSet: The images
|
|
|
|
:type dataSet: xarray DataArray or DataSet
|
|
|
|
:param dim: The dimensions to take the sumation, defaults to ['x', 'y']
|
|
|
|
:type dim: list, optional
|
|
|
|
:return: The Ncount
|
|
|
|
:rtype: xarray DataArray or DataSet
|
|
|
|
"""
|
2023-05-07 23:41:31 +02:00
|
|
|
return dataSet.sum(dim=['x', 'y'], **kwargs)
|
2023-05-04 13:47:33 +02:00
|
|
|
|
2023-09-28 16:35:30 +02:00
|
|
|
def get_absorption_images(self, dataSet, fringeRemoval=False, dask='allowed', keep_attrs=True, **kwargs):
|
2023-07-05 16:00:47 +02:00
|
|
|
"""Calculate the OD images for absorption imaging.
|
|
|
|
|
|
|
|
:param dataSet: The data from absorption imaging.
|
|
|
|
:type dataSet: xarray DataSet
|
2023-09-28 16:54:37 +02:00
|
|
|
:param fringeRemoval: If use fringe removal function, defaults to False
|
|
|
|
:type fringeRemoval: bool, optional
|
2023-07-05 16:00:47 +02:00
|
|
|
:param dask: over write of the same argument in xarray.apply_ufunc, defaults to 'allowed'
|
|
|
|
:type dask: str, optional
|
|
|
|
:param keep_attrs: over write of the same argument in xarray.apply_ufunc, defaults to True
|
|
|
|
:type keep_attrs: bool, optional
|
|
|
|
:return: The data including the OD images.
|
|
|
|
:rtype: xarray DataSet
|
|
|
|
"""
|
2023-05-04 13:47:33 +02:00
|
|
|
|
|
|
|
kwargs.update(
|
2023-05-04 18:32:17 +02:00
|
|
|
{
|
|
|
|
'dask': dask,
|
|
|
|
'keep_attrs': keep_attrs,
|
|
|
|
}
|
2023-05-04 13:47:33 +02:00
|
|
|
)
|
|
|
|
|
2023-09-28 16:35:30 +02:00
|
|
|
if fringeRemoval:
|
|
|
|
|
2023-09-28 16:51:44 +02:00
|
|
|
dataSetAtoms = dataSet[self._image_name['atoms']] - dataSet[self._image_name['dark']]
|
|
|
|
|
2023-09-28 16:35:30 +02:00
|
|
|
scanAxis = list(get_scanAxis(dataSet))
|
|
|
|
if not scanAxis[1] is None:
|
2023-09-28 16:51:44 +02:00
|
|
|
OptimumRef = self._fringeRemoval.fringe_removal(dataSetAtoms.stack(_imgIdx=scanAxis))
|
2023-09-28 16:35:30 +02:00
|
|
|
else:
|
2023-09-28 16:51:44 +02:00
|
|
|
OptimumRef = self._fringeRemoval.fringe_removal(dataSetAtoms)
|
2023-09-28 16:35:30 +02:00
|
|
|
|
|
|
|
dataSet = dataSet.assign(
|
|
|
|
{
|
|
|
|
self._image_name['optimumBackground']: OptimumRef
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
dataSet = dataSet.assign(
|
|
|
|
{
|
2023-09-28 16:51:44 +02:00
|
|
|
self._image_name['OD']: xr.apply_ufunc(self.get_OD_no_dark, dataSetAtoms, dataSet[self._image_name['optimumBackground']], **kwargs)
|
2023-09-28 16:35:30 +02:00
|
|
|
}
|
|
|
|
)
|
|
|
|
else:
|
|
|
|
dataSet = dataSet.assign(
|
|
|
|
{
|
|
|
|
self._image_name['OD']: xr.apply_ufunc(self.get_OD, dataSet[self._image_name['atoms']], dataSet[self._image_name['background']], dataSet[self._image_name['dark']], **kwargs)
|
|
|
|
}
|
|
|
|
)
|
2023-06-09 18:59:56 +02:00
|
|
|
|
2023-06-14 14:54:57 +02:00
|
|
|
# dataSet[self._image_name['OD']].attrs.update(dataSet.attrs)
|
2023-05-04 13:47:33 +02:00
|
|
|
|
2023-05-04 19:16:35 +02:00
|
|
|
return dataSet
|
2023-05-04 13:47:33 +02:00
|
|
|
|
2023-05-04 19:16:35 +02:00
|
|
|
def remove_background(self, dataSet, dask='allowed', keep_attrs=True, **kwargs):
|
2023-07-05 16:00:47 +02:00
|
|
|
"""Remove the background for the given image data
|
|
|
|
|
|
|
|
:param dataSet: The data from absorption imaging.
|
|
|
|
:type dataSet: xarray DataSet
|
|
|
|
:param dask: over write of the same argument in xarray.apply_ufunc, defaults to 'allowed'
|
|
|
|
:type dask: str, optional
|
|
|
|
:param keep_attrs: over write of the same argument in xarray.apply_ufunc, defaults to True
|
|
|
|
:type keep_attrs: bool, optional
|
|
|
|
"""
|
|
|
|
|
2023-05-04 13:47:33 +02:00
|
|
|
kwargs.update(
|
2023-05-04 18:32:17 +02:00
|
|
|
{
|
|
|
|
'dask': dask,
|
|
|
|
'keep_attrs': keep_attrs,
|
|
|
|
}
|
2023-05-04 13:47:33 +02:00
|
|
|
)
|
|
|
|
|
2023-05-04 19:16:35 +02:00
|
|
|
xr.apply_ufunc(self.get_OD, dataSet[self._image_name['atoms']], dataSet[self._image_name['background']], dataSet[self._image_name['dark']], **kwargs)
|
2023-09-28 16:35:30 +02:00
|
|
|
|
|
|
|
@property
|
|
|
|
def fringeRemovalCenter(self):
|
|
|
|
"""The getter of the center of region of insterest (ROI)
|
|
|
|
|
|
|
|
:return: The center of region of insterest (ROI)
|
|
|
|
:rtype: tuple
|
|
|
|
"""
|
|
|
|
return self._fringeRemoval.center
|
|
|
|
|
|
|
|
@fringeRemovalCenter.setter
|
|
|
|
def fringeRemovalCenter(self, value):
|
|
|
|
"""The setter of the center of region of insterest (ROI)
|
|
|
|
|
|
|
|
:param value: The center of region of insterest (ROI)
|
|
|
|
:type value: tuple
|
|
|
|
"""
|
|
|
|
self._fringeRemoval.center = value
|
|
|
|
|
|
|
|
@property
|
|
|
|
def fringeRemovalSpan(self):
|
|
|
|
"""The getter of the span of region of insterest (ROI)
|
|
|
|
|
|
|
|
:return: The span of region of insterest (ROI)
|
|
|
|
:rtype: tuple
|
|
|
|
"""
|
|
|
|
return self._fringeRemoval.span
|
2023-05-04 13:47:33 +02:00
|
|
|
|
2023-09-28 16:35:30 +02:00
|
|
|
@fringeRemovalSpan.setter
|
|
|
|
def fringeRemovalSpan(self, value):
|
|
|
|
"""The setter of the span of region of insterest (ROI)
|
2023-05-04 13:47:33 +02:00
|
|
|
|
2023-09-28 16:35:30 +02:00
|
|
|
:param value: The span of region of insterest (ROI)
|
|
|
|
:type value: tuple
|
|
|
|
"""
|
|
|
|
self._fringeRemoval.span = value
|
|
|
|
|
2023-09-28 17:03:50 +02:00
|
|
|
def load_fringe_removal_background_from_hdf5(self, img_dir, SequenceName, date, shotNum, group, crop=False, load=False, **kwargs):
|
|
|
|
"""Load the reference background images from hdf5 files of one single shot.
|
|
|
|
|
|
|
|
:param img_dir: The path of the folder storing data.
|
|
|
|
:type img_dir: str
|
|
|
|
:param SequenceName: The name of the sequence
|
|
|
|
:type SequenceName: str
|
|
|
|
:param date: The date when the shot was taken in 'YYYY/MM/DD'.
|
|
|
|
:type date: str
|
|
|
|
:param shotNum: The number of the shot
|
|
|
|
:type shotNum: str
|
|
|
|
:param group: The name of the group storing the imgaes
|
|
|
|
:type group: str
|
|
|
|
:param crop: If crop the data, defaults to False
|
|
|
|
:type crop: bool, optional
|
|
|
|
:param load: If load the data into RAM, defaults to False
|
|
|
|
:type load: bool, optional
|
|
|
|
"""
|
|
|
|
folderPath = img_dir + SequenceName + "/" + date
|
2023-09-28 16:35:30 +02:00
|
|
|
filePath = folderPath + "/" + shotNum + "/*.h5"
|
|
|
|
|
|
|
|
dataSet = read_hdf5_file(filePath, group, **kwargs)
|
|
|
|
scanAxis = dataSet.scanAxis
|
|
|
|
|
2023-09-28 16:51:44 +02:00
|
|
|
dataSet = dataSet[self._image_name['background']] - dataSet[self._image_name['dark']]
|
2023-09-28 16:35:30 +02:00
|
|
|
dataSet.attrs['scanAxis'] = scanAxis
|
|
|
|
|
|
|
|
if crop:
|
|
|
|
dataSet = self.crop_image(dataSet)
|
|
|
|
|
|
|
|
if load:
|
|
|
|
self.fringeRemovalReferenceImages = dataSet.load()
|
|
|
|
else:
|
|
|
|
self.fringeRemovalReferenceImages = dataSet
|
|
|
|
|
|
|
|
def load_fringe_removal_background_from_database():
|
|
|
|
pass
|