mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2024-12-22 22:08:02 +00:00
ee222cd010
* Update nb * Update script * Update script * Rename * Update script * Update script * Remove warning * Ignore minors when extracting MAH * Fix paths bug * Move notebooks * Move files * Rename and delete things * Rename file * Move file * Rename things * Remove old print statement * Add basic MAH plot * Add random MAH path * Output snapshot numbers * Add MAH random extraction * Fix redshift bug * Edit script * Add extracting random MAH * Little updates * Add CB2 redshift * Add some caching * Add diagnostic plots * Add caching * Minor updates * Update nb * Update notebook * Update script * Add Sorce randoms * Add CB2 varysmall * Update nb * Update nb * Update nb * Use catalogue HMF * Move definition of radec2galactic * Update nb * Update import * Update import * Add galatic coords to catalogues * Update nb
2.3 MiB
2.3 MiB
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 [ ]: