halomod.wdm.ProjectedCFWDM

class halomod.wdm.ProjectedCFWDM(*args, **kwargs)[source]

Bases: ProjectedCF, HaloModelWDM

Projected Correlation Function for WDM halos.

ERROR_ON_BAD_MDEF = True

Switch to turn off exceptions for mdef’s not matching hmf_model

property Mmax

Maximum mass at which to perform analysis [units \(\log_{10}M_\odot h^{-1}\)].

Type:

float

Type:

Parameter

property Mmin

Minimum mass at which to perform analysis [units \(\log_{10}M_\odot h^{-1}\)].

Type:

float

Type:

Parameter

property alter_model

A model for empirical recalibration of the HMF.

Type:

None, str, or :class`WDMRecalibrateMF` subclass.

Type:

Parameter

property alter_params

Model parameters for alter_model.

Type:

Parameter

property bias

The halo bias as a function of halo mass.

property bias_effective_matter: float

The effective bias of matter in DM halos.

This should be unity for models in which all dark matter is encapsulated in halos. However, sometimes the pair of HMF/bias models chosen are not pairs in the peak-background split sense, and will not (even in principle) yield an integral of unity. Also, even when in principle the value should be unity, the numerical integral is over a limited range of mass, and will generally not account for all the mass in the Universe.

To account for this, if force_unity_dm_bias is True, the returned bias will be unity if the bias/HMF models are a pair. If they are not a pair, we still somewhat account for the limited mass range by returning the integral normalized by the mean density in halos greater than our minimum mass.

If force_unity_dm_bias is False, none of these fudges are performed.

property bias_effective_tracer

The tracer occupation-weighted halo bias factor (Tinker 2005).

property bias_model

Bias Model.

Type:

Parameter

property bias_params

Dictionary of parameters for the Bias model.

Type:

Parameter

property bias_smooth

Bias of smooth component of the field.

Eq. 35 from Smith and Markovic 2011.

property central_fraction

The total fraction of tracers that are centrals.

Note: This may not exist for every kind of tracer.

property central_occupation

The mean central occupation of the tracer as a function of halo mass.

clone(**kwargs)

Create and return an updated clone of the current object.

property cmz_relation

Concentration-mass-redshift relation.

property colossus_cosmo

An instance of a COLOSSUS cosmology, which can be used to perform various COLOSSUS operations.

property colossus_params

Options for colossus cosmology not set/derived in the astropy cosmology.

Type:

Parameter

property corr_1h_auto_matter

The halo model 1-halo dark matter auto-correlation function.

property corr_1h_auto_matter_fnc

A callable returning the halo model 1-halo DM auto-correlation function.

property corr_1h_auto_tracer

The 1-halo term of the tracer auto correlations.

property corr_1h_auto_tracer_fnc

A callable returning the 1-halo term of the tracer auto correlations.

property corr_1h_cross_tracer_matter

The 1-halo term of the cross correlation between tracer and matter.

property corr_1h_cross_tracer_matter_fnc

A callable returning the 1-halo cross-corr between tracer and matter.

property corr_1h_cs_auto_tracer

The cen-sat part of the 1-halo term of the tracer auto-correlation function.

Note: May not exist for every kind of tracer.

property corr_1h_cs_auto_tracer_fnc

A callable returning the cen-sat part of the 1-halo term of the tracer auto-correlation function.

Note: May not exist for every kind of tracer.

property corr_1h_ss_auto_tracer

The satellite-satellite part of the 1-halo term of the tracer auto-correlation function.

Note: May not exist for every kind of tracer.

property corr_1h_ss_auto_tracer_fnc

A callable returning the satellite-satellite part of the 1-halo term of the tracer auto-correlation function.

Note: May not exist for every kind of tracer.

property corr_2h_auto_matter: Callable[[float | ndarray], float | ndarray]

The 2-halo term of the matter auto-correlation.

property corr_2h_auto_matter_fnc: Callable[[float | ndarray], float | ndarray]

A callable returning the 2-halo term of the matter auto-correlation at arbitrary k.

property corr_2h_auto_tracer

The 2-halo term of the tracer auto-correlation.

property corr_2h_auto_tracer_fnc

A callable returning the 2-halo term of the tracer auto-correlation.

property corr_2h_cross_tracer_matter

The 2-halo term of the cross-correlation between tracer and matter.

property corr_2h_cross_tracer_matter_fnc

A callable returning the 2-halo cross-corr between tracer and matter.

property corr_auto_matter

The halo-model-derived nonlinear dark matter auto-correlation function.

property corr_auto_matter_fnc

A callable returning the halo-model DM auto-correlation function.

property corr_auto_tracer

The tracer auto correlation function.

property corr_auto_tracer_fnc

A callable returning the tracer auto correlation function.

property corr_cross_tracer_matter

Cross-correlation of tracer with matter.

property corr_cross_tracer_matter_fnc

A callable returning the cross-correlation of tracer with matter.

property corr_halofit_mm

The nonlinear (from halofit) auto-correlation function of dark matter.

property corr_halofit_mm_fnc

A callable returning the nonlinear auto-correlation function of dark matter.

property corr_linear_mm

The linear auto-correlation function of dark matter.

property corr_linear_mm_fnc

A callable returning the linear auto-correlation function of dark matter.

property cosmo

Cosmographic object (astropy.cosmology.FLRW object), with custom cosmology from cosmo_params applied.

property cosmo_model

The basis for the cosmology – see astropy documentation. Can be a custom subclass. Defaults to Planck18.

Type:

instance of astropy.cosmology.FLRW subclass

Type:

Parameter

property cosmo_params

Parameters for the cosmology that deviate from the base cosmology passed. This is useful for repeated updates of a single parameter (leaving others the same). Default is the empty dict. The parameters passed must match the allowed parameters of cosmo_model. For the basic class this is

Tcmb0:

Temperature of the CMB at z=0

Neff:

Number of massless neutrino species

M_nu:

Mass of neutrino species (list)

H0:

The hubble constant at z=0

Om0:

The normalised matter density at z=0

Type:

dict

Type:

Parameter

property delta_c

The critical overdensity for collapse, \(\delta_c\).

Type:

float

Type:

Parameter

property delta_k

Dimensionless power spectrum, \(\Delta_k = \frac{k^3 P(k)}{2\pi^2}\).

property disable_mass_conversion

Disable converting mass function from builtin definition to that provided.

Type:

bool

Type:

Parameter

property dlnk

Step-size of log wave-numbers

Type:

float

Type:

Parameter

property dlog10m

log10 interval between mass bins

Type:

float

Type:

Parameter

property dndlnm

The differential mass function in terms of natural log of m, len=len(m) [units \(h^3 Mpc^{-3}\)]

property dndlog10m

The differential mass function in terms of log of m, len=len(m) [units \(h^3 Mpc^{-3}\)]

property dndm

The number density of haloes in WDM, len=len(m).

Units of \(h^4 M_\odot^{-1} Mpc^{-3}\)

property dr_table

The width of r bin.

Type:

Parameter

property exclusion_model

A string identifier for the type of halo exclusion used (or None).

Type:

Parameter

property exclusion_params

Dictionary of parameters for the Exclusion model.

Type:

Parameter

property f_halos

The total fraction of mass bound up in halos.

property filter

Instantiated model for filter/window functions.

Note that this filter is not normalised – i.e. the output of filter.sigma(8) will not be the input sigma_8.

property filter_model

A model for the window/filter function.

Type:

hmf.filters.Filter subclass

Type:

Parameter

property filter_params

Model parameters for filter_model.

Type:

dict

Type:

Parameter

property force_1halo_turnover

Suppress 1-halo power on scales larger than a few virial radii.

Type:

Parameter

property fsigma

The multiplicity function, \(f(\sigma)\), for hmf_model. len=len(m)

classmethod get_all_parameter_defaults(recursive=True)

Dictionary of all parameters and defaults.

classmethod get_all_parameter_names()

Yield all parameter names in the class.

get_dependencies(*q)

Determine all parameter dependencies of the quantities in q.

Parameters:

q (str) – String(s) labelling a quantity

Returns:

deps – A set containing all parameters on which quantities in q are dependent.

Return type:

set

property growth

The instantiated growth model.

property growth_factor

The growth factor.

property growth_model

The model to use to calculate the growth function/growth rate.

Type:

hmf.growth_factor._GrowthFactor subclass

Type:

Parameter

property growth_params

Relevant parameters of the growth_model.

Type:

dict

Type:

Parameter

property halo_bias

Halo bias.

property halo_concentration

Halo Concentration.

property halo_concentration_model

A halo_concentration-mass relation.

Type:

Parameter

property halo_concentration_params

Dictionary of parameters for the concentration model.

Type:

Parameter

property halo_overdensity_crit

The halo overdensity with respect to the critical density.

property halo_overdensity_mean

The halo overdensity with respect to the mean background.

property halo_profile

A class containing the elements necessary to calculate halo halo_profile quantities.

property halo_profile_lam

Mass-normalised halo profile self-convolution, with shape (len(r), len(m)).

property halo_profile_model

The halo density halo_profile model.

Type:

Parameter

property halo_profile_params

Dictionary of parameters for the Profile model.

Type:

Parameter

property halo_profile_rho

Mass-normalised halo density profile, with shape (len(r), len(m)).

property halo_profile_ukm

Mass-normalised fourier halo profile, with shape (len(k), len(m)).

property hc_spectrum

The spectrum with which the halo-centre power spectrum is identified.

Choices are ‘linear’, ‘nonlinear’, ‘filtered-lin’ or ‘filtered-nl’. ‘filtered’ spectra are filtered with a real-space top-hat window function at a scale of 2 Mpc/h, which ensures that haloes do not overlap on scales small than this.

Type:

Parameter

property hm_dlog10k

The width of k bin in log10.

Type:

Parameter

property hm_logk_max

The maximum k bin in log10.

Type:

Parameter

property hm_logk_min

The minimum k bin in log10.

Type:

Parameter

property hmf

Instantiated model for the hmf fitting function.

property hmf_model

A model to use as the fitting function \(f(\sigma)\)

Type:

str or hmf.fitting_functions.FittingFunction subclass

Type:

Parameter

property hmf_params

Model parameters for hmf_model.

Type:

dict

Type:

Parameter

property hod

A class representing the HOD.

property hod_model

HOD class.

Type:

Parameter

property hod_params

Dictionary of parameters for the HOD model.

Type:

Parameter

property how_big

Size of simulation volume in which to expect one halo of mass m (with 95% probability), ` len=len(m)` [units \(Mpch^{-1}\)]

property k

Wavenumbers, [h/Mpc]

property k_hm

The wave-numbers at which halo-model power spectra are calculated.

Typically smaller in range than k for linear theory.

property linear_power_fnc

A callable returning the linear power as a function of k (in h/Mpc).

property lnk_max

Maximum (natural) log wave-number, k [h/Mpc].

Type:

float

Type:

Parameter

property lnk_min

Minimum (natural) log wave-number, k [h/Mpc].

Type:

float

Type:

Parameter

property lnsigma

Natural log of inverse mass variance, len=len(m).

property m

Halo masses (defined via mdef).

property mass_effective

Average host-halo mass (in log10 units).

property mass_nonlinear

The nonlinear mass, nu(Mstar) = 1.

property mdef: MassDefinition

The halo mass-definition model instance.

Default mass definition is the one the chosen hmf model was measured with.

property mdef_model

A model to use as the mass definition.

Type:

str or hmf.halos.mass_definitions.MassDefinition subclass

Type:

Parameter

property mdef_params

Model parameters for mdef_model. :type: dict

Type:

Parameter

property mean_density

Mean density of universe at redshift z.

property mean_density0

Mean density of universe at z=0, [Msun h^2 / Mpc**3]

property mean_density_halos

Mean density of matter in halos.

property mean_density_in_halos
property mean_density_smooth

Mean density of matter outside halos.

property mean_tracer_den

The mean density of the tracer.

This is always the integrated density. If tracer_density is supplied to the constructor, that value can be found as tracer_density(). It should be very close to this value.

property mean_tracer_den_unit

The mean density of the tracer, in the units defined in the HOD.

property n

Spectral index of fluctuations

Must be greater than -3 and less than 4.

Type:

float

Type:

Parameter

property n_eff

Effective spectral index at scale of halo radius, len=len(m)

Notes

This function, and any derived quantities, can show small non-physical ‘wiggles’ at the 0.1% level, if too coarse a grid in ln(k) is used. If applications are sensitive at this level, please use a very fine k-space grid.

Uses eq. 42 in Lukic et. al 2007.

property ngtm

The cumulative mass function above m, len=len(m) [units \(h^3 Mpc^{-3}\)]

In the case that m does not extend to sufficiently high masses, this routine will auto-generate dndm for an extended mass range.

In the case of the ff.Behroozi fit, it is impossible to auto-extend the mass range except by the power-law fit, thus one should be careful to supply appropriate mass ranges in this case.

property nonlinear_delta_k

Dimensionless nonlinear power spectrum.

\[\Delta_k = \frac{k^3 P_{\rm nl}(k)}{2\pi^2}\]
property nonlinear_power

Non-linear log power [units \(Mpc^3/h^3\)].

Non-linear corrections come from HALOFIT.

property nonlinear_power_fnc

A callable returning the nonlinear (halofit) power as a function of k (in h/Mpc).

property normalised_filter

A normalised filter, such that filter.sigma(8) == sigma8

property nu

The parameter \(\nu = \left(\frac{\delta_c}{\sigma}\right)^2\), len=len(m)

classmethod parameter_info(names=None)

Prints information about each parameter in the class.

Optionally, restrict printed parameters to those found in the list of names provided.

property parameter_values

Dictionary of all parameters and their current values

property power

Normalised log power spectrum [units \(Mpc^3/h^3\)].

property power_1h_auto_matter

The halo model-derived nonlinear 1-halo dark matter auto-power spectrum.

property power_1h_auto_matter_fnc

A callable returning the halo model 1-halo DM auto-power spectrum.

property power_1h_auto_tracer

The total 1-halo term of the tracer auto power spectrum.

property power_1h_auto_tracer_fnc

A callable returning the total 1-halo term of the tracer auto power spectrum.

property power_1h_cross_tracer_matter

The total 1-halo cross-power spectrum between tracer and matter.

property power_1h_cross_tracer_matter_fnc

A callable returning the total 1-halo cross-power spectrum between tracer and matter.

property power_1h_cs_auto_tracer

The cen-sat part of the 1-halo term of the tracer auto-power spectrum.

Note: May not exist for every kind of tracer.

property power_1h_cs_auto_tracer_fnc

A callable returning the cen-sat part of the 1-halo term of the tracer auto-power spectrum.

Note: May not exist for every kind of tracer.

property power_1h_ss_auto_tracer

The satellite-satellite part of the 1-halo term of the tracer auto-power spectrum.

Note: May not exist for every kind of tracer.

property power_1h_ss_auto_tracer_fnc

A callable returning the satellite-satellite part of the 1-halo term of the tracer auto-power spectrum.

Note: May not exist for every kind of tracer.

property power_2h_auto_matter: ndarray

The halo model 2-halo matter auto-power spectrum at k_hm.

property power_2h_auto_matter_fnc: ndarray

Return the halo model 2-halo matter auto-power spectrum at k.

property power_2h_auto_tracer

The 2-halo term of the tracer auto-power spectrum.

property power_2h_auto_tracer_fnc

Return the 2-halo term of the tracer auto-power spectrum at k.

property power_2h_cross_tracer_matter

The 2-halo term of the cross-power spectrum between tracer and matter.

property power_2h_cross_tracer_matter_fnc

A callable returning the 2-halo cross-power between tracer and matter.

property power_auto_matter

Auto power spectrum of dark matter.

property power_auto_matter_fnc

A callable returning the halo-model DM auto-power spectrum.

property power_auto_matter_hh: ndarray

The halo-halo matter power spectrum (includes both 1-halo and 2-halo terms).

property power_auto_matter_sh: ndarray

The smooth-halo cross power spectrum.

property power_auto_matter_ss: ndarray

The smooth-smooth matter power spectrum.

property power_auto_tracer

Auto-power spectrum of the tracer.

property power_auto_tracer_fnc
property power_cross_tracer_matter

Cross-power spectrum between tracer and matter.

property power_cross_tracer_matter_fnc

A callable returning cross-power spectrum of tracer and matter.

power_hh(k, mmin=None, mmax=None, mmin2=None, mmax2=None)

The halo-centre power spectrum of haloes in a given mass range.

The power of a given pair of halo masses is assumed to be linearly biased, \(P_hh(k) = b(m_1)b(m_2)P_{lin}(k)\)

Parameters:
  • k (np.ndarray) – Array of wavenumbers. Units h/Mpc.

  • mmin (real, default Mmin) – The minimum halo mass of the range (for the first of the halo pairs). Note: masses here are log10 masses.

  • mmax (real, default None) – The maximum halo mass of the range (for the first of the halo pairs). If a single halo mass is desired, set mmax==mmin.

  • mmin2 (real, default None) – The minimum halo mass of the range (for the second of the halo pairs). By default, takes the same value as mmin.

  • mmax – The maximum halo mass of the range (for the second of the halo pairs). By default, takes the same value as mmax.

property proj_limit

Upper limits for projected radius. Can be None.

Type:

Parameter

property projected_corr_gal

Projected correlation function w(r_p).

From Beutler 2011, eq 6.

To integrate perform a substitution y = x - r_p.

classmethod quantities_available()

Obtain a list of all available output quantities.

property r

Logarithmically distributed rp array.

property radii

The radii corresponding to the masses m.

Note that these are not the halo radii – they are the radii containing mass m given a purely background density.

property rho_gtm

Mass density in haloes >m, len=len(m) [units \(M_\odot h^2 Mpc^{-3}\)]

In the case that m does not extend to sufficiently high masses, this routine will auto-generate dndm for an extended mass range.

In the case of the ff.Behroozi fit, it is impossible to auto-extend the mass range except by the power-law fit, thus one should be careful to supply appropriate mass ranges in this case.

property rho_ltm

Mass density in haloes <m, len=len(m) [units \(M_\odot h^2 Mpc^{-3}\)]

Note

As of v1.6.2, this assumes that the entire mass density of halos is encoded by the mean_density0 parameter (ie. all mass is found in halos). This is not explicitly true of all fitting functions (eg. Warren), in which case the definition of this property is somewhat inconsistent, but will still work.

In the case that m does not extend to sufficiently high masses, this routine will auto-generate dndm for an extended mass range.

In the case of the ff.Behroozi fit, it is impossible to auto-extend the mass range except by the power-law fit, thus one should be careful to supply appropriate mass ranges in this case.

property rlim

Upper limits for projected radius.

Either manually set or taken to be some large value.

property rlog

If True, r bins are logarithmically distributed.

Type:

Parameter

property rmax

Maximum length scale.

Type:

Parameter

property rmin

Minimum length scale.

Type:

Parameter

property rnum

Number of r bins.

Type:

Parameter

property rp

Array of projected radius bins.

property rp_log

If projected radius bins are logarithmically distributed.

Type:

Parameter

property rp_max

Maximum projected radius.

Type:

Parameter

property rp_min

Minimum projected radius.

Type:

Parameter

property rp_num

Number of projected radius bins.

Type:

Parameter

property satellite_fraction

The total fraction of tracers that are satellites.

Note: this may not exist for every kind of tracer.

property satellite_occupation

The mean satellite occupation of the tracer as a function of halo mass.

property sd_bias

A class containing relevant methods to calculate scale-dependent bias corrections.

property sd_bias_correction

Return the correction for scale dependancy of bias.

property sd_bias_model

Model of Scale Dependant Bias.

Type:

Parameter

property sd_bias_params

Dictionary of parameters for Scale Dependant Bias.

Type:

Parameter

property sigma

The sqrt of the mass variance at z, len=len(m).

property sigma_8

RMS linear density fluctuations in spheres of radius 8 Mpc/h

Type:

float

Type:

Parameter

property takahashi

Whether to use updated HALOFIT coefficients from Takahashi+12.

If False, use the original coefficients from Smith+2003.

Type:

bool

Type:

Parameter

property total_occupation

The mean total occupation of the tracer as a function of halo mass.

property tracer_cmz_relation

The concentrations corresponding to m().

property tracer_concentration

Concentration-mass relation model instance.

property tracer_concentration_model

The tracer concentration-mass relation.

Type:

Parameter

property tracer_concentration_params

Dictionary of parameters for tracer concentration-mass relation.

Type:

Parameter

property tracer_density

Mean density of the tracer, ONLY if passed directly.

Type:

Parameter

property tracer_density_m

The total tracer density in halos of mass m.

property tracer_mmin

The minimum halo mass of integrals over the tracer population.

This is a little tricky, because HOD’s which don’t enforce the central condition, even if they have a sharp cut at mmin, should not stop the integral at the central’s Mmin, but should rather continue to pick up the satellites in lower mass haloes.

property tracer_profile

Object to calculate quantities of the tracer profile.

property tracer_profile_lam

The mass-normalised profile self-convolution of the tracer, shape (len(r), len(m)).

property tracer_profile_model

The tracer density halo_profile model.

Type:

Parameter

property tracer_profile_params

Dictionary of parameters for the tracer Profile model.

Type:

Parameter

property tracer_profile_rho

The mass-normalised density profile of the tracer, with shape (len(r), len(m)).

property tracer_profile_ukm

The mass-normalised fourier density profile of the tracer, shape (len(k), len(m)).

property transfer

The instantiated transfer model

property transfer_function

Normalised CDM log transfer function.

property transfer_model

Defines which transfer function model to use.

Built-in available models are found in the hmf.transfer_models module. Default is CAMB if installed, otherwise EH.

Type:

str or hmf.transfer_models.TransferComponent subclass, optional

Type:

Parameter

property transfer_params

Relevant parameters of the transfer_model.

Type:

dict

Type:

Parameter

update(**kwargs)

Updates any parameter passed.

validate()

Perform validation of the input parameters as they relate to each other.

property wdm

The instantiated WDM model.

Contains quantities relevant to WDM.

property wdm_mass

Mass of the WDM particle.

Type:

float

Type:

Parameter

property wdm_model

A model for the WDM effect on the transfer function.

Type:

str or WDM subclass

Type:

Parameter

property wdm_params

Parameters of the WDM model.

Type:

dict

Type:

Parameter

property z

Redshift.

Must be greater than 0.

Type:

float

Type:

Parameter