DifferentiableUniverseInitiative / flowpm

Particle Mesh simulation in TensorFlow
https://flowpm.readthedocs.io/
MIT License
90 stars 20 forks source link

Change strategy for computing lensing lightcones and adds tests for Density planes and Born convergence #79

Closed EiffL closed 3 years ago

EiffL commented 3 years ago

This PR changes a little bit how we are doing things in the lensing branch, but it should validate almost all we care about.

You can see an example of this proposed new API here: https://github.com/DifferentiableUniverseInitiative/flowpm/blob/u/EiffL/lensing/notebooks/lensing.ipynb

And I have also added a dev notebook to see the outputs of these test functions here: https://github.com/DifferentiableUniverseInitiative/flowpm/blob/u/EiffL/lensing/notebooks/dev/test_raytracing.ipynb

Highlights of comparisons

Density planes

image This is comparison of the density planes from the same snapshot, note that the high freq are slightly different because of the different painting schemes, but the residuals are clean. After smoothing, we validate these maps pixel-wise at a maximum relative error of 2%, their smoothed power spectra are also good: image

Convergence maps

image

This is the output of running an LPT simulation, cutting it in density planes using FlowPM, and then doing the ray tracing from these planes in both lenstools and FlowPM. Very good match, validated at an absolute tolerance of 5e-4

EiffL commented 3 years ago

Let me know what you think @dlanzieri but I think this may be a full validation against lenstools. Now the only thing that remains to be seen is whether we can recover a reasonable power spectrum....

EiffL commented 3 years ago

Thank you @dlanzieri :-D since you approve these modifications, I'll go ahead and merge to the lensing branch.