Curved-sky optimal CMB lensing reconstruction and bias calculation. Delensalot takes an observed CMB map and returns an optimal estimate of the underlying lensing field.
If you use delensalot for your work, please consider citing the ApJ publication CMB-S4: Iterative internal delensing and r constraints.
This figure shows the full sky optimal lensing potential reconstruction for various CMB observations in a 5 times 5 degree patch. The input lensing potential is shown in the leftmost figure.
- Curved-sky analysis
- Anisotropic noise model support
- Masked-sky support
- Quadratic estimator (QE) implementation via Plancklens
- Mock data generation using lenspyx
- Supports various estimators (TT, EE, BB, MV, EE+EB, ..)
Requires Python 3.9–3.12. First install the two dependencies that are not on PyPI:
pip install git+https://github.com/carronj/plancklens
pip install git+https://github.com/carronj/lenspyxNote: building
plancklensrequires a Fortran compiler (gfortran). On macOS:brew install gcc. On Linux:sudo apt-get install gfortran.
Then install delensalot:
git clone https://github.com/NextGenCMB/delensalot.git
cd delensalot
pip install -e .conda create --name delensalot python=3.11
conda activate delensalot
conda install pip numpy
pip install git+https://github.com/carronj/plancklens
pip install git+https://github.com/carronj/lenspyx
cd </path/to/delensalot>
pip install -e .To use delensalot in Jupyter notebooks, add it as a kernel:
pip install ipykernel
python -m ipykernel install --user --name=delensalotattrserrors — make sure you have theattrspackage (notattr, which is different):pip install --upgrade attrs. Version 23.1.0 or newer is required.astropy/ducc0errors — usually caused by an outdatedastropy. Runpip install --upgrade astropy.plancklensbuild fails — make suregfortranis installed (see above).- Still stuck? — run
python check_install.pyfor a full dependency report with fix hints.
See first_steps/notebooks/ for tutorials. The minimal working example notebook interactive_mwe.ipynb is a good starting point.
python3 <parfile>.pySee first_steps/parameter_files/ for examples.
delensalot supports MPI for parallelisation across simulation indices:
srun -n <ntasks> python3 run.py -r <path-to-config-file>- Plancklens
- lenspyx
- DUCC
- numpy, scipy, healpy, astropy, attrs, psutil, logdecorator
Documentation can be found at delensalot.readthedocs.io.