anais modif
This commit is contained in:
+41
-4
@@ -20,6 +20,11 @@ parser.add_argument("-s", "--step", help="step between two output", type=int, de
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-d", "--disk", help="do specific disk radial analysis", action="store_true"
|
"-d", "--disk", help="do specific disk radial analysis", action="store_true"
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--nb_bin", help="Number of bins for azimuthal averages", type=int, default=50
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
parser.add_argument("-m", "--maps", help="do generic maps", action="store_true")
|
parser.add_argument("-m", "--maps", help="do generic maps", action="store_true")
|
||||||
|
|
||||||
parser.add_argument("-p", "--project", help="specify project name", default="disk")
|
parser.add_argument("-p", "--project", help="specify project name", default="disk")
|
||||||
@@ -47,7 +52,9 @@ parser.add_argument(
|
|||||||
help="number of allowed failures when waiting",
|
help="number of allowed failures when waiting",
|
||||||
default=30,
|
default=30,
|
||||||
)
|
)
|
||||||
parser.add_argument("--cpuamr", help="plot levels and cpu", action="store_true")
|
parser.add_argument("--level", help="plot levels", action="store_true")
|
||||||
|
parser.add_argument("--cpu", help="plot cpu", action="store_true")
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-x", help="x position of the central point", type=float, default=1.0
|
"-x", help="x position of the central point", type=float, default=1.0
|
||||||
)
|
)
|
||||||
@@ -57,6 +64,21 @@ parser.add_argument(
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-z", help="z position of the central point", type=float, default=1.0
|
"-z", help="z position of the central point", type=float, default=1.0
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--fft", help="use quick and dirty fft rendering", action="store_true"
|
||||||
|
)
|
||||||
|
parser.add_argument("-i", "--interactive", help="Interactive mode", action="store_true")
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"--colormap", help="Colormap used", choices=dp.P.colormaps(), default="plasma"
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--format",
|
||||||
|
help="Format of the output",
|
||||||
|
choices=["png", "jpeg", "pdf", "ps"],
|
||||||
|
default="jpeg",
|
||||||
|
)
|
||||||
|
parser.add_argument("--dpi", help="Resolution of the output", type=int, default=400)
|
||||||
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
@@ -71,6 +93,12 @@ first = args.begin
|
|||||||
last = args.end
|
last = args.end
|
||||||
step = args.step
|
step = args.step
|
||||||
|
|
||||||
|
# extension for out files
|
||||||
|
dp.out_ext = "." + args.format
|
||||||
|
# Plot properties
|
||||||
|
dp.P.rcParams["image.cmap"] = args.colormap
|
||||||
|
dp.P.rcParams["savefig.dpi"] = args.dpi
|
||||||
|
|
||||||
|
|
||||||
for run in runs:
|
for run in runs:
|
||||||
path_suffix = user + "/" + folder + "/" + project + "/" + run
|
path_suffix = user + "/" + folder + "/" + project + "/" + run
|
||||||
@@ -96,8 +124,11 @@ for run in runs:
|
|||||||
tag=run,
|
tag=run,
|
||||||
map_size=1024,
|
map_size=1024,
|
||||||
force=args.force_redo,
|
force=args.force_redo,
|
||||||
cpuamr=args.cpuamr,
|
level=args.level,
|
||||||
|
cpu=args.cpu,
|
||||||
pos_star=np.array([args.x, args.y, args.z]),
|
pos_star=np.array([args.x, args.y, args.z]),
|
||||||
|
fft=args.fft,
|
||||||
|
interactive=args.interactive,
|
||||||
)
|
)
|
||||||
if args.disk:
|
if args.disk:
|
||||||
dp.disk_prop(
|
dp.disk_prop(
|
||||||
@@ -105,11 +136,17 @@ for run in runs:
|
|||||||
i,
|
i,
|
||||||
path_out=path_out,
|
path_out=path_out,
|
||||||
rad_ext=1,
|
rad_ext=1,
|
||||||
nb_bin=50,
|
nb_bin=args.nb_bin,
|
||||||
force=args.force_redo,
|
force=args.force_redo,
|
||||||
pos_star=np.array([args.x, args.y, args.z]),
|
pos_star=np.array([args.x, args.y, args.z]),
|
||||||
)
|
)
|
||||||
dp.plot_disk_prop(path_out, i, tag=run, force=args.force_redo)
|
dp.plot_disk_prop(
|
||||||
|
path_out,
|
||||||
|
i,
|
||||||
|
tag=run,
|
||||||
|
force=args.force_redo,
|
||||||
|
interactive=args.interactive,
|
||||||
|
)
|
||||||
success = True
|
success = True
|
||||||
except ValueError:
|
except ValueError:
|
||||||
if args.watch and failures < args.allowed_failures:
|
if args.watch and failures < args.allowed_failures:
|
||||||
|
|||||||
Reference in New Issue
Block a user