|
|
@ -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) |