Add function to calculate mean and std

This commit is contained in:
Jianshun Gao 2023-05-08 11:52:21 +02:00
parent 075be187e4
commit 8d03d7846e

View File

@ -106,3 +106,17 @@ def print_scanAxis(dataSet):
) )
print("The detected scaning axes and values are: /n") print("The detected scaning axes and values are: /n")
print(scan) print(scan)
def calculate_mean(dataSet):
if 'runs' in dataSet.dims:
return dataSet.mean(dim='runs')
else:
return dataSet
def calculate_std(dataSet):
if 'runs' in dataSet.dims:
return dataSet.mean(dim='runs')
else:
return None