tjpcov.covariance_cluster_mass
==============================

.. py:module:: tjpcov.covariance_cluster_mass


Classes
-------

.. autoapisummary::

   tjpcov.covariance_cluster_mass.ClusterMass


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

.. py:class:: ClusterMass(config, min_halo_mass=10000000000000.0)

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


   Calculate the covariance of cluster mass measurements.

   This class is able to compute the covariance for
   `_tracers_types = ("cluster_mean_log_mass", "cluster_mean_log_mass")`

   Class to calculate the covariance of cluster mass measurements.

   :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
   :param min_halo_mass: Minimum halo mass.
   :type min_halo_mass: float, optional


   .. py:attribute:: space_type
      :value: 'Fourier'



   .. py:attribute:: cov_type
      :value: 'gauss'



   .. py:attribute:: _tracer_types

      Tuple with the tracer types (e.g. ("cl", "cl")).

      This is used to decide if the block covariance should be computed or is
      zero. For instance, if the class is meant to produce the covariance for
      Cells and the tracer types are clusters, the class should return 0.


   .. py:attribute:: overdensity_delta
      :value: 200



   .. py:attribute:: h0


   .. py:attribute:: fft_helper


   .. py:attribute:: covariance_block_data_type

      The covariance block data type for your builder.

      :returns: Covariance block sacc data type
      :rtype: str


   .. py:method:: load_from_cosmology(cosmo)

      Load parameters from a CCL cosmology object.

      Derived attributes from the cosmology are set here.

      :param cosmo: Input cosmology
      :type cosmo: :obj:`pyccl.Cosmology`



   .. py:method:: load_from_sacc(sacc_file, min_halo_mass)

      Load and set class attributes based on data from a SACC file.

      Cluster covariance has special parameters set in the SACC file. This
      informs the code that the data to calculate the cluster covariance is
      there.  We set extract those values from the sacc file here, and set
      the attributes here.

      :param sacc_file (: obj: `sacc.sacc.Sacc`): SACC file object, already
      :param loaded.:



   .. py:method:: _get_covariance_block_for_sacc(tracer_comb1, tracer_comb2, **kwargs)

      Compute a single covariance entry 'cluster_mean_log_mass'

      :param tracer_comb1: e.g.
                           ('survey', 'bin_z_0', 'bin_richness_1')
      :type tracer_comb1: `tuple` of str
      :param tracer_comb2: e.g.
                           ('survey', 'bin_z_0', 'bin_richness_0')
      :type tracer_comb2: `tuple` of str

      :returns: Covariance for a single block
      :rtype: array_like



   .. py:method:: get_covariance_block(tracer_comb1, tracer_comb2, **kwargs)

      Compute a single covariance entry 'cluster_mean_log_mass'

      :param tracer_comb1: e.g.
                           ('survey', 'bin_richness_1', 'bin_z_0')
      :type tracer_comb1: `tuple` of str
      :param tracer_comb2: e.g.
                           ('survey', 'bin_richness_0', 'bin_z_0')
      :type tracer_comb2: `tuple` of str

      :returns: Covariance for a single block
      :rtype: array_like



   .. py:method:: _get_covariance_gaussian(tracer_comb1, tracer_comb2)

      Compute a single covariance entry 'cluster_mean_log_mass'

      :param tracer_comb1: e.g.
                           ('survey', 'bin_richness_1', 'bin_z_0')
      :type tracer_comb1: `tuple` of str
      :param tracer_comb2: e.g.
                           ('survey', 'bin_richness_0', 'bin_z_0')
      :type tracer_comb2: `tuple` of str

      :returns: Covariance for a single block
      :rtype: float



