mirror of
https://github.com/Richard-Sti/csiborgtools_public.git
synced 2025-07-12 00:53:02 +00:00
Add Manticore
This commit is contained in:
parent
89239939d3
commit
0436ba89c3
1 changed files with 5 additions and 3 deletions
|
@ -54,6 +54,8 @@ def get_reader(simname, paths, nsim):
|
||||||
kind = simname.split("_")[-1]
|
kind = simname.split("_")[-1]
|
||||||
reader = csiborgtools.read.CSiBORG2Snapshot(nsim, 99, kind, paths,
|
reader = csiborgtools.read.CSiBORG2Snapshot(nsim, 99, kind, paths,
|
||||||
flip_xz=True)
|
flip_xz=True)
|
||||||
|
elif simname == "manticore_2MPP_N128_DES_V1":
|
||||||
|
reader = csiborgtools.read.CSiBORG2XSnapshot(nsim)
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Unknown simname: `{simname}`.")
|
raise ValueError(f"Unknown simname: `{simname}`.")
|
||||||
|
|
||||||
|
@ -72,7 +74,7 @@ def get_particles(reader, boxsize, get_velocity=True, verbose=True):
|
||||||
if get_velocity:
|
if get_velocity:
|
||||||
fprint("reading velocities.", verbose)
|
fprint("reading velocities.", verbose)
|
||||||
vel = reader.velocities().astype(dtype)
|
vel = reader.velocities().astype(dtype)
|
||||||
vrad = np.sum(pos, vel, axis=1) / dist
|
vrad = np.sum(pos * vel, axis=1) / dist
|
||||||
|
|
||||||
del pos
|
del pos
|
||||||
collect()
|
collect()
|
||||||
|
@ -282,14 +284,14 @@ if __name__ == "__main__":
|
||||||
parser.add_argument("--simname", type=str, help="Simulation name.",
|
parser.add_argument("--simname", type=str, help="Simulation name.",
|
||||||
choices=["csiborg1", "csiborg2_main", "csiborg2_varysmall", "csiborg2_random", # noqa
|
choices=["csiborg1", "csiborg2_main", "csiborg2_varysmall", "csiborg2_random", # noqa
|
||||||
"borg1", "borg2", "borg2_all", "csiborg2X", "Carrick2015", # noqa
|
"borg1", "borg2", "borg2_all", "csiborg2X", "Carrick2015", # noqa
|
||||||
"Lilow2024", "CLONES", "CF4"]) # noqa
|
"Lilow2024", "CLONES", "CF4", "manticore_2MPP_N128_DES_V1"]) # noqa
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
folder = "/mnt/extraspace/rstiskalek/csiborg_postprocessing/field_shells"
|
folder = "/mnt/extraspace/rstiskalek/csiborg_postprocessing/field_shells"
|
||||||
if args.simname in ["csiborg2X", "Carrick2015", "Lilow2024",
|
if args.simname in ["csiborg2X", "Carrick2015", "Lilow2024",
|
||||||
"CLONES", "CF4"]:
|
"CLONES", "CF4"]:
|
||||||
main_from_field(args, folder)
|
main_from_field(args, folder)
|
||||||
elif "csiborg" in args.simname:
|
elif "csiborg" in args.simname or args.simname == "manticore_2MPP_N128_DES_V1": # noqa
|
||||||
main_csiborg(args, folder)
|
main_csiborg(args, folder)
|
||||||
elif "borg" in args.simname:
|
elif "borg" in args.simname:
|
||||||
main_borg(args, folder)
|
main_borg(args, folder)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue