mirror of
https://github.com/Richard-Sti/csiborgtools_public.git
synced 2025-05-21 10:01:11 +00:00
Update units to be consistent. (#78)
* Fix Quijote units * Updates to units * Fix how things are loaded * Updating definitions & conventions * Clear up how fiducial observers in quijote work * Refactorize array manip * Move function definition * More code refactoring * Remove unused argument * Remove `convert_from_box` * Make a note * Converting particle units * Add notes about units * Remove box constants * Add rho_crit0 * Fix spherical overdensity mass units * Refactor more code * Edit catalogue kwargs * Edit the docstring * Edit bounds * Add new checks for empty array * Remove unused import * Remove old code * Remove old function * Update real 2 redshift * Clear up the RSP conv * Add comments * Add some units
This commit is contained in:
parent
fb4b4edf19
commit
acb8d9571c
23 changed files with 695 additions and 1079 deletions
|
@ -59,12 +59,12 @@ def get_counts(nsim, bins, paths, parser_args):
|
|||
|
||||
if simname == "csiborg":
|
||||
cat = csiborgtools.read.CSiBORGHaloCatalogue(
|
||||
nsim, paths, bounds=bounds, with_lagpatch=False,
|
||||
load_initial=False)
|
||||
nsim, paths, bounds=bounds, load_initial=False)
|
||||
logmass = numpy.log10(cat["totpartmass"])
|
||||
counts = csiborgtools.fits.number_counts(logmass, bins)
|
||||
elif simname == "quijote":
|
||||
cat0 = csiborgtools.read.QuijoteHaloCatalogue(nsim, paths, nsnap=4)
|
||||
cat0 = csiborgtools.read.QuijoteHaloCatalogue(nsim, paths, nsnap=4,
|
||||
load_initial=False)
|
||||
nmax = int(cat0.box.boxsize // (2 * parser_args.Rmax))**3
|
||||
counts = numpy.full((nmax, len(bins) - 1), numpy.nan,
|
||||
dtype=numpy.float32)
|
||||
|
@ -74,7 +74,8 @@ def get_counts(nsim, bins, paths, parser_args):
|
|||
logmass = numpy.log10(cat["group_mass"])
|
||||
counts[nobs, :] = csiborgtools.fits.number_counts(logmass, bins)
|
||||
elif simname == "quijote_full":
|
||||
cat = csiborgtools.read.QuijoteHaloCatalogue(nsim, paths, nsnap=4)
|
||||
cat = csiborgtools.read.QuijoteHaloCatalogue(nsim, paths, nsnap=4,
|
||||
load_initial=False)
|
||||
logmass = numpy.log10(cat["group_mass"])
|
||||
counts = csiborgtools.fits.number_counts(logmass, bins)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue