Skip to content

Commit

Permalink
tools for paper figures update (titles, labels, etc)
Browse files Browse the repository at this point in the history
Signed-off-by: thanasis@Dobby <giannakopoulos.th@gmail.com>
  • Loading branch information
ThanasisGiannakopoulos committed Dec 19, 2024
1 parent dbeeffc commit 1b8fd1a
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 94 deletions.
18 changes: 9 additions & 9 deletions tools/bh_backreact_vs_no_backreact.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@
"\n",
")\n",
"\n",
"p1 = plot!([r[ri]], seriestype=\"vline\", label=\"r=$(r[ri])\", linewidth=1.5, color = clr_s, legendfontsize=ls, style=:dash)\n",
"p1 = plot!([r[ri]], seriestype=\"vline\", label=L\"r_2\"*\"=$(r[ri])\", linewidth=1.5, color = clr_s, legendfontsize=ls, style=:dash)\n",
"p1 = plot!([-1], seriestype=\"vline\", label=\"t=$(t)\", linewidth=1.5, color = \"white\", legendfontsize=ls, style=:dash)\n",
"\n",
"##########################################################\n",
Expand All @@ -393,7 +393,7 @@
"\n",
")\n",
"\n",
"p2 = plot!([r[ri]], seriestype=\"vline\", label=\"r=$(r[ri])\", linewidth=1.5, color = clr_s, legendfontsize=ls, style=:dash)\n",
"p2 = plot!([r[ri]], seriestype=\"vline\", label=L\"r_2\"*\"=$(r[ri])\", linewidth=1.5, color = clr_s, legendfontsize=ls, style=:dash)\n",
"p2 = plot!([-1], seriestype=\"vline\", label=\"t=$(t)\", linewidth=1.5, color = \"white\", legendfontsize=ls, style=:dash)\n",
"\n",
"##########################################################\n",
Expand All @@ -412,7 +412,7 @@
")\n",
"\n",
"plot!([AH], seriestype=\"vline\", label=\"AH\", linewidth=1.5, color = clr_ah, legendfontsize=ls)\n",
"p3 = plot!([r[ri]], seriestype=\"vline\", label=\"r=$(r[ri])\", linewidth=1.5, color = clr_s, legendfontsize=ls, style=:dash)\n",
"p3 = plot!([r[ri]], seriestype=\"vline\", label=L\"r_2\"*\"=$(r[ri])\", linewidth=1.5, color = clr_s, legendfontsize=ls, style=:dash)\n",
"p3 = plot!([-1], seriestype=\"vline\", label=\"t=$(t)\", linewidth=1.5, color = \"white\", legendfontsize=ls, style=:dash)\n",
"\n",
"##########################################################\n",
Expand All @@ -426,12 +426,12 @@
" xlim = (0,r[ri_max]),\n",
" #yticks=([0.02,0.04,0.06,0.08],[\"0.02\",\"0.04\",\"0.06\",\"0.08\"]),\n",
" xticks=([0,2.5,5,7.5,10],[\"0\",\"2.5\",\"5\",\"7.5\",\"10\"]),\n",
" xlabel=\"r\",\n",
" xlabel=L\"r_2\",\n",
"\n",
")\n",
"\n",
"plot!([AH], seriestype=\"vline\", label=\"AH\", linewidth=1.5, color = clr_ah, legendfontsize=ls)\n",
"p4 = plot!([r[ri]], seriestype=\"vline\", label=\"r=$(r[ri])\", linewidth=1.5, color = clr_s, legendfontsize=ls, style=:dash)\n",
"p4 = plot!([r[ri]], seriestype=\"vline\", label=L\"r_2\"*\"=$(r[ri])\", linewidth=1.5, color = clr_s, legendfontsize=ls, style=:dash)\n",
"p4 = plot!([-1], seriestype=\"vline\", label=\"t=$(t)\", linewidth=1.5, color = \"white\", legendfontsize=ls, style=:dash)\n",
"\n",
"##########################################################\n",
Expand All @@ -445,11 +445,11 @@
" xlim = (0,r[ri_max]),\n",
" #yticks=([0.02,0.04,0.06,0.08],[\"0.02\",\"0.04\",\"0.06\",\"0.08\"]),\n",
" xticks=([0,2.5,5,7.5,10],[\"\",\"2.5\",\"5\",\"7.5\",\"10\"]),\n",
" xlabel=\"r\",\n",
" xlabel=L\"r_2\",\n",
"\n",
")\n",
"plot!([AH], seriestype=\"vline\", label=\"AH\", linewidth=1.5, color = clr_ah, legendfontsize=ls)\n",
"p5 = plot!([r[ri]], seriestype=\"vline\", label=\"r=$(r[ri])\", linewidth=1.5, color = clr_s, legendfontsize=ls, style=:dash)\n",
"p5 = plot!([r[ri]], seriestype=\"vline\", label=L\"r_2\"*\"=$(r[ri])\", linewidth=1.5, color = clr_s, legendfontsize=ls, style=:dash)\n",
"p5 = plot!([-1], seriestype=\"vline\", label=\"t=$(t)\", linewidth=1.5, color = \"white\", legendfontsize=ls, style=:dash)\n",
"\n",
"##########################################################\n",
Expand All @@ -463,12 +463,12 @@
" xlim = (0,r[ri_max]),\n",
" #yticks=([0.02,0.04,0.06,0.08],[\"0.02\",\"0.04\",\"0.06\",\"0.08\"]),\n",
" xticks=([0,2.5,5,7.5,10],[\"\",\"2.5\",\"5\",\"7.5\",\"10\"]),\n",
" xlabel=\"r\",\n",
" xlabel=L\"r_2\",\n",
"\n",
")\n",
"\n",
"plot!([AH], seriestype=\"vline\", label=\"AH\", linewidth=1.5, color = clr_ah, legendfontsize=ls)\n",
"p6 = plot!([r[ri]], seriestype=\"vline\", label=\"r=$(r[ri])\", linewidth=1.5, color = clr_s, legendfontsize=ls, style=:dash)\n",
"p6 = plot!([r[ri]], seriestype=\"vline\", label=L\"r_2\"*\"=$(r[ri])\", linewidth=1.5, color = clr_s, legendfontsize=ls, style=:dash)\n",
"p6 = plot!([-1], seriestype=\"vline\", label=\"t=$(t)\", linewidth=1.5, color = \"white\", legendfontsize=ls, style=:dash)\n",
"\n",
"##########################################################\n",
Expand Down
8 changes: 4 additions & 4 deletions tools/classical_norm_convergence.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"source": [
"# give the directory where the data from all the runs are saved\n",
"dir = \"../examples/classical_runs/\"\n",
"par1 = \"a0.5_b5.0_c2.0_rmax30_tmax15_cfl0.125_sigma0.0_infalling_rmax_false_rand_false_overMp2_25.132741228718345_damp0\"\n",
"par2 = \"a0.05_b5.0_c2.0_rmax30_tmax15_cfl0.125_sigma0.0_infalling_rmax_false_rand_false_overMp2_25.132741228718345_damp0\"\n",
"par1 = \"a0.5_b5.0_c2.0_rmax30_tmax15_cfl0.125_sigma0.02_infalling_rmax_false_rand_false_overMp2_25.132741228718345_damp0\"\n",
"par2 = \"a0.05_b5.0_c2.0_rmax30_tmax15_cfl0.125_sigma0.02_infalling_rmax_false_rand_false_overMp2_25.132741228718345_damp0\"\n",
"your_dir1 = dir*par1\n",
"your_dir2 = dir*par2\n",
"\n",
Expand Down Expand Up @@ -255,7 +255,7 @@
" #yscale=:log10,\n",
")\n",
"\n",
"p1 = plot!([t_AH], seriestype=\"vline\", label=L\"t_{AH}\", linewidth=1, color = \"black\", title=\"strong data\",\n",
"p1 = plot!([t_AH], seriestype=\"vline\", label=L\"t_{AH}\", linewidth=1, color = \"black\", title=\"supercritical\",\n",
" xlim=(t_lists_strong[1,2],t_lists_strong[1,end]),\n",
" xticks=([0, 4, 8, 12], [\"0\",\"4\",\"8\",\"12\"]),\n",
" yticks=([0, 5*1e-5, 1e-4, 1.5*1e-4], [L\"0\",L\"10^{-5}\",L\"10^{-4}\",L\"1.5 \\cdot 10^{-4}\"])\n",
Expand All @@ -269,7 +269,7 @@
" legend=false, legendfontsize=10,\n",
" xlabel=\"time\", xtickfont=10, xguidefontsize=10,\n",
" #ylabel=\"norms\",\n",
" ytickfont=10, yguidefontsize=10, title=\"weak data\",\n",
" ytickfont=10, yguidefontsize=10, title=\"subcritical\",\n",
" xlim=(t_lists_weak[1,2],t_lists_weak[1,end]),\n",
" #yscale=:log10,\n",
" # xticks=([0,5*1e-5,1e-4,1.5*1e-4],[\"\",\"\",\"\",\"\"]), \n",
Expand Down
69 changes: 12 additions & 57 deletions tools/classical_norm_convergence_noisy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"source": [
"# give the directory where the data from all the runs are saved\n",
"dir = \"../examples/classical_runs/\"\n",
"par1 = \"a0.5_b5.0_c2.0_rmax30_tmax15_cfl0.125_sigma0.0_infalling_rmax_false_rand_true_1.0e-5_overMp2_25.132741228718345_damp0\"\n",
"par2 = \"a0.05_b5.0_c2.0_rmax30_tmax15_cfl0.125_sigma0.0_infalling_rmax_false_rand_true_1.0e-5_overMp2_25.132741228718345_damp0\"\n",
"par1 = \"a0.5_b5.0_c2.0_rmax30_tmax15_cfl0.125_sigma0.02_infalling_rmax_false_rand_true_0.001_overMp2_25.132741228718345_damp0\"\n",
"par2 = \"a0.05_b5.0_c2.0_rmax30_tmax15_cfl0.125_sigma0.02_infalling_rmax_false_rand_true_0.001_overMp2_25.132741228718345_damp0\"\n",
"your_dir1 = dir*par1\n",
"your_dir2 = dir*par2\n",
"\n",
Expand Down Expand Up @@ -252,7 +252,7 @@
"plot!(t_lists_strong[4,2:end], 4^3*l2_diffs_strong[4,2:end],\n",
" frame=true, linewidth=2.5, label=L\"4^3 \\, || \\mathbf{u}_{67}||\", style=:dashdot)\n",
"\n",
"p1 = plot!([t_AH], seriestype=\"vline\", label=L\"t_{AH}\", linewidth=1, color = \"black\", title=\"strong data\",\n",
"p1 = plot!([t_AH], seriestype=\"vline\", label=L\"t_{AH}\", linewidth=1, color = \"black\", title=\"supercritical\",\n",
" xlim=(t_lists_strong[1,2],t_lists_strong[1,end]))\n",
"\n",
"plot(t_lists_weak[1,2:end], l2_diffs_weak[1,2:end],\n",
Expand All @@ -268,7 +268,7 @@
" frame=true, linewidth=2.5, style=:dashdot, label=L\"4^3 \\, || \\mathbf{u}_{67}||\",\n",
" legend=:topleft, legendfontsize=10,\n",
" xlabel=\"time\", xtickfont=10, xguidefontsize=10,\n",
" ylabel=\"norms\", ytickfont=10, yguidefontsize=10, title=\"weak data\",\n",
" ylabel=\"norms\", ytickfont=10, yguidefontsize=10, title=\"subcritical\",\n",
" xlim=(t_lists_weak[1,2],t_lists_weak[1,end])\n",
" )\n",
"\n",
Expand All @@ -278,51 +278,6 @@
"savefig(plt, out_dir*\"/L2_noisy_strong_weak.pdf\")\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"plot(t_lists_strong[1,2:end], l2_diffs_strong[1,2:end]./l2_diffs_strong[2,2:end],\n",
" frame=true, linewidth=2.5, label=L\"||\\mathbf{u}_{34}||/||\\mathbf{u}_{45}||\", xaxis=nothing)\n",
"\n",
"plot!(t_lists_strong[1,2:end], l2_diffs_strong[2,2:end]./l2_diffs_strong[3,2:end],\n",
" frame=true, linewidth=2.5, style=:dash, label=L\" ||\\mathbf{u}_{45}||/||\\mathbf{u}_{56}||\",\n",
" legend=:top, legendfontsize=10,\n",
" ylabel=\"Q\", ytickfont=10, yguidefontsize=10)\n",
"\n",
"plot!(t_lists_strong[1,2:end], l2_diffs_strong[3,2:end]./l2_diffs_strong[4,2:end],\n",
" frame=true, linewidth=2.5, label=L\" ||\\mathbf{u}_{56}||/||\\mathbf{u}_{67}||\", style=:dashdot)\n",
"\n",
"plot!(t_lists_strong[1,2:end], 4*ones(length(t_lists_strong[1,2:end])),\n",
" color=:black, linewidth=1.0, label=nothing, style=:dot)\n",
"\n",
"p1 = plot!([t_AH], seriestype=\"vline\", label=L\"t_{AH}\", linewidth=1, color = \"black\", title=\"strong data\",\n",
" xlim=(t_lists_strong[1,2],t_lists_strong[1,end]))\n",
"\n",
"plot(t_lists_weak[1,2:end], (l2_diffs_weak[1,2:end]./l2_diffs_weak[2,2:end]),\n",
" frame=true, linewidth=2.5, label=L\"||\\mathbf{u}_{34}||/||\\mathbf{u}_{45}||\")\n",
"\n",
"plot!(t_lists_weak[1,2:end], (l2_diffs_weak[2,2:end]./l2_diffs_weak[3,2:end]),\n",
" frame=true, linewidth=2.5, label=L\"||\\mathbf{u}_{45}||/||\\mathbf{u}_{56}||\", style=:dash)\n",
"\n",
"plot!(t_lists_weak[1,2:end], (l2_diffs_weak[3,2:end]./l2_diffs_weak[4,2:end]),\n",
" frame=true, linewidth=2.5, label=L\"||\\mathbf{u}_{56}||/||\\mathbf{u}_{67}||\", style=:dashdot,\n",
" legend=:top, legendfontsize=10,\n",
" xlabel=\"time\", xtickfont=10, xguidefontsize=10,\n",
" ylabel=\"Q\", ytickfont=10, yguidefontsize=10, title=\"weak data\",\n",
" xlim=(t_lists_weak[1,2],t_lists_weak[1,end]))\n",
"\n",
"p2 = plot!(t_lists_strong[1,2:end], 4*ones(length(t_lists_strong[1,2:end])),\n",
" color=:black, linewidth=1.0, label=nothing, style=:dot)\n",
"\n",
"plt = plot(p1, p2, layout = grid(2,1), wsize = (800,500))\n",
"\n",
"\n",
"#savefig(plt, out_dir*\"/Q_noisy_strong_weak.pdf\")\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -342,9 +297,9 @@
" legend=:bottom,\n",
" legendfontsize=10,\n",
" ylabel=\"Q\", ytickfont=10, yguidefontsize=10,\n",
" #yticks = ([2,4,6,8],[\"2\",\"4\",\"6\",\"8\"])\n",
" ylim=(3.7,4.1),\n",
" yticks = ([3.8,3.9,4,4.1],[\"3.8\",\"3.9\",\"4\",\"4.1\"]),\n",
" yticks = ([2,4,6,8],[\"2\",\"4\",\"6\",\"8\"])\n",
" #ylim=(3.7,4.1),\n",
" #yticks = ([3.8,3.9,4,4.1],[\"3.8\",\"3.9\",\"4\",\"4.1\"]),\n",
")\n",
"\n",
"plot!(t_lists_strong[1,2:end], l2_diffs_strong[3,2:end]./l2_diffs_strong[4,2:end],\n",
Expand All @@ -353,7 +308,7 @@
"plot!(t_lists_strong[1,2:end], 4*ones(length(t_lists_strong[1,2:end])),\n",
" color=:black, linewidth=1.0, label=nothing, style=:dot)\n",
"\n",
"p1 = plot!([t_AH], seriestype=\"vline\", label=L\"t_{AH}\", linewidth=1, color = \"black\", title=\"strong data\",\n",
"p1 = plot!([t_AH], seriestype=\"vline\", label=L\"t_{AH}\", linewidth=1, color = \"black\", title=\"supercritical\",\n",
" xlim=(t_lists_strong[1,2],t_lists_strong[1,end])\n",
")\n",
"\n",
Expand All @@ -370,10 +325,10 @@
" xlabel=\"time\",xticks = ([2,6,10,14],[\"2\",\"6\",\"10\",\"14\"]),\n",
" xtickfont=10, xguidefontsize=10,\n",
" ylabel=\"\", ytickfont=10, yguidefontsize=10, \n",
" #yticks = ([2,4,6,8],[\"\",\"\",\"\",\"\"]),\n",
" ylim=(3.7,4.1),\n",
" yticks = ([3.8,3.9,4,4.1],[\"\",\"\",\"\",\"\"]),\n",
" title=\"weak data\",\n",
" yticks = ([2,4,6,8],[\"\",\"\",\"\",\"\"]),\n",
" #ylim=(3.7,4.1),\n",
" #yticks = ([3.8,3.9,4,4.1],[\"\",\"\",\"\",\"\"]),\n",
" title=\"subcritical\",\n",
" xlim=(t_lists_weak[1,2],t_lists_weak[1,end]))\n",
"\n",
"p2 = plot!(t_lists_strong[1,2:end], 4*ones(length(t_lists_strong[1,2:end])),\n",
Expand Down
Loading

0 comments on commit 1b8fd1a

Please sign in to comment.