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

@ -103,12 +103,11 @@ class DataLoader:
nobject = self._los_density.shape[1]
dtype = self._los_density.dtype
# In case of Carrick 2015 the box is in galactic coordinates..
if simname == "Carrick2015":
# Carrick+2015 box is in galactic coordinates
if simname in ["Carrick2015", "Lilow2024"]:
# Carrick+2015 and Lilow+2024 are in galactic coordinates
d1, d2 = radec_to_galactic(self._cat["RA"], self._cat["DEC"])
elif "CF4" in simname:
# CF4 box is in supergalactic coordinates
# CF4 is in supergalactic coordinates
d1, d2 = radec_to_supergalactic(self._cat["RA"], self._cat["DEC"])
else:
d1, d2 = self._cat["RA"], self._cat["DEC"]
@ -142,6 +141,12 @@ class DataLoader:
if simname in ["CF4", "CF4gp"]:
self._los_density = np.clip(self._los_density, 1e-5, None,)
# Lilow+2024 outside of the range data is NaN. Replace it with some
# finite values. This is OK because the PV tracers are not so far.
if simname == "Lilow2024":
self._los_density[np.isnan(self._los_density)] = 1.
self._los_radial_velocity[np.isnan(self._los_radial_velocity)] = 0.
self._mask = np.ones(len(self._cat), dtype=bool)
self._catname = catalogue

View file

@ -79,6 +79,7 @@ def simname2boxsize(simname):
"Carrick2015": 400.,
"CF4": 1000., # These need to be checked with Helene Courtois.
"CF4gp": 1000.,
"Lilow2024": 400.,
}
boxsize = d.get(simname, None)
@ -101,6 +102,7 @@ def simname2Omega_m(simname):
"Carrick2015": 0.3,
"CF4": 0.3,
"CF4gp": 0.3,
"Lilow2024": 0.3175,
}
omega_m = d.get(simname, None)

View file

@ -117,6 +117,8 @@ class Paths:
return [0]
elif simname in ["CF4", "CF4gp"]:
return [0]
elif simname == "Lilow2024":
return [0]
else:
raise ValueError(f"Unknown simulation name `{simname}`.")