CMB Lensing
A JAX compatible version of the original CMBLensing.jl Julia package
CMBLensing.py is currently under development, and will contain all the basic functionality originally found in CMBLensing.jl. The package has its own simulation code that allows the user to generate random temperature, polarization, and lensing potential fields in the flat sky approximation. The LenseFlow algorithm then quickly lenses these CMB fields, and white noise is added along with a mask and a beam to approximate the type of data that would be measured by instruments here on Earth. Such a data field is then passed through a gradient descent algorithm which takes a series of steps in parameter space to arrive at the maximum likelihood estimators for the true unlensed CMB field and lensing potential.
The original paper which derived and implemented the LenseFlow algorithm is linked here. In summary, the CMB field we measure here on Earth using our telescopes or satellites is actually a distorted version of the true field as the light passes through space to reach us and gets deflected or “lensed” by the total effective gravitational potential of all the matter between us and the source of the signal. The LenseFlow algorithm takes in an unlensed CMB field along with a lensing potential and numerically integrates an Ordinary Differential Equation to output a lensed field where each pixel in the resulting map is systematically translated relative to its original position.
The LenseFlow algorithm and simulation code are just individual pieces of the whole package. Its main usefulness comes in its MAP joint algorithm which takes as inputs the lensed, noisy signal we measure with our instruments and then recovers the true unlensed fields and lensing potential. This is done by taking gradients of the log of a probability distribution function with respect to the unlensed field and the lensing potential and then performing an alternating step gradient descent algorithm to recover the fields which maximize this PDF.