Added new flucations plots + refactoring
This commit is contained in:
+614
-403
File diff suppressed because it is too large
Load Diff
+28
-38
@@ -50,7 +50,8 @@ parser.add_argument(
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-pd", "--plot_disk", help="plot specific disk radial analysis", action="store_true"
|
"-pd", "--plot_disk", help="plot specific disk radial analysis", action="store_true"
|
||||||
)
|
)
|
||||||
parser.add_argument("-m", "--maps", help="do generic maps", action="store_true")
|
parser.add_argument("-m", "--maps", help="compute generic maps", action="store_true")
|
||||||
|
parser.add_argument("-pm", "--plot_maps", help="plot generic maps", action="store_true")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-c", "--compare", help="compare different runs", action="store_true"
|
"-c", "--compare", help="compare different runs", action="store_true"
|
||||||
)
|
)
|
||||||
@@ -67,8 +68,15 @@ parser.add_argument(
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--fft", help="use quick and dirty fft rendering", action="store_true"
|
"--fft", help="use quick and dirty fft rendering", action="store_true"
|
||||||
)
|
)
|
||||||
parser.add_argument("--level", help="plot levels", action="store_true")
|
parser.add_argument(
|
||||||
parser.add_argument("--cpu", help="plot cpu", action="store_true")
|
"--images",
|
||||||
|
nargs="*",
|
||||||
|
default=["coldens", "rho", "speed", "Q", "T"],
|
||||||
|
choices=["coldens", "rho", "speed", "Q", "T", "level", "cpu"],
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--axes", nargs="*", default=["x", "y", "z"], choices=["x", "y", "z"]
|
||||||
|
)
|
||||||
parser.add_argument("--zoom", help="zoom", type=float, default=2.0)
|
parser.add_argument("--zoom", help="zoom", type=float, default=2.0)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-ms",
|
"-ms",
|
||||||
@@ -78,36 +86,6 @@ parser.add_argument(
|
|||||||
default=1024,
|
default=1024,
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
"-d", "--disk", help="do specific disk radial analysis", action="store_true"
|
|
||||||
)
|
|
||||||
parser.add_argument("-m", "--maps", help="do generic maps", action="store_true")
|
|
||||||
parser.add_argument(
|
|
||||||
"-c", "--compare", help="compare different runs", action="store_true"
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"-ev",
|
|
||||||
"--evolution",
|
|
||||||
help="plot evolution of quantities over time",
|
|
||||||
action="store_true",
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"--pdf", help="plot pdf of fluctuations of column density", action="store_true"
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
"--fft", help="use quick and dirty fft rendering", 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(
|
|
||||||
"-ms",
|
|
||||||
"--mapsize",
|
|
||||||
help="size of the maps created in he map mode (in pixel)",
|
|
||||||
type=int,
|
|
||||||
default=1024,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--nb_bin", help="Number of bins for azimuthal averages", type=int, default=50
|
"--nb_bin", help="Number of bins for azimuthal averages", type=int, default=50
|
||||||
@@ -200,22 +178,34 @@ for run in runs:
|
|||||||
maps_disk = None
|
maps_disk = None
|
||||||
if args.maps:
|
if args.maps:
|
||||||
print("[{}, {}] computing maps".format(run, i))
|
print("[{}, {}] computing maps".format(run, i))
|
||||||
maps_disk = dp.make_image_disk(
|
maps_disk = dp.compute_image_data(
|
||||||
path_in,
|
path_in,
|
||||||
i,
|
i,
|
||||||
rad=rad,
|
radius=rad,
|
||||||
path_out=path_out,
|
path_out=path_out,
|
||||||
tag=run,
|
tag=run,
|
||||||
map_size=args.mapsize,
|
map_size=args.mapsize,
|
||||||
force=args.force_redo,
|
force=args.force_redo,
|
||||||
level=args.level,
|
axes_los=args.axes,
|
||||||
cpu=args.cpu,
|
images=args.images,
|
||||||
pos_star=np.array([args.x, args.y, args.z]),
|
pos_star=np.array([args.x, args.y, args.z]),
|
||||||
fft=args.fft,
|
fft=args.fft,
|
||||||
|
)
|
||||||
|
print("[{}, {}] maps computed".format(run, i))
|
||||||
|
if args.plot_maps:
|
||||||
|
print("[{}, {}] plotting maps".format(run, i))
|
||||||
|
maps_disk = dp.plot_maps(
|
||||||
|
path_out,
|
||||||
|
i,
|
||||||
|
maps_disk=maps_disk,
|
||||||
|
axes_los=args.axes,
|
||||||
|
images=args.images,
|
||||||
|
tag=run,
|
||||||
|
force=args.force_redo,
|
||||||
interactive=args.interactive,
|
interactive=args.interactive,
|
||||||
put_title=(not args.beamer),
|
put_title=(not args.beamer),
|
||||||
)
|
)
|
||||||
print("[{}, {}] maps computed".format(run, i))
|
print("[{}, {}] maps plotted".format(run, i))
|
||||||
if args.disk:
|
if args.disk:
|
||||||
print("[{}, {}] computing disk props".format(run, i))
|
print("[{}, {}] computing disk props".format(run, i))
|
||||||
dp.disk_prop(
|
dp.disk_prop(
|
||||||
|
|||||||
Reference in New Issue
Block a user