mirror of
https://github.com/Richard-Sti/csiborgtools_public.git
synced 2025-05-12 13:41:13 +00:00
Matching of observations (#127)
* Rename file * Add indents * Update imports * Add counting * Docs * Add nb * Rename nb * Update nb * Add PV processing * Update nb * Add Pantheon+groups * Update submission scripts * Add Pantheon+zSN * Update nb * Edit param * Matchin SFI * Update nb * Fix path bug * Add list of clusters * Update imports * Update imports * Add cartesian & mass of clusters * Add observation to halo matching * Add nb * Add inverse CDF * Add import * Update nb * Add comments
This commit is contained in:
parent
3876985f26
commit
c4557cf35b
16 changed files with 1727 additions and 714 deletions
368
notebooks/match_observation/match_clusters.ipynb
Normal file
368
notebooks/match_observation/match_clusters.ipynb
Normal file
File diff suppressed because one or more lines are too long
25
notebooks/match_observation/match_clusters.py
Normal file
25
notebooks/match_observation/match_clusters.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
import csiborgtools
|
||||
from tqdm import tqdm
|
||||
|
||||
|
||||
def open_cat(nsim, simname, bounds):
|
||||
if "csiborg1" in simname:
|
||||
cat = csiborgtools.read.CSiBORG1Catalogue(nsim, bounds=bounds)
|
||||
elif "csiborg2" in simname:
|
||||
cat = csiborgtools.read.CSiBORG2Catalogue(
|
||||
nsim, 99, simname.split("_")[-1], bounds=bounds)
|
||||
else:
|
||||
raise ValueError(f"Unknown simulation name: {simname}.")
|
||||
|
||||
return cat
|
||||
|
||||
|
||||
def open_cats(simname, bounds):
|
||||
paths = csiborgtools.read.Paths(**csiborgtools.paths_glamdring)
|
||||
nsims = paths.get_ics(simname)
|
||||
catalogues = [None] * len(nsims)
|
||||
|
||||
for i, nsim in enumerate(tqdm(nsims, desc="Opening catalogues")):
|
||||
catalogues[i] = open_cat(nsim, simname, bounds)
|
||||
|
||||
return catalogues
|
Loading…
Add table
Add a link
Reference in a new issue