mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2024-12-22 21:08:04 +00:00
eb8d070fff
* Add moving FoF membership files * add FoF membership path * Add notes where its PHEW * Add FoF catalogue path * Correct typo * Add more functionalities * Make work with halo IDs from FoF * Edit print statement * Fix copy bug * copy * Add FoF catalogue reading * Clean up script * Fix typo * Little edits * Fix naming convention * Rename key * Remove loading substructure particles * Rename CSiBORG Cat * Rename clumps cat * Rename cat * Remove misplaced import * Switch to halos * rm import * structfit of only halos * Add FoF halo reading * Add a short comment * Fix __getitem__ to work with int * Fix problems * Improve __getitem__ * Add more conversion * Fix indexing * Fix __getitem__ assertion * Fix numbers * Rename * Fix verbosity flags * Add full Quijote HMF option * Add plot of Quijote only * Add quijote full paths * Fix the fit_init script * Renam arg * Update .gitignore * add default argument name * Change default verbosity flag * Modernise script structure * Fix dictionary * Fix reading to include m200c * Modernise script * Add args
25 KiB
25 KiB
In [1]:
import sys
import numpy as np
import matplotlib.pyplot as plt
sys.path.append("../")
import csiborgtools
%matplotlib widget
%load_ext autoreload
%autoreload 2
In [2]:
paths = csiborgtools.read.CSiBORGPaths(**csiborgtools.paths_glamdring)
nsim0 = 7444
nsimx = 7444 + 24
nsnap0 = max(paths.get_snapshots(nsim0))
nsnapx = max(paths.get_snapshots(nsimx))
overlapper = csiborgtools.match.ParticleOverlap()
In [3]:
halo0_archive = np.load(paths.split_path(nsnap0, nsim0))
halox_archive = np.load(paths.split_path(nsnapx, nsimx))
In [13]:
# delta_bckg = overlapper.make_bckg_delta(halo0_archive, verbose=True)
# delta_bckg = overlapper.make_bckg_delta(halox_archive, delta=delta_bckg, verbose=True)
# np.save("./bckg_{}_{}.npy".format(nsim0, nsimx), delta_bckg)
In [1]:
import h5py
In [2]:
f = h5py.File("../data/particles_7444.h5", "r")
In [8]:
f["particles"][0, :]
Out[8]:
In [ ]: