pyccl.halos.profiles_2pt module
- class pyccl.halos.profiles_2pt.Profile2pt(self, *, r_corr=0.0)[source]
Bases:
CCLAutoRepr
This class implements the 1-halo 2-point correlator between two halo profiles.
\[\langle u_1(k) u_2(k) \rangle.\]In the simplest case the second-order cumulant is just the product of the individual Fourier-space profiles. More complicated cases are implemented via the parameters of this class.
- Parameters:
r_corr (
float
) – Tuning knob for the 1-halo 2-point correlation. Scale the correlation by \((1+\rho_{u_1, u_2})\). This is useful when the individual 1-halo terms are not fully correlated. Example usecases can be found inarXiv:1909.09102
andarXiv:2102.07701
. Defaults tor_corr=0
, returning simply the product of the fourier profiles.
- update_parameters(*, r_corr=None)[source]
Update any of the parameters associated with this 1-halo 2-point correlator. Any parameter set to
None
won’t be updated.
- fourier_2pt(cosmo, k, M, a, prof, *, prof2=None, diag=True)[source]
Return the Fourier-space two-point moment between two profiles.
\[(1+\rho_{u_1,u_2})\langle u_1(k)\rangle\langle u_2(k) \rangle\]- Parameters:
cosmo (
Cosmology
) – a Cosmology object.k (
float
or array) – comoving wavenumber in Mpc^-1.M (
float
or array) – halo mass in units of M_sun.a (
float
) – scale factor.prof (
HaloProfile
) – halo profile for which the second-order moment is desired.prof2 (
HaloProfile
) – second halo profile for which the second-order moment is desired. IfNone
, the assumption is that you want an auto-correlation, and prof will be used as prof2.diag (bool) – If True, both halo profiles depend on the same k. If
False –
k' (they will depend on k and) –
output (respectively. The) –
` (dimension will change to) –
- Returns:
second-order Fourier-space moment. The shape of the output will be (N_M, N_k) where N_k and N_m are the sizes of k and M respectively, if diag is True. If False, the array will have dimension (N_M, N_k, N_k), with k’ corresponding to the second axis of the array.. If k or M are scalars, the corresponding dimension will be squeezed out on output.
- Return type:
(
float
or array)
- class pyccl.halos.profiles_2pt.Profile2ptHOD(self, *, r_corr=0.0)[source]
Bases:
Profile2pt
This class implements the Fourier-space 1-halo 2-point correlator for the HOD profile.
\[\langle n_g^2(k)|M,a\rangle = \bar{N}_c(M,a) \left[2f_c(a)\bar{N}_s(M,a) u_{\rm sat}(r|M,a)+ (\bar{N}_s(M,a) u_{\rm sat}(r|M,a))^2\right],\]where all quantities are described in the documentation of
HaloProfileHOD
.- fourier_2pt(cosmo, k, M, a, prof, *, prof2=None, diag=True)[source]
Returns the Fourier-space two-point moment for the HOD profile.
- Parameters:
cosmo (
Cosmology
) – a Cosmology object.k (
float
or array) – comoving wavenumber in Mpc^-1.M (
float
or array) – halo mass in units of M_sun.a (
float
) – scale factor.prof (
HaloProfileHOD
) – halo profile for which the second-order moment is desired.prof2 (
HaloProfileHOD
orNone
) – second halo profile for which the second-order moment is desired. IfNone
, the assumption is that you want an auto-correlation. Note that only auto-correlations are allowed in this case.diag (bool) – If True, both halo profiles depend on the same k. If False, they will depend on k and k’, respectively and we will approximate <uk uk’> to <uk><uk’>. The output dimension will change to (N_M, N_k, N_k). Default True.
- Returns:
second-order Fourier-space moment. The shape of the output will be (N_M, N_k) where N_k and N_m are the sizes of k and M respectively, if diag is True. If False, the array will have dimension (N_M, N_k, N_k), with k’ corresponding to the second axis of the array.. If k or M are scalars, the corresponding dimension will be squeezed out on output.
- Return type:
(
float
or array)
- class pyccl.halos.profiles_2pt.Profile2ptCIB(self, *, r_corr=0.0)[source]
Bases:
Profile2pt
This class implements the Fourier-space 1-halo 2-point correlator for the CIB profile. It follows closely the implementation of the equivalent HOD quantity (see
Profile2ptHOD
and Eq. 15 of McCarthy & Madhavacheril).- fourier_2pt(cosmo, k, M, a, prof, *, prof2=None, diag=True)[source]
Returns the Fourier-space two-point moment for the CIB profile.
- Parameters:
cosmo (
Cosmology
) – a Cosmology object.k (
float
or array) – comoving wavenumber in Mpc^-1.M (
float
or array) – halo mass in units of M_sun.a (
float
) – scale factor.prof (
HaloProfileCIBShang12
) – halo profile for which the second-order moment is desired.prof2 (
HaloProfileCIBShang12
) – second halo profile for which the second-order moment is desired. IfNone
, the assumption is that you want an auto-correlation. Note that only auto-correlations are allowed in this case.diag (bool) – If True, both halo profiles depend on the same k. If False, they will depend on k and k’, respectively and we will approximate <uk uk’> to <uk><uk’>. The output dimension will change to (N_M, N_k, N_k). Default True.
- Returns:
second-order Fourier-space moment. The shape of the output will be (N_M, N_k) where N_k and N_m are the sizes of k and M respectively, if diag is True. If False, the array will have dimension (N_M, N_k, N_k), with k’ corresponding to the second axis of the array. If k or M are scalars, the corresponding dimension will be squeezed out on output.
- Return type:
(
float
or array)