forked from graphnet-team/graphnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontour_plotting.py
More file actions
64 lines (54 loc) · 2.23 KB
/
Copy pathcontour_plotting.py
File metadata and controls
64 lines (54 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
"""Example of plotting contours from PISA fit.
Here we would like to plot two contours in one figure; one for our GNN and one
for RETRO. We build a dictionary for each contour. Each dictionary much contain
"path" and "model". "path" is the path to the .csv file containing the fit
result. "model" is the name of the model in the .csv file - some fits have more
than 1 model! The plotting script returns the figure object - remember to save
it yourself!
"""
from graphnet.pisa.plotting import plot_2D_contour, plot_1D_contour
def example_plot_2d_contour() -> None:
"""Plot 2D contour from PISA fit."""
contour_data_2D = [
{
"path": "/mnt/scratch/rasmus_orsoe/oscillation/30x30_std_config_final_num_bins_15_lbe_0.4_hbe_0.8/merged_results.csv",
"model": "dynedge",
"label": "dynedge",
"color": "tab:blue",
},
{
"path": "/mnt/scratch/rasmus_orsoe/oscillation/30x30_oscNext_config_final_num_bins_15_lbe_0.5_hbe_0.85/merged_results.csv",
"model": "retro",
"label": "retro",
"color": "tab:orange",
},
]
figure = plot_2D_contour(contour_data_2D, width=6.3, height=2.3 * 2)
figure.savefig(
"/home/iwsatlas1/oersoe/phd/oscillations/plots/2d_contour_test.pdf"
)
def example_plot_1d_contour() -> None:
"""Plot 1D contour from PISA fit."""
contour_data_1D = [
{
"path": "/home/iwsatlas1/oersoe/phd/oscillations/sensitivities/100x_bfgs_pid_bin_05_8by8_bins_fix_all_True_philipp_idea/merged_results.csv",
"color": "tab:orange",
"model": "retro",
"label": "retro - vanilla bin",
"ls": "--",
},
{
"path": "/home/iwsatlas1/oersoe/phd/oscillations/sensitivities/100x_bfgs_pid_bin_05_8by8_bins_fix_all_True_philipp_idea/merged_results.csv",
"color": "tab:blue",
"model": "dynedge",
"label": "dynedge - vanilla bin",
"ls": "--",
},
]
figure = plot_1D_contour(contour_data_1D)
figure.savefig(
"/home/iwsatlas1/oersoe/phd/oscillations/plots/1d_contour_test.pdf"
)
if __name__ == "__main__":
example_plot_2d_contour()
example_plot_1d_contour()