regular backup
This commit is contained in:
parent
68bded568b
commit
60c2612d0a
@ -196,16 +196,16 @@ class ImageAnalyser():
|
|||||||
return dataSet.isel(x=slice(x_start, x_end), y=slice(y_start, y_end))
|
return dataSet.isel(x=slice(x_start, x_end), y=slice(y_start, y_end))
|
||||||
|
|
||||||
def get_OD(self, imageAtom, imageBackground, imageDrak):
|
def get_OD(self, imageAtom, imageBackground, imageDrak):
|
||||||
"""_summary_
|
"""Calculate the OD image for absorption imaging.
|
||||||
|
|
||||||
:param imageAtom: _description_
|
:param imageAtom: The image with atoms
|
||||||
:type imageAtom: _type_
|
:type imageAtom: numpy array
|
||||||
:param imageBackground: _description_
|
:param imageBackground: The image without atoms
|
||||||
:type imageBackground: _type_
|
:type imageBackground: numpy array
|
||||||
:param imageDrak: _description_
|
:param imageDrak: The image without light
|
||||||
:type imageDrak: _type_
|
:type imageDrak: numpy array
|
||||||
:return: _description_
|
:return: The OD images
|
||||||
:rtype: _type_
|
:rtype: numpy array
|
||||||
"""
|
"""
|
||||||
|
|
||||||
numerator = np.atleast_1d(imageBackground - imageDrak)
|
numerator = np.atleast_1d(imageBackground - imageDrak)
|
||||||
@ -222,9 +222,29 @@ class ImageAnalyser():
|
|||||||
return imageOD
|
return imageOD
|
||||||
|
|
||||||
def get_Ncount(self, dataSet, dim=['x', 'y'], **kwargs):
|
def get_Ncount(self, dataSet, dim=['x', 'y'], **kwargs):
|
||||||
|
"""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
|
||||||
|
"""
|
||||||
return dataSet.sum(dim=['x', 'y'], **kwargs)
|
return dataSet.sum(dim=['x', 'y'], **kwargs)
|
||||||
|
|
||||||
def get_absorption_images(self, dataSet, dask='allowed', keep_attrs=True, **kwargs):
|
def get_absorption_images(self, dataSet, dask='allowed', keep_attrs=True, **kwargs):
|
||||||
|
"""Calculate the OD images for absorption imaging.
|
||||||
|
|
||||||
|
: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
|
||||||
|
:return: The data including the OD images.
|
||||||
|
:rtype: xarray DataSet
|
||||||
|
"""
|
||||||
|
|
||||||
kwargs.update(
|
kwargs.update(
|
||||||
{
|
{
|
||||||
@ -244,6 +264,15 @@ class ImageAnalyser():
|
|||||||
return dataSet
|
return dataSet
|
||||||
|
|
||||||
def remove_background(self, dataSet, dask='allowed', keep_attrs=True, **kwargs):
|
def remove_background(self, dataSet, dask='allowed', keep_attrs=True, **kwargs):
|
||||||
|
"""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
|
||||||
|
"""
|
||||||
|
|
||||||
kwargs.update(
|
kwargs.update(
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user