Skip to content

End-to-end (E2E) pipeline for simulating the lensing reconstruction of the combination of Planck and LiteBIRD

License

Notifications You must be signed in to change notification settings

miguelrgranda/PlanckBIRD-lens

Repository files navigation

PlanckBIRD-lens

This repository contains all the tools for forecasting the lensing sensitivity of Planck + LiteBIRD using an end-to-end pipeline. It includes:

  • Simulation of the frequency maps for Planck and LiteBIRD.
  • Component-separation using HILC from frequency maps coming from Planck and LiteBIRD.
  • Lensing reconstruction at the map and power spectrum level.
  • Cosmological parameter estimation using a lensing-only likelihood.
  • Semi-analytical delensing efficiency estimation for constraining the tensor-to-scalar ratio.

Authors

Miguel Ruiz-Granda (ruizm@ifca.unican.es), Christian Gimeno-Amo (gimenoc@ifca.unican.es).

Citation

If you use any of this code, please cite: M. Ruiz-Granda et al 2025, "LiteBIRD Science Goals and Forecasts: Improved full-sky reconstruction of the gravitational lensing potential through the combination of Planck and LiteBIRD data".

Dependencies

Here are the dependencies needed to run the pipeline. We also include the version

  • python v3.9.0
  • lensQUEST (modified version from the original code from Dominic Beck)
  • lensingbiases (modified version from the original code from Julien Peloton)
  • cmblensplus v0.4
  • pysm3 v3.4.0
  • healpy v1.16.2
  • mpi4py v3.0.3
  • pymaster v1.4
  • lenspyx v2.0.5
  • cobaya v3.5
  • GetDist v1.5.3
  • Others: scipy v1.13.1, numpy v1.23.5, pickle v4.0, astropy v5.3, tqdm v4.64.1, matplotlib v3.7.1.

Modification in lensQUEST

We have included the implementation of the Realization-dependent N0 computation using a semi-analytical approach. The function to call is lensquest.quest_norm_RD_iterSims(...), which uses OpenMP parallelization for significantly faster execution.

Modification in lensingbiases

The N1 computation was modified to allow computing the N1 bias without needing to use an ini file. Additionally, in this new version, the power spectra noise is not calculated internally, and now the observed angular power spectra is passed as a parameter.

All the information is passed via the arguments of the python function LensingBiases.compute_n1_py(...), which computes the unnormalized N1 bias using OPENMP parallelization. We did not integrate the N0 computation accordingly in this modified version, because we are computing it using lensquest or the MCN0 implementation in PlanckBIRD-lens.

About cmblensplus

Installing cmblensplus can be complicated, and in reality, it is barely used:

  • In filtering.py, cmblensplus is imported only for the pixel-based filtering, which is not used in our code and left there for comparison purposes. By commenting the line import curvedsky as cs, you solve the import error.

  • In reconstruction.py only the python scripts analysis.py and binning.py from cmblensplus/utils are needed. There are two possible solutions:

    • Installing cmblensplus/utils by creating a setup.py inside the cmblensplus folder and running in the terminal pip3 install .:
     #!/usr/bin/env python
    
     # Made by Miguel Ruiz Granda
     from distutils.core import setup
     
     setup(name='utils',
           version='1.0',
           packages=['utils'],
          )
    from utils import analysis as ana --> import analysis as ana
    from utils import binning --> import binning

Downloading Planck Galactic masks:

For running the filtering with the Planck Galactic masks, the file HFI_Mask_GalPlane-apo0_2048_R2.00.fits needs to be downloaded into the input directory:

wget -O HFI_Mask_GalPlane-apo0_2048_R2.00.fits "http://pla.esac.esa.int/pla/aio/product-action?MAP.MAP_ID=HFI_Mask_GalPlane-apo0_2048_R2.00.fits"

General description:

  • combination.py -- Simulates frequency maps using the experiments.yalm information for Planck and LiteBIRD. It performs component separation on those frequency maps for Planck, LiteBIRD, and Planck + LiteBIRD.

  • filtering.py -- Filters the cleaned maps using an harmonic C-inverse filtering. This is a step needed for running the quadratic estimators (QE).

  • reconstruction.py -- Reconstruct the lensing potential using the quadratic estimators formalism. It also includes tools for debiasing the lensing power spectrum, especially for the N0 and N1 bias estimation.

  • mcmc_cosmoparams_CMB_lensing.py -- Runs an MCMC to estimate the constraints on $H_0$ -- $\sigma_8$ -- $\Omega_\mathrm{m}$ using a lensing-only likelihood. Previously preprocessing_TF_cosmoparams.py needs to be run to compute the covariances matrices and to apply the Transfer Function correction.

Jupyter-notebooks

About

End-to-end (E2E) pipeline for simulating the lensing reconstruction of the combination of Planck and LiteBIRD

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •