diff --git a/Exec/science/massive_star/analysis/massive_star_multi.py b/Exec/science/massive_star/analysis/massive_star_multi.py index 4722093e33..0bf35f1684 100755 --- a/Exec/science/massive_star/analysis/massive_star_multi.py +++ b/Exec/science/massive_star/analysis/massive_star_multi.py @@ -13,7 +13,8 @@ matplotlib.use('agg') - +ANNOTATE_O16 = False +ANNOTATE_NSE = True def make_plot(plotfile, prefix="plot", width_frac=0.1, @@ -25,8 +26,8 @@ def make_plot(plotfile, prefix="plot", width_frac=0.1, t_drive = 0.0 if "[*] castro.drive_initial_convection_tmax" in ds.parameters: t_drive = ds.parameters["[*] castro.drive_initial_convection_tmax"] - elif "castro.drive_initial_convection_tmax" in ds.parameters: - t_drive = ds.parameters["castro.drive_initial_convection_tmax"] + elif "[*] castro.drive_initial_convection_tmax" in ds.parameters: + t_drive = ds.parameters["[*] castro.drive_initial_convection_tmax"] print(t_drive) xmin = ds.domain_left_edge[0] @@ -75,19 +76,26 @@ def make_plot(plotfile, prefix="plot", width_frac=0.1, sp.set_cmap(f, "magma") sp.set_zlim(f, 1.e-2, 5) - if f == "enuc": - # now do a contour of NSE - if ("boxlib", "in_nse") in ds.derived_field_list: - sp.annotate_contour("in_nse", ncont=1, clim=(0.5, 0.5), take_log=False, - plot_args={"colors": "k", "linewidths": 2}) + + # now do a contour of O + if ANNOTATE_O16: + sp.annotate_contour(("boxlib", "X(O16)"), ncont=1, clim=(0.5, 0.5), factor=32, take_log=False, + plot_args={"colors": "0.5", "linewidths": 2}) + + # now do a contour of NSE + if ANNOTATE_NSE: + if ("boxlib", "in_nse") in ds.derived_field_list: + sp.annotate_contour("in_nse", levels=1, clim=(0.5, 0.5), take_log=False, + plot_args={"colors": "k", "linewidths": 2}) + sp.set_axes_unit("cm") fig = sp.export_to_mpl_figure((layout[0], layout[1]), axes_pad=(1.0, 0.4), cbar_location=cbar_location, cbar_pad="2%") - fig.subplots_adjust(left=0.05, right=0.95, bottom=0.025, top=0.975) - fig.text(0.02, 0.02, f"$t - \\tau_\\mathrm{{drive}}$ = {float(ds.current_time) - t_drive:6.1f} s", + fig.subplots_adjust(left=0.05, right=0.95, bottom=0.035, top=0.975) + fig.text(0.02, 0.01, f"$t - \\tau_\\mathrm{{drive}}$ = {float(ds.current_time) - t_drive:6.1f} s", transform=fig.transFigure) fig.set_size_inches(size) fig.tight_layout() @@ -95,7 +103,7 @@ def make_plot(plotfile, prefix="plot", width_frac=0.1, if layout[0] >= layout[1]: extra = "_vertical" - fig.savefig(f"{prefix}_{os.path.basename(plotfile)}_w{width_frac:04.2f}{extra}.pdf", pad_inches=0.1, bbox_inches="tight") + fig.savefig(f"{prefix}_{os.path.basename(plotfile)}_w{width_frac:04.2f}{extra}.pdf", pad_inches=0.1) #, bbox_inches="tight") if __name__ == "__main__": @@ -112,7 +120,7 @@ def make_plot(plotfile, prefix="plot", width_frac=0.1, plotfile = args.plotfile[0] if args.vertical: - size = (7.5, 11.0) + size = (7.0, 10.0) layout = (2, 2) else: size = (19.2, 8.5) diff --git a/Exec/science/massive_star/analysis/massive_star_sequence.py b/Exec/science/massive_star/analysis/massive_star_sequence.py index 96b4218085..3d708158ec 100755 --- a/Exec/science/massive_star/analysis/massive_star_sequence.py +++ b/Exec/science/massive_star/analysis/massive_star_sequence.py @@ -15,7 +15,7 @@ matplotlib.use('agg') -times = [50, 100, 150, 200, 250] +times = [50, 100, 150, 200, 250, 300] def find_files(plist): @@ -60,8 +60,8 @@ def make_plot(field, pfiles, *, t_drive = 0.0 if "[*] castro.drive_initial_convection_tmax" in ds.parameters: t_drive = ds.parameters["[*] castro.drive_initial_convection_tmax"] - elif "castro.drive_initial_convection_tmax" in ds.parameters: - t_drive = ds.parameters["castro.drive_initial_convection_tmax"] + elif "[*] castro.drive_initial_convection_tmax" in ds.parameters: + t_drive = ds.parameters["[*] castro.drive_initial_convection_tmax"] print(t_drive) xmin = ds.domain_left_edge[0] @@ -127,11 +127,10 @@ def make_plot(field, pfiles, *, sp.set_cmap(f, "magma") sp.set_zlim(f, 1.e-2, 5) - if f == "enuc": - # now do a contour of NSE - if ("boxlib", "in_nse") in ds.derived_field_list: - sp.annotate_contour("in_nse", levels=1, clim=(0.5, 0.5), take_log=False, - plot_args={"colors": "k", "linewidths": 2}) + # now do a contour of NSE + if ("boxlib", "in_nse") in ds.derived_field_list: + sp.annotate_contour("in_nse", levels=1, clim=(0.5, 0.5), take_log=False, + plot_args={"colors": "k", "linewidths": 2}) sp.set_axes_unit("cm") @@ -168,7 +167,7 @@ def make_plot(field, pfiles, *, args = p.parse_args() if args.vertical: - size = (7.5, 8.5) + size = (7.0, 8.0) else: size = (19.2, 8.5)