tjpcov.covariance_fourier_cNG
=============================

.. py:module:: tjpcov.covariance_fourier_cNG


Classes
-------

.. autoapisummary::

   tjpcov.covariance_fourier_cNG.FouriercNGHaloModel


Module Contents
---------------

.. py:class:: FouriercNGHaloModel(config)

   Bases: :py:obj:`tjpcov.covariance_builder.CovarianceFourier`


   Class to compute the CellxCell Halo Model cNG Covariance.

   Initialize the class with a config file or dictionary.

   :param config: If dict, it returns the configuration
                  dictionary directly. If string, it asumes a YAML file and
                  parses it.
   :type config: dict or str


   .. py:attribute:: cov_type
      :value: 'cNG'



   .. py:attribute:: cNG_conf


   .. py:attribute:: HOD_dict


   .. py:method:: _get_fsky(tr=None)

      Returns the fractional sky area from the mean survey masks.

      :param masks: dictionary containing the survey
                    tracers to obtain the survey mask.
      :type masks: :obj:`dict`

      :returns: fractional sky area.
      :rtype: - (:obj:`float`)



   .. py:method:: get_covariance_block(tracer_comb1, tracer_comb2, integration_method=None, include_b_modes=True)

      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.

      :param tracer_comb1: List of the pair of tracer names of C_ell^1
      :type tracer_comb1: list
      :param tracer_comb2: List of the pair of tracer names of C_ell^2
      :type tracer_comb2: list
      :param integration_method: 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'.
      :type integration_method: str, optional
      :param include_b_modes: 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.
      :type include_b_modes: bool, optional

      :returns: Connected NG covariance matrix for a pair of C_ell.
      :rtype: array



