Skip to content

Commit 4efe0fd

Browse files
authored
Merge pull request #15571 from rmcdermo/master
Python: go live with dataplot and scatplot
2 parents bbd2472 + 072adae commit 4efe0fd

File tree

2 files changed

+59
-59
lines changed

2 files changed

+59
-59
lines changed

Utilities/Python/FDS_validation_script.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -38,36 +38,36 @@
3838
Stats_Output = 'Validation'
3939
Scatterplot_Dir = '../../Manuals/FDS_Validation_Guide/SCRIPT_FIGURES/ScatterPlots/'
4040

41-
# # Run dataplot and scatplot scripts
42-
43-
# saved_data, drange = fdsplotlib.dataplot(config_filename=Dataplot_Inputs_File,
44-
# expdir=EXP_Dir,
45-
# cmpdir=OUT_Dir,
46-
# pltdir=Manuals_Dir,
47-
# close_figs=True,
48-
# verbose=True,
49-
# plot_range=["all"],
50-
# ) # see notes below on plot_range
51-
52-
# # ----- write saved_data, drange to disk -----
53-
# import pickle
54-
55-
# # Save
56-
# with open("saved_data_validation.pkl", "wb") as f:
57-
# pickle.dump((saved_data, drange), f)
58-
59-
# # Later...
60-
# with open("saved_data_validation.pkl", "rb") as f:
61-
# saved_data, drange = pickle.load(f)
62-
# #---------------------------------------------
63-
64-
# fdsplotlib.scatplot(saved_data,drange,
65-
# Manuals_Dir=Manuals_Dir,
66-
# Scatterplot_Inputs_File=Scatterplot_Inputs_File,
67-
# Stats_Output=Stats_Output,
68-
# Scatterplot_Dir=Scatterplot_Dir,
69-
# verbose=True,
70-
# )
41+
# Run dataplot and scatplot scripts
42+
43+
saved_data, drange = fdsplotlib.dataplot(config_filename=Dataplot_Inputs_File,
44+
expdir=EXP_Dir,
45+
cmpdir=OUT_Dir,
46+
pltdir=Manuals_Dir,
47+
close_figs=True,
48+
verbose=True,
49+
plot_range=["all"],
50+
) # see notes below on plot_range
51+
52+
# ----- write saved_data, drange to disk -----
53+
import pickle
54+
55+
# Save
56+
with open("saved_data_validation.pkl", "wb") as f:
57+
pickle.dump((saved_data, drange), f)
58+
59+
# Later...
60+
with open("saved_data_validation.pkl", "rb") as f:
61+
saved_data, drange = pickle.load(f)
62+
#---------------------------------------------
63+
64+
fdsplotlib.scatplot(saved_data,drange,
65+
Manuals_Dir=Manuals_Dir,
66+
Scatterplot_Inputs_File=Scatterplot_Inputs_File,
67+
Stats_Output=Stats_Output,
68+
Scatterplot_Dir=Scatterplot_Dir,
69+
verbose=True,
70+
)
7171

7272
# Create table of git statistics for FDS Validation Guide
7373

Utilities/Python/FDS_verification_script.py

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -38,35 +38,35 @@
3838
Stats_Output = 'Verification'
3939
Scatterplot_Dir = '../../Manuals/FDS_Verification_Guide/SCRIPT_FIGURES/ScatterPlots/'
4040

41-
# # Run dataplot and scatplot scripts
42-
43-
# saved_data, drange = fdsplotlib.dataplot(config_filename=Dataplot_Inputs_File,
44-
# expdir=Working_Dir,
45-
# cmpdir=Working_Dir,
46-
# pltdir=Manuals_Dir,
47-
# close_figs=True,
48-
# verbose=True,
49-
# plot_range=["all"]) # plot_range[start, end], optionally instead use plot_list['Dataname']
50-
51-
# # ----- write saved_data, drange to disk -----
52-
# import pickle
53-
54-
# # Save
55-
# with open("saved_data_verification.pkl", "wb") as f:
56-
# pickle.dump((saved_data, drange), f)
57-
58-
# # Later...
59-
# with open("saved_data_verification.pkl", "rb") as f:
60-
# saved_data, drange = pickle.load(f)
61-
# #---------------------------------------------
62-
63-
# fdsplotlib.scatplot(saved_data,drange,
64-
# Manuals_Dir=Manuals_Dir,
65-
# Scatterplot_Inputs_File=Scatterplot_Inputs_File,
66-
# Stats_Output=Stats_Output,
67-
# Scatterplot_Dir=Scatterplot_Dir,
68-
# verbose=True,
69-
# )
41+
# Run dataplot and scatplot scripts
42+
43+
saved_data, drange = fdsplotlib.dataplot(config_filename=Dataplot_Inputs_File,
44+
expdir=Working_Dir,
45+
cmpdir=Working_Dir,
46+
pltdir=Manuals_Dir,
47+
close_figs=True,
48+
verbose=True,
49+
plot_range=["all"]) # plot_range[start, end], optionally instead use plot_list['Dataname']
50+
51+
# ----- write saved_data, drange to disk -----
52+
import pickle
53+
54+
# Save
55+
with open("saved_data_verification.pkl", "wb") as f:
56+
pickle.dump((saved_data, drange), f)
57+
58+
# Later...
59+
with open("saved_data_verification.pkl", "rb") as f:
60+
saved_data, drange = pickle.load(f)
61+
#---------------------------------------------
62+
63+
fdsplotlib.scatplot(saved_data,drange,
64+
Manuals_Dir=Manuals_Dir,
65+
Scatterplot_Inputs_File=Scatterplot_Inputs_File,
66+
Stats_Output=Stats_Output,
67+
Scatterplot_Dir=Scatterplot_Dir,
68+
verbose=True,
69+
)
7070

7171
# Special cases
7272

0 commit comments

Comments
 (0)