Skip to content

Commit 29b0b76

Browse files
committed
simplyfied combination of results
1 parent bba6de5 commit 29b0b76

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/Calculation.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ def combine_complex_results(result1, result2):
9696
for sample in samples:
9797
results = []
9898
for entry1, entry2 in zip(result1[sample], result2[sample]):
99-
value1, error1 = entry1
100-
value2, error2 = entry2
101-
results.append( ( value1 + value2, sqrt( error1**2 + error2**2 ) ) )
99+
v1 = ufloat(entry1[0], entry1[1])
100+
v2 = ufloat(entry2[0], entry2[1])
101+
s = v1 + v2
102+
results.append( ( s.nominal_value, s.std_dev ) )
102103
combined_result[sample] = results
103104
return combined_result
104105

0 commit comments

Comments
 (0)