dsf.modelling module

Power-spectrum-backed HOD and IA models for Delta Sigma forecasts.

This module contains reusable Pk2D model components that can be passed to DeltaSigmaForecastBuilder through its pk2d_func argument.

The basic two-halo density profiles live in dsf.data_vector.profiles. Additive DeltaSigma-level terms, such as stellar point mass and lens magnification bias, live in the data-vector and magnification-bias modules.

The functions here are for model components that naturally enter through a CCL Pk2D object, such as HOD galaxy-matter spectra, baryonified HOD spectra, and NLA galaxy-intrinsic spectra.

dsf.modelling.baryonified_duffy_concentration(f_c)[source]

Return a Duffy concentration model with baryonic rescaling.

Parameters:

f_c (float) – Multiplicative baryonic concentration rescaling.

Returns:

CCL Duffy concentration model.

Return type:

ConcentrationDuffy08

dsf.modelling.hod_galaxy_bias(cosmo, *, a, **hod_kwargs)[source]

Return the effective linear galaxy bias of the HOD sample.

Parameters:
  • cosmo (Cosmology) – CCL cosmology object.

  • a (float) – Scale factor where the HOD bias is evaluated.

  • **hod_kwargs (Any) – Keyword arguments passed to ccl.halos.HaloProfileHOD.

Returns:

Effective HOD galaxy bias.

Return type:

float

dsf.modelling.make_ccl_cosmology(cosmology=None, **kwargs)[source]

Return a CCL cosmology.

If no cosmology mapping is supplied, this returns ccl.CosmologyVanillaLCDM(**kwargs). This is useful for quick tests and examples.

If a cosmology mapping is supplied, the values are passed to ccl.Cosmology. The only DSF convenience handled here is allowing Omega_m instead of Omega_c. In that case Omega_c is computed as

Omega_c = Omega_m - Omega_b.

Parameters:
  • cosmology (Mapping[str, Any] | None) – Optional mapping of cosmological parameters.

  • **kwargs (Any) – Extra keyword arguments passed to the CCL cosmology constructor.

Returns:

CCL cosmology object.

Return type:

Cosmology

dsf.modelling.pk2d_hod(cosmo, *, k_array, a_array, **hod_kwargs)[source]

Return the HOD galaxy-matter power spectrum for Delta Sigma.

Parameters:
  • cosmo (Cosmology) – CCL cosmology object.

  • k_array (ndarray[tuple[Any, ...], dtype[float64]]) – Wavenumber grid used for the halo-model Pk2D spline.

  • a_array (ndarray[tuple[Any, ...], dtype[float64]]) – Scale-factor grid used for the halo-model Pk2D spline.

  • **hod_kwargs (Any) – Keyword arguments passed to ccl.halos.HaloProfileHOD.

Returns:

Density-weighted galaxy-matter Pk2D object.

Return type:

Pk2D

dsf.modelling.pk2d_hod_baryonified(cosmo, *, k_array, a_array, f_c=1.0, **hod_kwargs)[source]

Return a baryonified HOD galaxy-matter power spectrum.

Parameters:
  • cosmo (Cosmology) – CCL cosmology object.

  • k_array (ndarray[tuple[Any, ...], dtype[float64]]) – Wavenumber grid used for the halo-model Pk2D spline.

  • a_array (ndarray[tuple[Any, ...], dtype[float64]]) – Scale-factor grid used for the halo-model Pk2D spline.

  • f_c (float) – Baryonic rescaling of the Duffy concentration relation.

  • **hod_kwargs (Any) – Keyword arguments passed to ccl.halos.HaloProfileHOD.

Returns:

Density-weighted baryonified HOD galaxy-matter Pk2D object.

Return type:

Pk2D

dsf.modelling.pk2d_hod_baryonified_with_nla(cosmo, *, k_array, a_array, f_c=1.0, A_IA=0.0, C1rhocrit=0.0134, b_g=None, a_bias=1.0, **hod_kwargs)[source]

Return baryonified HOD galaxy-matter power plus optional NLA contribution.

Parameters:
  • cosmo (Cosmology) – CCL cosmology object.

  • k_array (ndarray[tuple[Any, ...], dtype[float64]]) – Wavenumber grid used for the Pk2D spline.

  • a_array (ndarray[tuple[Any, ...], dtype[float64]]) – Scale-factor grid used for the Pk2D spline.

  • f_c (float) – Baryonic rescaling of the Duffy concentration relation.

  • A_IA (float) – Intrinsic-alignment amplitude. If zero, only the baryonified HOD galaxy-matter contribution is returned.

  • C1rhocrit (float) – NLA normalization.

  • b_g (float | None) – Galaxy bias multiplying the galaxy-intrinsic term. If None, the effective HOD galaxy bias is computed at a_bias.

  • a_bias (float) – Scale factor used when deriving b_g from the HOD model.

  • **hod_kwargs (Any) – Keyword arguments passed to ccl.halos.HaloProfileHOD.

Returns:

Density-weighted baryonified HOD galaxy-matter Pk2D object, optionally including the NLA galaxy-intrinsic contribution.

Return type:

Pk2D

dsf.modelling.pk2d_hod_with_nla(cosmo, *, k_array, a_array, A_IA=0.0, C1rhocrit=0.0134, b_g=None, a_bias=1.0, **hod_kwargs)[source]

Return HOD galaxy-matter power plus optional NLA contribution.

Parameters:
  • cosmo (Cosmology) – CCL cosmology object.

  • k_array (ndarray[tuple[Any, ...], dtype[float64]]) – Wavenumber grid used for the Pk2D spline.

  • a_array (ndarray[tuple[Any, ...], dtype[float64]]) – Scale-factor grid used for the Pk2D spline.

  • A_IA (float) – Intrinsic-alignment amplitude. If zero, only the HOD galaxy-matter contribution is returned.

  • C1rhocrit (float) – NLA normalization.

  • b_g (float | None) – Galaxy bias multiplying the galaxy-intrinsic term. If None, the effective HOD galaxy bias is computed at a_bias.

  • a_bias (float) – Scale factor used when deriving b_g from the HOD model.

  • **hod_kwargs (Any) – Keyword arguments passed to ccl.halos.HaloProfileHOD.

Returns:

Density-weighted HOD galaxy-matter Pk2D object, optionally including the NLA galaxy-intrinsic contribution.

Return type:

Pk2D

dsf.modelling.pk2d_nla(cosmo, *, k_array, a_array, A_IA, C1rhocrit=0.0134, b_g=1.0)[source]

Return the NLA galaxy-intrinsic power spectrum contribution.

Parameters:
  • cosmo (Cosmology) – CCL cosmology object.

  • k_array (ndarray[tuple[Any, ...], dtype[float64]]) – Wavenumber grid used for the Pk2D spline.

  • a_array (ndarray[tuple[Any, ...], dtype[float64]]) – Scale-factor grid used for the Pk2D spline.

  • A_IA (float) – Intrinsic-alignment amplitude.

  • C1rhocrit (float) – NLA normalization.

  • b_g (float) – Galaxy bias multiplying the galaxy-intrinsic term.

Returns:

Density-weighted NLA galaxy-intrinsic Pk2D object.

Return type:

Pk2D