Skip to content

Commit e06fa8b

Browse files
committed
added test output
1 parent 9546b99 commit e06fa8b

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

examples/example_optimal_thermobarometry.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,17 @@
133133
f"+/- {np.sqrt(res.xcov[0, 0])/1.e9:.2f} GPa"
134134
)
135135
print(
136-
f"Estimated Temperature: {assemblage.temperature:.2f} "
137-
f"+/- {np.sqrt(res.xcov[1, 1]):.2f} K"
136+
f"Estimated Temperature: {assemblage.temperature:.0f} "
137+
f"+/- {np.sqrt(res.xcov[1, 1]):.0f} K"
138138
)
139-
print(f"Correlation between P and T: {res.xcorr:.4f}")
139+
print(f"Correlation between P and T: {res.xcorr:.2f}")
140140
print(f"Number of Reactions: {res.n_reactions}")
141141
print(f"Number of Parameters: {res.n_params}")
142142
print(f"Degrees of Freedom: {res.degrees_of_freedom}")
143-
print(f"Reduced Chi-squared: {res.reduced_chisqr:.4f}")
144-
print(f"Fit (sqrt reduced chi-squared): {res.fit:.4f}")
145-
print("Weighted reaction affinities:")
146-
np.set_printoptions(precision=2)
147-
print(res.weighted_affinities)
143+
print(f"Reduced Chi-squared: {res.reduced_chisqr:.2f}")
144+
print(f"Fit (sqrt reduced chi-squared): {res.fit:.2f}")
145+
146+
# Uncomment to see the weighted reaction affinities
147+
# print("Weighted reaction affinities:")
148+
# np.set_printoptions(precision=2)
149+
# print(res.weighted_affinities)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Estimated Pressure: 0.43 +/- 0.04 GPa
2+
Estimated Temperature: 887 +/- 11 K
3+
Correlation between P and T: 0.11
4+
Number of Reactions: 11
5+
Number of Parameters: 2
6+
Degrees of Freedom: 9
7+
Reduced Chi-squared: 0.20
8+
Fit (sqrt reduced chi-squared): 0.45

0 commit comments

Comments
 (0)