Add map for Q

This commit is contained in:
Noe Brucy
2019-04-16 16:31:10 +02:00
parent 9f53414ab1
commit 48165cc006
2 changed files with 101 additions and 52 deletions
+24 -11
View File
@@ -14,18 +14,21 @@ storage_out = "/dsm/anais/storageA/"
parser = argparse.ArgumentParser()
parser.add_argument("runs", help="name of runs", nargs="*", default=["015_iso"])
parser.add_argument(
"-f", "--first_output", help="id of first output", type=int, default=1
)
parser.add_argument(
"-l", "--last_output", help="id of last output", type=int, default=100
)
parser.add_argument("-b", "--begin", help="id of first output", type=int, default=1)
parser.add_argument("-e", "--end", help="id of last output", type=int, default=100)
parser.add_argument("-s", "--step", help="step between two output", type=int, default=1)
parser.add_argument(
"-d", "--disk", help="do specific disk radial analysis", action="store_true"
)
parser.add_argument("-p", "--project", help="specify project name", default="disk")
parser.add_argument(
"-fr",
"--force_redo",
help="redo plots even if the files already exist",
action="store_true",
)
parser.add_argument(
"-w", "--watch", help="wait and watch for missing outputs", action="store_true"
)
@@ -52,8 +55,8 @@ folder = "simus"
project = args.project
runs = args.runs
first = args.first_output
last = args.last_output
first = args.begin
last = args.end
step = args.step
@@ -74,13 +77,23 @@ for run in runs:
while not success:
try:
dp.make_image_disk(
path_in, i, path_out=path_out, tag=run, map_size=1024
path_in,
i,
path_out=path_out,
tag=run,
map_size=1024,
force=args.force_redo,
)
if args.disk:
dp.disk_prop(
path_in, i, path_out=path_out, rad_ext=1, nb_bin=50, force=False
path_in,
i,
path_out=path_out,
rad_ext=1,
nb_bin=50,
force=args.force_redo,
)
dp.plot_disk_prop(path_out, i, tag=run)
dp.plot_disk_prop(path_out, i, tag=run, force=args.force_redo)
success = True
except ValueError:
if args.watch and failures < args.allowed_failures: