May 17, 2021 - Lensing through deflections, practical
Unlensed
Mostly just cleanup of Jason's code. We checked our codes produce identical results. It is interesting to note that in the one shell we looked at, only about 17% of the pixels are occupied. We are thus in a regime of delta function sources, which does not sound like something Lenspix was created to do.
By comparison with the old notes, we found that the fluxes appear to be in MJy. For 545 GHz, the total flux is 3.99 MJy.
Convert kappa maps
Our viewpoint of lensing uses [math]\displaystyle{ d, \alpha }[/math] instead of [math]\displaystyle{ \kappa }[/math], so we created a script that does it. First converts everything to the gravitational potential, then uses Healpy to get the derivatives and from there calculates deflection amplitude and direction.
Eighth shell:
Lensing
We coded up the logic explained in the previous post. The only thing to keep in mind is we want to go from unlensed positions to the lensed ones, which means we have to use "-d" for the deflections. In the main code we then convert xyz positions into angles, deflect them and finally find the pixels where the galaxies end up. We also made sure the flux is multiplied by the magnification (1 + 2 kappa).
The first shell runs in 55 minutes, though other shells might take longer if they contain significantly more galaxies.