Tests on mock PV catalogues (#123)

* Rename nb

* Add nb

* Update scrtip

* Update script

* Add reading of CB2 mocks

* CB2 mocks support

* Add mock generator

* Add mock support

* Add CB2 mock support

* Update nb for mocks

* Update script

* Update nb

* Update nbs
This commit is contained in:
Richard Stiskalek 2024-04-02 00:19:14 +02:00 committed by GitHub
parent 7259993524
commit da43031877
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 480 additions and 510 deletions

View file

@ -71,6 +71,12 @@ def get_los(catalogue_name, simname, comm):
with File(fpath, 'r') as f:
RA = f["RA"][:]
dec = f["DEC"][:]
elif "CB2_" in catalogue_name:
kind = catalogue_name.split("_")[-1]
fname = f"/mnt/extraspace/rstiskalek/catalogs/PV_mock_CB2_17417_{kind}.hdf5" # noqa
with File(fname, 'r') as f:
RA = f["RA"][:]
dec = f["DEC"][:]
else:
raise ValueError(f"Unknown field name: `{catalogue_name}`.")

View file

@ -1,5 +1,5 @@
nthreads=5
memory=40
nthreads=6
memory=42
on_login=0
queue="berg"
env="/mnt/users/rstiskalek/csiborgtools/venv_csiborg/bin/python"

View file

@ -54,6 +54,9 @@ def get_model(args, nsim_iterator, get_model_kwargs):
elif args.catalogue in ["LOSS", "Foundation", "Pantheon+", "SFI_gals",
"2MTF", "SFI_groups", "SFI_gals_masked"]:
fpath = join(folder, "PV_compilation_Supranta2019.hdf5")
elif "CB2_" in args.catalogue:
kind = args.catalogue.split("_")[-1]
fpath = join(folder, f"PV_mock_CB2_17417_{kind}.hdf5")
else:
raise ValueError(f"Unknown catalogue: `{args.catalogue}`.")
@ -199,7 +202,9 @@ if __name__ == "__main__":
nsims = paths.get_ics(args.simname)
get_model_kwargs = {"zcmb_max": 0.06}
model_kwargs = {"sample_alpha": True}
model_kwargs = {"sample_alpha": True, "sample_beta": True}
if "CB2_" in args.catalogue:
model_kwargs["sample_h"] = False
# Create the dumping folder.
if comm.Get_rank() == 0:

View file

@ -7,7 +7,7 @@ queue="berg"
env="/mnt/users/rstiskalek/csiborgtools/venv_csiborg/bin/python"
file="flow_validation.py"
catalogue="SFI_groups"
catalogue="CB2_small"
simname="csiborg2_main"

File diff suppressed because one or more lines are too long