Skip to content

Commit

Permalink
Update prepare_sim.py
Browse files Browse the repository at this point in the history
Updated Menv correction at boundaries
1. Added more randoms, such that after cutting into an octant, we have twelve times more randoms than haloes.
2. Changed random correction from multiplying to division.
  • Loading branch information
pburger112 authored Jul 11, 2024
1 parent 2c6fda6 commit e7cd0d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions abacusnbody/hod/prepare_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def prepare_slab(

if len(index_bounds) > 0:
# factor of rands to generate
rand = 10
rand = 100 # to ensure 12 times more randoms than haloes in the octant.
rand_N = allpos.shape[0] * rand

# generate randoms in L shape
Expand Down Expand Up @@ -591,7 +591,7 @@ def prepare_slab(
gc.collect()

if halo_lc and len(index_bounds) > 0:
Menv[index_bounds] *= rand_norm
Menv[index_bounds] /= rand_norm

halos['fenv_rank'] = calc_fenv_opt(Menv, mbins, allmasses)

Expand Down

0 comments on commit e7cd0d7

Please sign in to comment.