Skip to content

Commit

Permalink
update network pynucastro scripts to new RateCollection plot interface
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Nov 11, 2023
1 parent 05a8bc2 commit 9aaf399
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 13 deletions.
11 changes: 7 additions & 4 deletions networks/CNO_extras/CNO_extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
comp = pyna.Composition(rc.get_nuclei())
comp.set_solar_like()

rc.plot(outfile="cno_extras.png", rho=1.e6, T=1.e8, comp=comp, Z_range=[1,13], N_range=[1,13])
rc.plot(outfile="cno_extras_hide_alpha.png", rho=1.e6, T=1.e8, comp=comp, Z_range=[1,13], N_range=[1,13],
rotated=True, highlight_filter_function=lambda r: r.Q > 0,
curved_edges=True, hide_xalpha=True)
rho = 1.e6
T = 1.e8

rc.plot(rho, T, comp, outfile="cno_extras.png", Z_range=[1,13], N_range=[1,13])
rc.plot(rho, T, comp, outfile="cno_extras_hide_alpha.png", Z_range=[1,13], N_range=[1,13],
rotated=True, highlight_filter_function=lambda r: r.Q > 0,
curved_edges=True, hide_xalpha=True)
2 changes: 1 addition & 1 deletion networks/He-C-Fe-group/He-C-Fe-group.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
comp.set_all(1.0)
comp.normalize()

fig = net.plot(rho=rho, T=T, comp=comp,
fig = net.plot(rho, T, comp,
rotated=True, curved_edges=True, hide_xalpha=True,
size=(1800, 900),
node_size=500, node_shape="s", node_font_size=10)
Expand Down
5 changes: 4 additions & 1 deletion networks/ase/ase.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def doit():
comp.set_nuc("he4", 0.95)
comp.normalize()

net.plot(outfile="ase.png", rho=1.e7, T=6.e9, comp=comp,
rho = 1.e7
T = 6.e9

net.plot(rho, T, comp, outfile="ase.png",
rotated=True, hide_xalpha=True, curved_edges=True,
size=(1500, 450),
node_size=500, node_font_size=11, node_color="#337dff", node_shape="s",
Expand Down
5 changes: 4 additions & 1 deletion networks/nova/network_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@
comp = pyna.Composition(rc.get_nuclei())
comp.set_solar_like()

rc.plot(outfile="nova.png", rho=1.e4, T=9.e7, comp=comp)
rho = 1.e4
T = 9.e7

rc.plot(rho, T, comp, outfile="nova.png")
4 changes: 3 additions & 1 deletion networks/nova/nova.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@
comp = Composition(rc.get_nuclei())
comp.set_solar_like()

rc.plot(outfile="nova.png", rho=1.e4, T=9.e7, comp=comp)
rho = 1.e4
T = 9.e7

rc.plot(rho, T, comp, outfile="nova.png")
4 changes: 3 additions & 1 deletion networks/nova2/nova2.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@
comp = pyna.Composition(rc.get_nuclei())
comp.set_solar_like()

rc.plot(outfile="nova.png", rho=1.e4, T=9.e7, comp=comp)
rho = 1.e4
T = 9.e7

rc.plot(rho, T, comp, outfile="nova.png")
5 changes: 4 additions & 1 deletion networks/subch_approx/subch_approx.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def doit():
comp.set_nuc("he4", 0.95)
comp.normalize()

net.plot(outfile="subch_approx.png", rho=1.e6, T=1.e9, comp=comp,
rho = 1.e6
T = 1.e9

net.plot(rho, T, comp, outfile="subch_approx.png",
rotated=True, hide_xalpha=True, curved_edges=True,
size=(1500, 450),
node_size=500, node_font_size=11, node_color="#337dff", node_shape="s",
Expand Down
5 changes: 4 additions & 1 deletion networks/subch_full/network_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
comp.set_nuc("he4", 0.95)
comp.normalize()

rc.plot(outfile="subch2.pdf", rho=1.e6, T=1.e9, comp=comp, hide_xalpha=True,
rho = 1.e6
T = 1.e9

rc.plot(rho, T, comp, outfile="subch2.pdf", hide_xalpha=True,
size=(1500, 650), node_size=500, node_font_size=11, node_color="#337dff", node_shape="s",
Z_range=(1,29), rotated=True, curved_edges=True)
5 changes: 4 additions & 1 deletion networks/subch_full/subch_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ def doit():
comp.set_nuc("he4", 0.95)
comp.normalize()

rc.plot(outfile="subch_full.png", rho=1.e6, T=1.e9, comp=comp,
rho = 1.e6
T = 1.e9

rc.plot(rho, T, comp, outfile="subch_full.png",
rotated=True, hide_xalpha=True, curved_edges=True,
size=(1500, 450),
node_size=500, node_font_size=11, node_color="#337dff", node_shape="s",
Expand Down
5 changes: 4 additions & 1 deletion networks/subch_simple/subch_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ def doit():
comp.set_nuc("he4", 0.95)
comp.normalize()

net.plot(outfile="subch_simple.png", rho=1.e6, T=1.e9, comp=comp,
rho = 1.e6
T = 1.e9

net.plot(rho, T, comp, outfile="subch_simple.png",
rotated=True, hide_xalpha=True, curved_edges=True,
size=(1500, 450),
node_size=500, node_font_size=11, node_color="#337dff", node_shape="s",
Expand Down

0 comments on commit 9aaf399

Please sign in to comment.