fix local env B related artificial spikes#207
Conversation
|
Thanks @ahnyu! I think this sounds reasonable. @SandyYuan Are you available to take a look at this? |
|
@ahnyu Can you have a look at the failing tests? I think because the HOD calculation has changed, we'll need to regenerate the reference files, which can be done by running |
|
@lgarrison Yes, I forced fenv column to be zeros for later use (abacus_hod.py will update fenv for want_AB case). Should I push a commit with new reference? |
|
Yes, if you wouldn't mind, that would be great. |
|
It looks like some new files got added in the latest commit, are those actually needed for the test to run or are those intermediate outputs? Also, it looks like some comments got lost from |
for more information, see https://pre-commit.ci
|
New files are Menv output files, if we don't want to add them to check in test_hod.py then they are not needed. I have them removed in latest commit. Comments are back. |
|
Thanks Hanyu! |
|
@lgarrison sorry, I just realize current logic is not safe for box with only one or two slabs (small box), should I open another PR to fix that, will be a quick one, just deduplicate by halo ID. |
This PR fixes a bug in the local environment calculation used by the assembly-bias parameters (Bcent, Bsat). The issue was that Menv was estimated independently within each superslab, so halos close to a superslab boundary were missing neighboring halos from adjacent superslabs. This led to incorrect Menv values near slab edges and introduced an artificial x-dependent striping pattern in the derived fenv field.
The fix is:
This fix is for box, the light-cone approach is unchanged.
Included are before/after plots showing the clustering signal (Pk), galaxy counts along each axis.