The first working version
This commit is contained in:
parent
2b2606afc4
commit
2026a599ce
@ -101,8 +101,8 @@ class ImageAnalyser():
|
|||||||
else:
|
else:
|
||||||
return imageOD
|
return imageOD
|
||||||
|
|
||||||
def get_Ncount(self, imageOD):
|
def get_Ncount(self, dataSet, dim=['x', 'y'], **kwargs):
|
||||||
return np.sum(imageOD)
|
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):
|
||||||
|
|
||||||
|
2801
Example.ipynb
Normal file
2801
Example.ipynb
Normal file
File diff suppressed because one or more lines are too long
@ -76,4 +76,33 @@ def seperate_uncertainty(data, dask='parallelized', **kwargs):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
return xr.apply_ufunc(_seperate_uncertainty, data, **kwargs)
|
return xr.apply_ufunc(_seperate_uncertainty, data, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
def get_scanAxis(dataSet):
|
||||||
|
res = dataSet.scanAxis
|
||||||
|
|
||||||
|
if len(res) == 0:
|
||||||
|
res = [None, None]
|
||||||
|
elif len(res) == 1:
|
||||||
|
res = [res[0], None]
|
||||||
|
elif len(res) == 2 and res[0] == 'runs':
|
||||||
|
res = [res[1], res[0]]
|
||||||
|
|
||||||
|
return res
|
||||||
|
|
||||||
|
def print_scanAxis(dataSet):
|
||||||
|
scanAxis = dataSet.scanAxis
|
||||||
|
|
||||||
|
scan = {}
|
||||||
|
|
||||||
|
for key in scanAxis:
|
||||||
|
scanValue = np.array(dataSet[key])
|
||||||
|
scanValue, indices = np.unique(scanValue, return_index=True)
|
||||||
|
scan.update(
|
||||||
|
{
|
||||||
|
key: scanValue[indices]
|
||||||
|
}
|
||||||
|
)
|
||||||
|
print("The detected scaning axes and values are: /n")
|
||||||
|
print(scan)
|
177
test.ipynb
177
test.ipynb
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user