Giter VIP home page Giter VIP logo

gracospa / class_delens Goto Github PK

View Code? Open in Web Editor NEW

This project forked from selimhotinli/class_delens

0.0 0.0 0.0 640.03 MB

Public repository of the CLASS code that has the functionality of producing delensed CMB spectra and lensing-reconstruction noise spectra, for given CMB experimental specifications. Code can also be used as a submodule of the Fisher forecasting tool https://github.com/ctrendafilova/FisherLens.

C++ 0.91% Python 4.81% C 87.86% MATLAB 0.17% Makefile 0.24% Jupyter Notebook 2.97% Cython 3.03%

class_delens's Introduction

CLASS delens: Delensing module for the CLASS code

Implementation of delensing procedure discussed in https://arxiv.org/abs/2111.15036: by authors Selim C. Hotinli, Joel Meyers, Cynthia Trendafilova, Daniel Green, Alex van Engelen

Code produces delensed CMB spectra (TT, TE, EE and BB) and lensing-reconstruction noise for given CMB experiment specifications and cosmology.

Delensing reverses the effects of lensing on the observed CMB temperature and polarization maps. This provides various benefits. Delensed CMB spectra have sharper acoustic peaks and more prominent damping tails, allowing for improved inferences of cosmological parameters that impact those features. Delensing reduces B-mode power, aiding the search for primordial gravitational waves and allowing for lower variance reconstruction of lensing and other sources of secondary CMB anisotropies. Lensing-induced power spectrum covariances are reduced by delensing, simplifying analyses and improving constraints on primordial non-Gaussianities. Please refer to https://arxiv.org/abs/2111.15036 for a detailed demonstration of the benefits of CMB delensing.

This code can be used as a submodule for the Fisher forecasting tool software https://github.com/ctrendafilova/FisherLens.

Using the code

In the standard way described in README_CLASS.md

make class

The delensed_cmb.ini file is the reference input file, analogous to explainatory.ini in the standard CLASS code.

delensed_cmb.ini containts and explains the use of all possible additional input parameters related to the delensing implementation.

New options for delensing implementation

If delensing = yes : the code performs delensing once

If delensing = iterative : the code performs iterative delensing until spectra converge

If any other option for delensing parameter is chosen, the code will not calculate the delensed spectra.

Selecting CMB noise

Options temperature noise spectra type and polarization noise spectra type determine the type of CMB spectra noise to be considered when calculating the lensing-reconstruction noise and delensed CMB spectra.

If temperature noise spectra type = idealized: Idealized temperature noise used in delensing is calculated by the code internally. Same for the polarization noise.

If temperature noise spectra type = external: Temperature noise is taken externally. Same for the polarization noise.

In the case temperature noise spectra type is set to external, please define the directory for the noise data with the option

command_for_temperature_noise_spec = cat /User/directory/to/CMB/noise.txt

Same applies for the polarization noise.

If the CMB noise is set to idealized, set the properties of the temperature and polarization noise in radians with the options below (for example for 1 arminute beam and muK-arcminute for noise ).
delta_noise = 0.000290888209 sigma_beam = 0.000290888209

If you wish to output the temperature/polarization spectra, you can set output_spectra_noise = yes.

Options on lensing-reconstruction noise calculation

The code calculates the lensing reconstruction noise internally for a given CMB noise with the option lensing reconstruction noise spectra type set equal to internal.

Internal calculation of the lensing reconstruction noise can be further specilazed depending on the user's choise with the options noise_iteration_type min_varr_type.

noise_iteration_type defines the set of lensing-reconstruction quadratic estimators (equilalently, normalisations) used in the calculation of the minimum-variance lensing-reconstruction noise if delensing is set equal to iterative.

You can set noise_iteration_type equal to all if you wish to perform iterative delensing on all quadratic estimators.

You can set noise_iteration_type equal to diag if you wish to perform iterative delensing only on the diagonal components in the covariance matrix of quadratic estimators.

You can set noise_iteration_type equal to eb if you wish to perform iterative delensing only the EB-EB quadratic estimator.

Performing iterative delensing on the estimators improves the quality of delensing by reducing the lensing-reconstruction noise as discussed in [arXiv].

min_varr_type option determines how the minimum variance lensing-reconstruction noise is calculated at the end of delensing.

You can set min_varr_type equal to all to include all elements of the quadratic-estimator covariance when calculating the minimum-variance lensing reconstruction noise.

You can set min_varr_type equal to eb to include only the EB-EB quadratic estimator.

You can set min_varr_type equal to diag to include only the diagonal components of the quadratic-estimator covariance.

The verbosity of the delensing module can be set with the delensing_verbose option, similar to default verbosity options in defined CLASS.

If delensing = iterative you can set the type of the convergence criteria for iterative delensing with the option convergence type.

If convergence type = every delensing converges if only all the differences between the last and the previous iteration of the lensing noise spectra divided by the current value of the spectra at that mode is less than 'convergence_criterion_itr'.

If convergence type = total convergence if only the sum of all the differences between the current and the previous iteration in the lensing noise spectra divided by the sum of all the current value of the spectra at that mode is less than 'convergence_criterion_itr'

also, dont forget to choose e.g. convergence_criterion_itr = 1e-4.

If lensing reconstruction noise spectra type = external: Lensing-reconstruction noise is taken externally. In this case please define the path to the lensing-reconstruction noise with command_for_lensing_noise_spec = cat /User/directory/to/Lensing/noise.txt

Options on derivatives of the lensed or delensed spectra

If you wish to calculate the derivatives of the lensed and delensed spectra with respect to the unlensed spectra, please set

calculate_derviaties_wrt_unlensed = yes

and set unlensed derivative type equal to either lensed or delensed

If you wish to calculate the derivatives of the lensed and delensed spectra with respect to the lensing power-spectrum, please set

delensing derivatives = yes

and set derivative type equal to either lensed or delensed

If you wish to output the derivatives, please set output_derivatives = yes.

Note that the matrices including the derivatives can be very large for large values of maximum multipole values included in delensing.

You can set the sparsity of the produced matrices with the option derv_binedges.

If derv_binedges = 10 for example, every 10th derivative in L multipole will be saved from the where L is the multipole corresponding to the derivative (either of the lensing potential or the unlensed spectra).

Option delta_dl_max set the buffer between the lensed spectra and delensed spectra.

Delensing primer

Gravitational lensing deflects CMB photons such that the lensed CMB temperature and polarization in line-of-sight direction are given by the unlensed CMB in a direction that differs from the line-of-sight direction by the lensing deflection . At lowest order, the deflection angle is a pure gradient where is the lensing potential. For example, the lensed temperature field is given in terms of the unlensed temperature field by

The aim of delensing is to manipulate observed CMB maps (such as ) and estimates of the lensing deflection to reverse this remapping in order to recover an estimate of the unlensed CMB.

Software implementation

We implement our delensing procedure as a modification of the lensing routine in the CLASS Boltzmann code. Our goal is to provide a tool that allows accurate, stable, and efficient computation of the delensed CMB spectra and lensing reconstruction noise. In addition to benefiting from the specialised numerical routines available in the \texttt{CLASS} code, we use efficient real-space expressions introduced in (Dvorkin et al., Smith et al.) for the delensed spectra and lensing reconstruction quadratic estimators. These expressions can be evaluated at the cost of rather than , where is the maximum multipole used in the quadratic estimator calculation. This provides a significant increase in speed which is valuable for repeated calculations of iterative delensing as well as rapid exploration of the parameter space for a Markov chain Monte Carlo analysis, for example. This simplification is due to computing products of Wigner -symbols in terms of Wigner -matrices.

class_delens's People

Contributors

lesgourg avatar marchidiacono avatar baudren avatar thomastram avatar dchooper avatar samuelbrieden avatar schoeneberg avatar selimhotinli avatar benabed avatar bohr-s avatar marius311 avatar jesustorrado avatar ohahn avatar sbird avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.