tjpcov.covariance_fourier_cNG#

Classes#

FouriercNGHaloModel

Class to compute the CellxCell Halo Model cNG Covariance.

Module Contents#

class tjpcov.covariance_fourier_cNG.FouriercNGHaloModel(config)[source]#

Bases: tjpcov.covariance_builder.CovarianceFourier

Class to compute the CellxCell Halo Model cNG Covariance.

Initialize the class with a config file or dictionary.

Parameters:

config (dict or str) – If dict, it returns the configuration dictionary directly. If string, it asumes a YAML file and parses it.

cov_type = 'cNG'[source]#
cNG_conf[source]#
HOD_dict[source]#
_get_fsky(tr=None)[source]#

Returns the fractional sky area from the mean survey masks.

Parameters:

masks (dict) – dictionary containing the survey tracers to obtain the survey mask.

Returns:

fractional sky area.

Return type:

get_covariance_block(tracer_comb1, tracer_comb2, integration_method=None, include_b_modes=True)[source]#

Compute a single cNG covariance matrix for a given pair of C_ell.

If outdir is set, it will save the covariance to a file called cng_tr1_tr2_tr3_tr4.npz. This file will be read and its output returned if found.

Blocks of the B-modes are assumed 0 so far.

Parameters:
  • tracer_comb1 (list) – List of the pair of tracer names of C_ell^1

  • tracer_comb2 (list) – List of the pair of tracer names of C_ell^2

  • integration_method (str, optional) – integration method to be used for the Limber integrals. Possibilities: ‘qag_quad’ (GSL’s qag method backed up by quad when it fails) and ‘spline’ (the integrand is splined and then integrated analytically). If given, it will take priority over the specified in the configuration file through config[‘cNG’][‘integration_method’]. Elsewise, it will use ‘qag_quad’.

  • include_b_modes (bool, optional) – If True, return the full cNG with zeros in for B-modes (if any). If False, return the non-zero block. This option cannot be modified through the configuration file to avoid breaking the compatibility with the NaMaster covariance. Defaults to True.

Returns:

Connected NG covariance matrix for a pair of C_ell.

Return type:

array