MCPcopy Create free account
hub / github.com/AMReX-Astro/Castro / doit

Function doit

Exec/science/Detonation/analysis/compare_plot.py:31–66  ·  view source on GitHub ↗
(plotfiles, xmin, xmax)

Source from the content-addressed store, hash-verified

29
30
31def doit(plotfiles, xmin, xmax):
32
33 f = plt.figure()
34 f.set_size_inches(7.0, 9.0)
35
36 ax_T = f.add_subplot(311)
37 ax_e = f.add_subplot(312)
38 ax_he = f.add_subplot(313)
39
40 for p in plotfiles:
41 if plotfiles[p] is None:
42 continue
43
44 time, x, T, enuc, rho_he4 = get_Te_profile(plotfiles[p])
45
46 ax_T.plot(x, T, label=p)
47 ax_e.plot(x, enuc)
48 ax_he.plot(x, rho_he4)
49
50 ax_T.legend(frameon=False)
51
52 ax_T.set_ylabel(r"$T$ (K)")
53 ax_e.set_ylabel(r"$H_\mathrm{nuc}$ (erg/g/s)")
54 ax_he.set_ylabel(r"$\rho X({}^4\mathrm{He})$ (g/cm${}^3$)")
55 ax_he.set_xlabel("x (cm)")
56
57 ax_e.set_yscale("log")
58 ax_he.set_yscale("log")
59
60 ax_T.set_xlim(left=xmin, right=xmax)
61 ax_e.set_xlim(left=xmin, right=xmax)
62 ax_he.set_xlim(left=xmin, right=xmax)
63
64 f.tight_layout()
65
66 f.savefig("det.png")
67
68
69if __name__ == "__main__":

Callers 1

compare_plot.pyFile · 0.70

Calls 1

get_Te_profileFunction · 0.70

Tested by

no test coverage detected