tjpcov.clusters_helpers
=======================

.. py:module:: tjpcov.clusters_helpers


Classes
-------

.. autoapisummary::

   tjpcov.clusters_helpers.MassRichnessRelation
   tjpcov.clusters_helpers.FFTHelper


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

.. py:class:: MassRichnessRelation

   Bases: :py:obj:`object`


   Helper class to hold different mass richness relations


   .. py:method:: MurataCostanzi(ln_true_mass, h0)
      :staticmethod:


      Uses constants from Murata et al - ArxIv 1707.01907 and Costanzi
      et al ArxIv 1810.09456v1 to derive the log-normal mass-richness
      relation

      :param ln_true_mass: True mass
      :type ln_true_mass: float
      :param h0: Hubble's constant
      :type h0: float

      :returns: The parameterized average and spread of the
                log-normal mass-richness relation
      :rtype: `tuple` of float



.. py:class:: FFTHelper(cosmo, z_min, z_max)

   Bases: :py:obj:`object`


   Cluster covariance needs to use fast fourier transforms in combination
   with numerical approximations to evaluate rapidly oscillating integrals
   that appear in the calculation of the covariance.  These are stored in this
   helper class.

   Constructor for the FFTHelper class

   :param cosmo: Input cosmology
   :type cosmo: :obj:`pyccl.Cosmology`
   :param z_min: Lower bound on redshift integral
   :type z_min: float
   :param z_max: Upper bound on redshift integral
   :type z_max: float


   .. py:attribute:: bias_fft
      :value: 1.4165



   .. py:attribute:: k_min
      :value: 0.0001



   .. py:attribute:: k_max
      :value: 3



   .. py:attribute:: N
      :value: 1024



   .. py:attribute:: cosmo


   .. py:method:: _set_fft_params(z_min, z_max)

      The numerical implementation of the FFT needs some values
      set by some simple calculations.  Those are performed here.

      See Eqn 7.16 N. Ferreira disseration.

      :param z_min: Lower bound on redshift integral
      :type z_min: float
      :param z_max: Upper bound on redshift integral
      :type z_max: float



   .. py:method:: two_fast_algorithm(z1, z2)

      2-FAST algorithm implementation used to evaluate the double bessel
      integral.  See https://arxiv.org/pdf/1709.02401v3.pdf for more details

      See Eqn 7.4 of N. Ferreira

      :param z1: Lower redshift bound
      :type z1: float
      :param z2: Upper redshift bound
      :type z2: float

      :returns: Numerical approximation of double bessel function
      :rtype: float



   .. py:method:: _I_ell_algorithm(i, ratio)

      Calculating the function M_0_0 the formula below only valid for
      R <=1, l = 0, formula B2 ASZ and 31 from 2-fast paper
      https://arxiv.org/pdf/1709.02401v3.pdf

      :param i: iteration
      :type i: int
      :param ratio: Ratio between comoving coordinates
      :type ratio: float

      :returns: Fourier transform of spherical bessel function
      :rtype: float



