Skip to content
Snippets Groups Projects
Commit 581066f6 authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

remove commented code, add units to temperature

parent d44539aa
No related branches found
No related tags found
No related merge requests found
......@@ -123,19 +123,15 @@ temp = np.linspace(1, 215, 100)
fit = curve_fit(c_einstein, T, c, 500)
T_E = fit[0][0]
#delta_T_E = np.sqrt(fit[1][0, 0])
#print(f"T_E = {T_E:.5} ± {delta_T_E:.3} K")
fit = curve_fit(c_debye, T, c, 500)
T_D = fit[0][0]
#delta_T_D = np.sqrt(fit[1][0, 0])
#print(f"T_D = {T_D:.5} ± {delta_T_D:.3} K")
fig, ax = pyplot.subplots()
ax.scatter(T, c)
ax.set_title('Heat capacity of silver compared to the Debye and Einstein models')
ax.plot(temp, c_debye(temp, T_D), label=f'Debye model, $T_D={T_D:.5}$')
ax.plot(temp, c_einstein(temp, T_E), label=f'Einstein model, $T_E={T_E:.5}$')
ax.plot(temp, c_debye(temp, T_D), label=f'Debye model, $T_D={T_D:.5}K$')
ax.plot(temp, c_einstein(temp, T_E), label=f'Einstein model, $T_E={T_E:.5}K$')
ax.set_ylim(bottom=0, top=3)
ax.set_xlim(0, 215)
ax.set_xlabel('$T(K)$')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment