mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2024-12-22 21:38:03 +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
import joblib
import scienceplots
sys.path.append("../")
import csiborgtools
plt.style.use(["science", "notebook"])
%matplotlib widget
%load_ext autoreload
%autoreload 2
In [2]:
d = np.load("/mnt/extraspace/rstiskalek/csiborg/split/clumps_07444_00951.npz")
In [12]:
%timeit d["232"]
In [ ]:
In [2]:
paths = csiborgtools.read.CSiBORGPaths(**csiborgtools.paths_glamdring)
# cat = csiborgtools.read.ClumpsCatalogue(7444, paths)
In [3]:
paths.knn_path(7444, "auto", "la")
Out[3]:
In [8]:
np.savez("test.npz", a=np.random.rand(510, 510, 510), b=np.random.rand(510, 510, 510))
In [15]:
d = np.load("test.npz")
In [16]:
d.files
Out[16]:
In [7]:
d.files
Out[7]:
In [ ]:
In [26]:
np.save("test.npy", np.array([]))
In [27]:
np.load("test.npy")
Out[27]:
In [ ]:
In [ ]:
In [21]:
# paths.split_path(123, 7444, 952)
Out[21]:
In [4]:
nsim = 7444
nsnap = max(paths.get_snapshots(7444))
reader = csiborgtools.read.ParticleReader(paths)
In [14]:
# clumpind = reader.read_clumps(nsnap, nsim, cols="index")["index"]
In [ ]:
In [ ]:
In [17]:
parts = np.load("/mnt/extraspace/rstiskalek/csiborg/initmatch/clump_7468_particles.npy", allow_pickle=True)
In [ ]:
In [ ]: