Comments (11)
we were trying to compare our results to halotools as God's truth
I just checked the Contributor List, but I don't see anybody with this name on it. If I run a quick "git blame" check on the relevant section of source code, it looks like the populate_mock
function was just written by some guy ;-)
Based on a quick inspection of your notebook (which is very clear, thanks!), it looks like the populate_mock function might not be properly calling the Monte Carlo generator of radial positions. This is an important bug to fix before the next release, so I'll get to this as soon as I can.
from halotools.
@EiffL here's my branch where I tried the more finely spaced concentrations - https://github.com/astropy/halotools/tree/mockpop_bugfix could you try running your tpcf test to see whether this improves the discrepancy you have been finding?
from halotools.
from halotools.
If someone could look at the demo notebook and explain to me why the two histograms don't match, I would be sooooo happy.
from halotools.
Thanks so much!
from halotools.
I'm still not sure, but it looks like this might be related to the use of a lookup table for the concentration. For some values of the manually-overridden concentration, I get agreement with the NFW reference, and for others I don't. Here are two examples where the left-hand panel is the same diagnostic plot you wrote, and the right-hand panel is just the fractional difference, with sign convention defined by (mock - reference) / reference
from halotools.
If I change the default spacing in the concentration lookup table from dc=1 to dc=0.25, then the discrepancy gets quite a bit smaller, so I think this is the likely culprit
from halotools.
Actually, you don't need to use a different branch. In the current master
branch, you can test this hypothesis by passing in the concentration_bins
argument to the PrebuiltHodModelFactory
.
from halotools.
Thanks a lot @aphearin I tried your fix and it does indeed seem to improve the NFW profile quite a bit. I'm trying to check what happens at the level of the 2pt functitons, and will post plots when I get some convincing results
from halotools.
vs
with the default dc (I guess 1.0)
so yeah, looks like this is solving the problem! And I understand better why my tests at particular conc worked well, but getting some weird results on the conc from the catalog.
But looks like changing dc makes the sampling code way slower for some reason
from halotools.
so yeah, looks like this is solving the problem!
Great, thanks for independently confirming that this is the issue. I'm glad this turned out to have a simple resolution.
But looks like changing dc makes the sampling code way slower for some reason
Right, yes, there's a trade-off between the size of the lookup table and the performance. I could try to optimize this a bit and see how it goes, though I think the real solution here is for the NFW profile to be reimplemented to be bin-free using the analytical solution for the CDF inverse. Originally, I had thought that it was a good idea to develop this lookup table machinery since it would be more general, covering cases that had no closed-form analytical solution for the inverse CDF, and thinking that people would want to try out all manner of different profiles. But over time, it became clear that people just wanted to use NFW, and so this feature no longer seems so important.
from halotools.
Related Issues (20)
- masking function issue with subhalo models HOT 3
- Fix bug in Zu&Mandelbaum2016 central occupation function
- installation failure -- cython? HOT 12
- Code for wp and tpcf that does weighting and jackknifing? HOT 1
- Zero halo_axisA values in halo catalog HOT 3
- All upid values are -1 when using SubhaloPhaseSpace HOT 1
- installation error with "use_2to3 is invalid" HOT 9
- Subhalo values not being populated in mock when using SubhaloPhaseSpace HOT 2
- pyproject.toml is not properly configured to build HOT 5
- Delete astropy-helpers
- Question on NFWPhaesSpace. HOT 2
- Could not build wheels for halotools, which is required to install pyproject.toml-based projects HOT 2
- Bug in mean_delta_sigma function for non-periodic-box
- Can halotools be installed as root? HOT 1
- Leauthaud11 HOD HOT 13
- Redshifts of galaxies vs halos HOT 1
- Tutorial issues HOT 4
- Compatibility with Python 3.12 HOT 3
- Issue with Importing positional_marked_npairs_3d from halotools.mock_observables.pair_counters HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from halotools.