[pipeline] some rework of the pipeline
This commit is contained in:
+11
-21
@@ -3,15 +3,13 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
import time
|
|
||||||
from functools import reduce
|
|
||||||
from shutil import copy
|
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from plotter import *
|
from plotter import Plotter, plt
|
||||||
from postprocessor import *
|
from postprocessor import PostProcessor, get_time
|
||||||
from pp_params import *
|
from comparator import Comparator
|
||||||
|
from pp_params import default_params, load_params
|
||||||
|
|
||||||
fake_pp = PostProcessor()
|
fake_pp = PostProcessor()
|
||||||
|
|
||||||
@@ -173,7 +171,7 @@ pp_args.add_argument(
|
|||||||
plot_args = parser.add_argument_group("plot", "Plot configuration")
|
plot_args = parser.add_argument_group("plot", "Plot configuration")
|
||||||
|
|
||||||
plot_args.add_argument(
|
plot_args.add_argument(
|
||||||
"--colormap", help="Colormap used", choices=P.colormaps(), default="plasma"
|
"--colormap", help="Colormap used", choices=plt.colormaps(), default="plasma"
|
||||||
)
|
)
|
||||||
plot_args.add_argument(
|
plot_args.add_argument(
|
||||||
"--format",
|
"--format",
|
||||||
@@ -213,20 +211,17 @@ pp_params.disk.nb_bin = args.nb_bin
|
|||||||
pp_params.pdf.nb_bin = args.pdf_nb_bin
|
pp_params.pdf.nb_bin = args.pdf_nb_bin
|
||||||
|
|
||||||
# extension for out files
|
# extension for out files
|
||||||
P.style.use("seaborn-deep")
|
plt.style.use("seaborn-deep")
|
||||||
if args.format == "pdf":
|
if args.format == "pdf":
|
||||||
P.style.use("~/.config/matplotlib/pdf.mplstyle")
|
plt.style.use("~/.config/matplotlib/pdf.mplstyle")
|
||||||
|
|
||||||
if args.beamer:
|
if args.beamer:
|
||||||
P.rcParams["font.family"] = "sans-serif"
|
plt.rcParams["font.family"] = "sans-serif"
|
||||||
P.rcParams["figure.figsize"] = (7, 4.5)
|
plt.rcParams["figure.figsize"] = (7, 4.5)
|
||||||
|
|
||||||
# Plot properties
|
# Plot properties
|
||||||
P.rcParams["image.cmap"] = args.colormap
|
plt.rcParams["image.cmap"] = args.colormap
|
||||||
P.rcParams["savefig.dpi"] = args.dpi
|
plt.rcParams["savefig.dpi"] = args.dpi
|
||||||
P.rcParams["lines.linewidth"] = 2
|
|
||||||
P.rcParams["lines.markersize"] = 10
|
|
||||||
P.rcParams["errorbar.capsize"] = 4
|
|
||||||
|
|
||||||
# List of id that were successfully computed
|
# List of id that were successfully computed
|
||||||
nums_success = {}
|
nums_success = {}
|
||||||
@@ -244,11 +239,6 @@ for run in runs:
|
|||||||
|
|
||||||
if not os.path.exists(path_out):
|
if not os.path.exists(path_out):
|
||||||
os.makedirs(path_out)
|
os.makedirs(path_out)
|
||||||
try:
|
|
||||||
copy(path_in + "/disk.nml", path_out)
|
|
||||||
copy(path_in + "/output_00001/compilation.txt", path_out)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
nums_success[run] = []
|
nums_success[run] = []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user