astropy / astropy/halotools

Unexplainable NFW sampling discrepancy

Open
#1,023 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
120
Forks
70
PR merge metrics
No merged PRs in 30d

Description

Hello hello, while writing our own HOD code with @bhorowitz and others we were trying to compare our results to halotools as God's truth, but were finding some residual differences in the 2pt functions that I can't explain.

I have isolated at least one potential thing that could explain our discrepancies, related to NFW sampling of the satellites. And actually, as far as I understand, I seem to be getting **inconsistent results within halotools itself** depending on whether I sample manually positions with `mc_generate_nfw_radial_positions` or if I sample satellites for the catalog normally.

I made a minimal **demo notebook [here](https://colab.research.google.com/drive/1ZdjMQsIdf90i484-ddleW3MriiFBTACp?usp=sharing).** and I'm getting this sort of discrepancy on the radial distribution of satellites :
![image](https://user-images.githubusercontent.com/861591/132247653-13cbbf6d-a796-441c-bca5-4209280081cc.png)

And this amount of difference actually can explain away the differences I'm seeing downstream in the 2pt function.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked Colab demo and compare the radial distributions produced by mc_generate_nfw_radial_positions and normal catalog satellite sampling. Trace both sampling paths in the halotools source, then establish which behavior is inconsistent and verify that the discrepancy is resolved in the demonstrated 2pt-function comparison.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.