config

module reference

dlensalot_mm

dlensalot_mm.py: Contains classes defining the metamodel of the Dlensalot formalism. The metamodel is a structured representation, with the DLENSALOT_Model as the main building block. We use the attr package. It provides handy ways of validation and defaulting.

class delensalot.config.metamodel.dlensalot_mm.DLENSALOT_Analysis

A root model element type of the Dlensalot formalism. This class collects all configurations related to the specific analysis performed on the data.

key

reconstruction estimator key

Type:

str

version

specific configuration for the esimator (e.g. noMF, which turns off mean-field subtraction)

Type:

str

simidxs

simulation indices to use for the delensalot job

Type:

np.array[int]

simidxs_mf

simulation indices to use for the calculation of the mean-field

Type:

np.array[int]

TEMP_suffix

identifier to customize TEMP directory of the analysis

Type:

str

Lmin

minimum L for reconstructing the lensing potential

Type:

int

zbounds

latitudinal boundary (-1 to 1), or identifier together with noise level ratio treshold at which lensing reconstruction is perfromed.

Type:

tuple[int or str,float]

zbounds_len

latitudinal extended boundary at which lensing reconstruction is performed, and used for iterative lensing reconstruction

Type:

tuple[int]

lm_max_ivf

maximum ell and m for which inverse variance filtering is done

Type:

tuple[int]

lm_max_blt

maximum ell and m for which B-lensing template is calculated

Type:

tuple[int]

mask

TBD

Type:

list[str]

lmin_teb

minimum ell and m of the data which the reconstruction uses, and is set to zero below via the transfer function

Type:

int

cls_unl

path to the fiducial unlensed CAMB-like CMB data

Type:

str

cls_len

path to the fiducial lensed CAMB-like CMB data

Type:

str

cpp

path to the power spectrum of the prior for the iterative reconstruction

Type:

str

beam

The beam used in the filters

Type:

float

class delensalot.config.metamodel.dlensalot_mm.DLENSALOT_Itrec

A root model element type of the Dlensalot formalism. This class collects all configurations related to the iterative reconstruction job.

tasks

tasks to perfrom. Can be any combination of calc_phi, calc_meanfield, calc_blt

Type:

list[str]

itmax

maximum number of iterations

Type:

int

cg_tol

tolerance of the conjugate gradient method

Type:

float

iterator_typ

mean-field handling identifier. Can be either ‘const_mf’ or ‘pert_mf’

Type:

str

chain

configuration for the conjugate gradient solver

Type:

DLENSALOT_Chaindescriptor

filter_directional

can be either ‘isotropic’ (unmasked sky) or ‘isotropic’ (masked sky)

Type:

str

lenjob_geominfo

can be ‘healpix_geominfo’, ‘thin_gauss’ or ‘pbdGeometry’

Type:

str

lenjob_pbgeominfo

can be ‘healpix_geominfo’, ‘thin_gauss’ or ‘pbdGeometry’

Type:

str

lm_max_unl

maximum multipoles ell and m for reconstruction the unlensed CMB

Type:

tuple[int]

lm_max_qlm

maximum multipoles L and m for reconstruction the lensing potential

Type:

tuple[int]

mfvar

path to precalculated mean-field, to be used instead

Type:

str

soltn_cond

TBD

Type:

type

stepper

configuration for updating the current likelihood iteration point with the likelihood gradient

Type:

DLENSALOT_STEPPER

class delensalot.config.metamodel.dlensalot_mm.DLENSALOT_Job

A root model element type of the Dlensalot formalism. delensalot can executte different jobs (QE reconstruction, simulation generation, MAP reconstruction, delensing, ..) which is controlled here.

jobs

Job identifier(s)

Type:

list[str]

class delensalot.config.metamodel.dlensalot_mm.DLENSALOT_Mapdelensing

A root model element type of the Dlensalot formalism. This class collects all configurations related to the internal map delensing job.

data_from_CFS

if set, use B-lensing templates located at the $CFS directory instead of the $TEMP directory

Type:

bool

edges

binning to calculate the (delensed) power spectrum on

Type:

np.array

dlm_mod

if set, modfies the lensing potential before calculating the B-lensing template

Type:

bool

iterations

which iterations to calculate delensed power spectrum for

Type:

list[int]

nlevels

noiselevel ratio treshold up to which the maps are delensed, uses the rhits_normalized map to generate masks.

Type:

list[float]

lmax

maximum multipole to calculate the (delensed) power spectrum

Type:

int

Cl_fid

fiducial power spectrum, and needed for template calculation of the binned power spectrum package

Type:

type

libdir_it

TBD

Type:

type

binning

can be either ‘binned’ or ‘unbinned’. If ‘unbinned’, overwrites edges and calculates power spectrum for each multipole

Type:

type

spectrum_calculator

name of the package of the power spectrum calculator. Can be ‘healpy’ if binning=unbinned

Type:

package

masks_fn

the sky patches to calculate the power spectra on. Note that this is different to using nlevels. Here, no tresholds are calculated, but masks are used ‘as is’ for delensing.

Type:

list[str]

basemap

the delensed map Bdel is calculated as Bdel = basemap - blt. Basemap can be two things: ‘obs’ or ‘lens’, where ‘obs’ will use the observed sky map, and lens will use the pure B-lensing map.

Type:

str

class delensalot.config.metamodel.dlensalot_mm.DLENSALOT_Model

A root model element type of the Dlensalot formalism.

defaults_to

Identifier for default-dictionary if user hasn’t specified value in configuration file

Type:

str

meta

configurations related to internal behaviour of delensalot

Type:

DLENSALOT_Meta

job

delensalot can executte different jobs (QE reconstruction, simulation generation, MAP reconstruction, delensing, ..) which is controlled here

Type:

DLENSALOT_Job

analysis

configurations related to the specific analysis performed on the data

Type:

DLENSALOT_Analysis

data

configurations related to the input CMB maps

Type:

DLENSALOT_Data

noisemodel

configurations related to the noise model used for Wiener-filtering the data

Type:

DLENSALOT_Noisemodel

qerec

configurations related to the quadratic estimator reconstruction job

Type:

DLENSALOT_Qerec

itrec

configurations related to the iterative reconstruction job

Type:

DLENSALOT_Itrec

madel

configurations related to the internal map delensing job

Type:

DLENSALOT_Mapdelensing

config

configurations related to general behaviour to the operating system

Type:

DLENSALOT_Config

computing

configurations related to the usage of computing resources

Type:

DLENSALOT_Computing

obd

configurations related to the overlapping B-mode deprojection

Type:

DLENSALOT_OBD

class delensalot.config.metamodel.dlensalot_mm.DLENSALOT_Noisemodel

A root model element type of the Dlensalot formalism. This class collects all configurations related to the noise model used for Wiener-filtering the data.

sky_coverage

Can be either ‘masked’ or ‘unmasked’

Type:

str

spectrum_type

TBD

Type:

str

OBD

OBD identifier. Can be ‘OBD’, ‘trunc’, or None. Defines how lowest B-modes will be handled.

Type:

str

nlev_t

(central) noise level of temperature data in muK arcmin.

Type:

float

nlev_p

(central) noise level of polarization data in muK arcmin.

Type:

float

rhits_normalised

path to the hits-count map, used to calculate the noise levels, and the mask tracing the noise level. Second entry in tuple is the <inverse hits-count multiplier>.

Type:

str

geominfo

geominfo of the noise map

Type:

tuple

class delensalot.config.metamodel.dlensalot_mm.DLENSALOT_Qerec

A root model element type of the Dlensalot formalism. This class collects all configurations related to the quadratic estimator reconstruction job.

tasks

tasks to perfrom. Can be any combination of calc_phi, calc_meanfield, calc_blt

Type:

list[tuple]

qlm_type

lensing potential estimator identifier. Can be ‘sepTP’ or ‘jTP’

Type:

str

cg_tol

tolerance of the conjugate gradient method

Type:

float

filter_directional

can be either ‘isotropic’ (unmasked sky) or ‘isotropic’ (masked sky)

Type:

str

lm_max_qlm

maximum multipole ell and m to reconstruct the lensing potential

Type:

type

chain

configuration of the conjugate gradient method. Configures the chain and preconditioner

Type:

DLENSALOT_Chaindescriptor

cl_analysis

If tru, performs lensing power spectrum analysis

Type:

bool

blt_pert

If True, delensing is performed perurbitivly (recommended)

Type:

bool

class delensalot.config.metamodel.dlensalot_mm.DLENSALOT_Simulation

A root model element type of the Dlensalot formalism. This class collects all configurations related to the input maps, and values can differ from the noise model and analysis.

flavour

Can be in [‘obs’, ‘sky’, ‘unl’] and defines the type of data provided.

Type:

str

space

Can be in [‘map’, ‘alm’, ‘cl’] and defines the space of the data provided.

Type:

str

maps

These maps will be put into the cacher directly. They are used for settings in which no data is generated or accesed on disk, but directly provided (like in delensalot.anafast()) Defaults to DNaV.

Type:

np.array, optional

geominfo

Lenspyx geominfo descriptor, describes the geominfo of the data provided (e.g. `(‘healpix’, ‘nside’: 2048)). Defaults to DNaV.

Type:

tuple, optional

field

the type of data provided, can be in [‘temperature’, ‘polarization’]. Defaults to DNaV.

Type:

str, optional

libdir

directory of the data provided. Defaults to DNaV.

Type:

str, optional

libdir_noise

directory of the noise provided. Defaults to DNaV.

Type:

str, optional

libdir_phi

directory of the lensing potential provided. Defaults to DNaV.

Type:

str, optional

fns

file names of the data provided. It expects {‘T’: <filename{simidx}.something>, ‘Q’: <filename{simidx}.something>, ‘U’: <filename{simidx}.something>}, where {simidx} is used by the libraries to format the simulation index into the name. Defaults to DNaV.

Type:

dict with str with formatter, optional

fnsnoise

file names of the noise provided. It expects {‘T’: <filename{simidx}.something>, ‘Q’: <filename{simidx}.something>, ‘U’: <filename{simidx}.something>}, where {simidx} is used by the libraries to format the simulation index into the name. Defaults to DNaV.

Type:

dict with str with formatter, optional

fnsP

file names of the lensing potential provided. It expects <filename{simidx}.something>, where `{simidx} is used by the libraries to format the simulation index into the name. Defaults to DNaV.

Type:

str with formatter, optional

lmax

Maximum l of the data provided. Defaults to DNaV.

Type:

int, optional

transfunction

transfer function. Defaults to DNaV.

Type:

np.array, optional

nlev

noise level of the individual fields. It expects `{‘T’: <value>, ‘P’: <value>}. Defaults to DNaV.

Type:

dict, optional

spin

the spin of the data provided. Defaults to 0. Always defaults to 0 for temperature.

Type:

int, optional

CMB_fn

path+name of the file of the power spectra of the CMB. Defaults to DNaV.

Type:

str, optional

phi_fn

path+name of the file of the power spectrum of the lensing potential. Defaults to DNaV.

Type:

str, optional

phi_field

the type of potential provided, can be in [‘potential’, ‘deflection’, ‘convergence’]. This simulation library will automatically rescale the field, if needded. Defaults to DNaV.

Type:

str, optional

phi_space

can be in [‘map’, ‘alm’, ‘cl’] and defines the space of the lensing potential provided.. Defaults to DNaV.

Type:

str, optional

phi_lmax

the maximum multipole of the lensing potential. if simulation library perfroms lensing, it is advisable that phi_lmax is somewhat larger than lmax (+ ~512-1024). Defaults to DNaV.

Type:

_type_, optional

epsilon

Lenspyx lensing accuracy. Defaults to 1e-7.

Type:

float, optional