diff --git a/ToolFunction/ToolFunction.py b/ToolFunction/ToolFunction.py index 1b518c2..6f0803a 100644 --- a/ToolFunction/ToolFunction.py +++ b/ToolFunction/ToolFunction.py @@ -105,4 +105,18 @@ def print_scanAxis(dataSet): } ) print("The detected scaning axes and values are: /n") - print(scan) \ No newline at end of file + 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 \ No newline at end of file