mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2024-12-22 22:58:02 +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 matplotlib.pyplot as plt
import numpy
import scienceplots
from h5py import File
import plt_utils
%load_ext autoreload
%autoreload 2
In [12]:
with File("/mnt/extraspace/rstiskalek/csiborg_postprocessing/ACL/BORG2_0.25.hdf5", 'r') as f:
voxel_acl = f['voxel_acl'][...].flatten()
voxel_dist = f['voxel_dist'][...].flatten()
In [28]:
bins = numpy.linspace(0, 100, 10)
plt.figure()
mask = voxel_dist < 20
plt.hist(voxel_acl[mask], bins="auto", histtype='step', density=1, label=r"$0 < R / (\mathrm{Mpc} / h) < 20$")
mask = (voxel_dist > 20) & (voxel_dist < 40)
plt.hist(voxel_acl[mask], bins="auto", histtype='step', density=1, label=r"$20 < R / (\mathrm{Mpc} / h) < 40$")
mask = (voxel_dist > 40) & (voxel_dist < 60)
plt.hist(voxel_acl[mask], bins="auto", histtype='step', density=1, label=r"$40 < R / (\mathrm{Mpc} / h) < 60$")
# plt.scatter(voxel_dist.flatten(), voxel_acl.flatten(), s=0.1)
plt.legend()
plt.title("ACL of individual voxels")
plt.xlabel(r"$\mathrm{ACL}$")
plt.ylabel(r"Normalized bin counts")
plt.tight_layout()
plt.savefig("../plots/BORG_Stephen_ACL.png", dpi=450)
plt.show()
In [ ]: