Open marcelo-alvarez opened 9 months ago
@marcelo-alvarez I think that is the difference between the CAMB vs CLASS cosmology backend use in xgfield. As you discovered the cosmology class methods were not supported for CAMB backend (fixed in https://github.com/exgalsky/xgcosmo/pull/2). So the earlier run must have been using CLASS backend in the xgfield part. Unless we fix the CLASS vs CAMB precision issues there will be small differences in the numbers. One way would be to check consistency of the output of all class methods for different choices of cosmo_backend
.
Hi. I've been mulling over how to do this validation at 2LPT and so far have come up with no good ideas. The challenge is that (as far as I know) any code that computes the power spectra of matter or tracers beyond 1LPT (e.g. velocileptors) is conscious of the extensive cancellations taking place at 1-loop order between P^{1,3} and P^{2,2}, and actually computes these beyond-tree-level as a single integral. This avoids catastrophic numerical artifacts when differencing two large but very similar numbers. But unfortunately, it also means that we don't get access to just P^{2,2}, which is what we would want to do our 2LPT validation.
Managed a quick and dirty hack of velocileptors
following advice from Stephen Chen. The 2LPT sims roughly agree with theory up to ell~2000. We can discuss more tomorrow.
@abaleato thanks for all your work on this. As we discussed previously, we can keep this issue open and continue investigating at ell>1000 once we have higher resolution data and have checked that we are using the same matter power spectrum P(k,z).
Verify that changes after merging https://github.com/exgalsky/mockgen/pull/6, https://github.com/exgalsky/xgfield/pull/8, and https://github.com/exgalsky/lpt/pull/10 result in the expected statistical properties of full sky kappa maps for the input cosmology, assuming 2LPT is used for the matter fluctuations.
@abaleato 1/2LPT maps for you to validate are being written to:
These were generated by the commands
with the xgsmenv environment on 4 Perlmutter GPU nodes. The cosmological parameters passed to CAMB and the random seeds were the same as in https://github.com/exgalsky/mockgen/issues/2. The 1LPT maps match statistically at the power spectrum and cross correlation level, however are not perfectly identical pixel-by-pixel, for unknown reasons (@1cosmologist any idea what may have changed?).
A quick plot of the difference for the first random realization (seed=13579) is attached. The uptick at ell > 2000 in the power spectra and corresponding turnover in the relative differences is likely due to limited resolution combined with our treatment of resolution elements as point masses. I think for the purposes of this validation we can focus on ell < 2000 and leave the higher-resolution testing and a more well-behaved matter representation for the future.