Add Lilow2024 velocity fields (#133)

* Add Lilow data

* Fix Lilow NaNs

* Update nb

* Update nb
This commit is contained in:
Richard Stiskalek 2024-06-28 11:55:42 +01:00 committed by GitHub
parent 301ff61e89
commit 84a1609d77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 623 additions and 46 deletions

View file

@ -89,9 +89,9 @@ def get_los(catalogue_name, simname, comm):
if comm.Get_rank() == 0:
print(f"The dataset contains {len(RA)} objects.")
if simname == "Carrick2015":
# The Carrick+2015 is in galactic coordinates, so we need to
# convert the RA/dec to galactic coordinates.
if simname in ["Carrick2015", "Lilow2024"]:
# The Carrick+2015 and Lilow+2024 are in galactic coordinates, so
# we need to convert the RA/dec to galactic coordinates.
c = SkyCoord(ra=RA*u.degree, dec=dec*u.degree, frame='icrs')
pos = np.vstack((c.galactic.l, c.galactic.b)).T
elif "CF4" in simname:
@ -177,6 +177,21 @@ def get_field(simname, nsim, kind, MAS, grid):
if kind == "velocity":
field *= 52
return field.astype(np.float32)
elif simname == "Lilow2024":
folder = "/mnt/extraspace/rstiskalek/catalogs"
warn(f"Using local paths from `{folder}`.", RuntimeWarning)
if kind == "density":
fpath = join(folder, "Lilow2024_density.npy")
field = np.load(fpath)
elif kind == "velocity":
field = []
for p in ["x", "y", "z"]:
fpath = join(folder, f"Lilow2024_{p}Velocity.npy")
field.append(np.load(fpath).astype(np.float32))
field = np.stack(field)
return field.astype(np.float32)
else:
raise ValueError(f"Unknown simulation name: `{simname}`.")

View file

@ -17,7 +17,7 @@ if [ "$on_login" != "1" ] && [ "$on_login" != "0" ]; then
fi
# Submit a job for each combination of simname, catalogue, ksim
for simname in "CF4gp"; do
for simname in "Lilow2024"; do
for catalogue in "LOSS"; do
# for ksim in 0 1 2; do
# for ksim in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 "none"; do