diff --git a/script/KR84_test.py b/script/KR84_test.py index 96a2842..daa0bf3 100644 --- a/script/KR84_test.py +++ b/script/KR84_test.py @@ -1,4 +1,4 @@ -class jitter_stat (object): +class statistics_numbers (object): min = 0.0 mean = 0.0 max = 0.0 @@ -6,10 +6,17 @@ class jitter_stat (object): +def statistics_calc(data_in): + "calculates the min/max/mean/stdev of an array" + temp = statistics_numbers(); + temp.mean = mean (data_in) + temp.min = min (data_in) + temp.max = max (data_in) + temp.stdev = stdev(data_in) + + ref_jit_amplt_mean = mean(scan_result.getReadable(0)) -ref_jit_amplt = jitter_stat(); -ref_jit_amplt.mean = mean(scan_result.getReadable(0)[0:29]) -ref_jit_amplt.min = min(scan_result.getReadable(0)[0:29]) -ref_jit_amplt.max = max(scan_result.getReadable(0)[0:29]) -ref_jit_amplt.stdev = stdev(scan_result.getReadable(0)[0:29]) \ No newline at end of file +ref_jit_amplt2 = statistics_numbers(); +ref_jit_amplt2 = statistics_calc(scan_result.getReadable(0)[0:29]) +