dark_emulator.model_hod.hod_interface module

dark_emulator.model_hod.hod_interface.binave_array(x, y, dlnx, D=2, nbin=100)

Assumes dlnx << np.diff(x). Performs the forward bin average in dimension D. ::math:

\bar{y} = \frac{1}{d\ln x} \int_{\ln x}^{\ln x+d\ln x} x^D y(x)
class dark_emulator.model_hod.hod_interface.darkemu_x_hod(config=None)

Bases: base_class

This class holds cosmological parameters (see set_cosmology()), HOD parameters, and other galaxy parameters (see set_galaxy()), and computes galaxy-galaxy lensing, galaxy-galaxy clustering signal, and related correlation functions based on these parameters. This class can be initialized through a dictionary that specifies the following configurations. With the default values, one can get \(\Delta\Sigma\) and \(w_p\) with an enough accuracy for the HSC S16A analysis.

  • fft_num (int): Sampling in fftlog in unit of 2048 (default: 8).

  • fft_logrmin_1h (float): Minimum \(\log_{10}(r/[h^{-1}\mathrm{Mpc}])\) used in internal 1-halo term calculation by fftlog (default: -5.0).

  • fft_logrmax_1h (float): Maximum \(\log_{10}(r/[h^{-1}\mathrm{Mpc}])\) used in internal 1-halo term calculation by fftlog (default: 3.0).

  • fft_logrmin_2h (float): Minimum \(\log_{10}(r/[h^{-1}\mathrm{Mpc}])\) used in internal 2-halo term calculation by fftlog (default: -3.0).

  • fft_logrmax_2h (float): Maximum \(\log_{10}(r/[h^{-1}\mathrm{Mpc}])\) used in internal 2-halo term calculation by fftlog (default: 3.0).

  • M_int_logMmin (float): Minimum \(\log_{10}(M_\mathrm{halo}/[h^{-1}\mathrm{M}_{\odot}])\) used in the integration across halo mass (default: 12.0).

  • M_int_logMax (float): Maximum \(\log_{10}(M_\mathrm{halo}/[h^{-1}\mathrm{M}_{\odot}])\) used in the integration across halo mass (default: 15.9).

  • M_int_k (int): Sampling in the integration across halo mass which sets \(2^{\mathrm{M\_int\_k}}\) (default: 5).

  • c-M_relation (str): Concentration-mass relation used for satellite distribution when NFW is used (see set_galaxy(); default: ‘diemer15’). The concentration is internally computed using colossus, and a user can use a model listed in concentration models in this webpage.

Parameters:

config (dict) – a dictionary to specify configurations

get_ds(rp, redshift, dlnrp=0.0)

Compute weak lensing signal \(\Delta\Sigma(r_\mathrm{p})\).

Parameters:
  • rp (numpy array) – 2 dimensional projected separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the lens galaxies are located

  • dlnrp (float) – width of bin averaging in logarithmic scale. If dlnrp=0, no bin average.

Returns:

excess surface density in \(h M_\odot \mathrm{pc}^{-2}\)

Return type:

numpy array

get_ds_cen(rp, redshift, dlnrp=0.0)

Compute weak lensing signal of (centered) central galaxies \(\Delta\Sigma_\mathrm{cen}(r_\mathrm{p})\).

Parameters:
  • rp (numpy array) – 2 dimensional projected separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the lens galaxies are located

  • dlnrp (float) – width of bin averaging in logarithmic scale. If dlnrp=0, no bin average.

Returns:

excess surface density of (centered) central galaxies in \(h M_\odot \mathrm{pc}^{-2}\)

Return type:

numpy array

get_ds_cen_off(rp, redshift, dlnrp=0.0)

Compute weak lensing signal of off-centered central galaxies \(\Delta\Sigma_\mathrm{off-cen}(r_\mathrm{p})\).

Parameters:
  • rp (numpy array) – 2 dimensional projected separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the lens galaxies are located

  • dlnrp (float) – width of bin averaging in logarithmic scale. If dlnrp=0, no bin average.

Returns:

excess surface density of off-centered central galaxies in \(h M_\odot \mathrm{pc}^{-2}\)

Return type:

numpy array

get_ds_sat(rp, redshift, dlnrp=0.0)

Compute weak lensing signal of satellite galaxies \(\Delta\Sigma_\mathrm{sat}(r_\mathrm{p})\).

Parameters:
  • rp (numpy array) – 2 dimensional projected separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the lens galaxies are located

  • dlnrp (float) – width of bin averaging in logarithmic scale. If dlnrp=0, no bin average.

Returns:

excess surface density of satellite galaxies in \(h M_\odot \mathrm{pc}^{-2}\)

Return type:

numpy array

get_ng(redshift)

Compute galaxy abundance \(n_g\).

Parameters:

redshift (float) – redshift at which the galaxies are located

Returns:

galaxy abundance in \(h^3\mathrm{Mpc}^{-3}\)

Return type:

float

get_ng_cen(redshift)

Compute abundance of central galaxies \(n_{g,\mathrm{cen}}\).

Parameters:

redshift (float) – redshift at which the central galaxies are located

Returns:

abundance of central galaxies in \(h^3\mathrm{Mpc}^{-3}\)

Return type:

float

get_wp(rp, redshift, pimax=None, rsd=False, dlnrp=0.0)

Compute projected galaxy auto-correlation function \(w_\mathrm{p}(r_\mathrm{p})\).

Parameters:
  • r_p (numpy array) – 2 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

  • pi_max (float) – The range of line of sight integral \(\pi_{\mathrm{max}}\) in \(h^{-1}\mathrm{Mpc}\). If None, the projection is performed using the zeroth order Bessel function, i.e., \(\pi_{\mathrm{max}}=\infty\) (default=None).

  • rsd (bool) – if True, redshift space distortion is incorporated into the model (default=False).

  • dlnrp (float) – width of bin averaging in logarithmic scale. If dlnrp=0, no bin average.

Returns:

projected galaxy auto-correlation function in \(h^{-1}\mathrm{Mpc}\)

Return type:

numpy array

get_wp_1hcs(rp, redshift, dlnrp=0.0)

Compute projected 1-halo correlation function between central and satellite galaxies \(w_\mathrm{p, cen-sat}^\mathrm{1h}(r_\mathrm{p})\). Note that the line-of-sight integration is performed using the zeroth order Bessel function, i.e., , \(\pi_{\mathrm{max}}=\infty\).

Parameters:
  • r_p (numpy array) – 2 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

  • dlnrp (float) – width of bin averaging in logarithmic scale. If dlnrp=0, no bin average.

Returns:

projected 1-halo correlation function between central and satellite galaxies in \(h^{-1}\mathrm{Mpc}\)

Return type:

numpy array

get_wp_1hss(rp, redshift, dlnrp=0.0)

Compute projected 1-halo correlation function between satellite galaxies \(w_\mathrm{p, sat-sat}^\mathrm{1h}(r_\mathrm{p})\). Note that the line-of-sight integration is performed using the zeroth order Bessel function, i.e., , \(\pi_{\mathrm{max}}=\infty\).

Parameters:
  • r_p (numpy array) – 2 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

  • dlnrp (float) – width of bin averaging in logarithmic scale. If dlnrp=0, no bin average.

Returns:

projected 1-halo correlation function between satellite galaxies in \(h^{-1}\mathrm{Mpc}\)

Return type:

numpy array

get_wp_2hcc(rp, redshift, dlnrp=0.0)

Compute projected 2-halo correlation function between central galaxies \(w_\mathrm{p, cen-cen}^\mathrm{2h}(r_\mathrm{p})\). Note that the line-of-sight integration is performed using the zeroth order Bessel function, i.e., , \(\pi_{\mathrm{max}}=\infty\).

Parameters:
  • r_p (numpy array) – 2 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

  • dlnrp (float) – width of bin averaging in logarithmic scale. If dlnrp=0, no bin average.

Returns:

projected 2-halo correlation function between central galaxies in \(h^{-1}\mathrm{Mpc}\)

Return type:

numpy array

get_wp_2hcs(rp, redshift, dlnrp=0.0)

Compute projected 2-halo correlation function between central and satellite galaxies \(w_\mathrm{p, cen-sat}^\mathrm{2h}(r_\mathrm{p})\). Note that the line-of-sight integration is performed using the zeroth order Bessel function, i.e., , \(\pi_{\mathrm{max}}=\infty\).

Parameters:
  • r_p (numpy array) – 2 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

  • dlnrp (float) – width of bin averaging in logarithmic scale. If dlnrp=0, no bin average.

Returns:

projected 2-halo correlation function between central and satellite galaxies in \(h^{-1}\mathrm{Mpc}\)

Return type:

numpy array

get_wp_2hss(rp, redshift, dlnrp=0.0)

Compute projected 2-halo correlation function between satellite galaxies \(w_\mathrm{p, sat-sat}^\mathrm{2h}(r_\mathrm{p})\). Note that the line-of-sight integration is performed using the zeroth order Bessel function, i.e., , \(\pi_{\mathrm{max}}=\infty\).

Parameters:
  • r_p (numpy array) – 2 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

  • dlnrp (float) – width of bin averaging in logarithmic scale. If dlnrp=0, no bin average.

Returns:

projected 2-halo correlation function between satellite galaxies in \(h^{-1}\mathrm{Mpc}\)

Return type:

numpy array

get_xi_gg(r, redshift)

Compute galaxy auto-correlation function \(\xi_\mathrm{gg}(r)\).

Parameters:
  • r (numpy array) – 3 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

Returns:

galaxy auto-correlation function

Return type:

numpy array

get_xi_gg_1hcs(r, redshift)

Compute 1-halo correlation function between central and satellite galaxies \(\xi_\mathrm{cen-sat}^\mathrm{1h}(r)\).

Parameters:
  • r (numpy array) – 3 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

Returns:

1-halo correlation function between central and satellite galaxies

Return type:

numpy array

get_xi_gg_1hss(r, redshift)

Compute 1-halo correlation function between satellite galaxies \(\xi_\mathrm{sat-sat}^\mathrm{1h}(r)\).

Parameters:
  • r (numpy array) – 3 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

Returns:

1-halo correlation function between satellite galaxies

Return type:

numpy array

get_xi_gg_2hcc(rp, redshift)

Compute 2-halo correlation function between central galaxies \(\xi_\mathrm{cen-cen}^\mathrm{2h}(r)\).

Parameters:
  • r (numpy array) – 3 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

Returns:

2-halo correlation function between central galaxies

Return type:

numpy array

get_xi_gg_2hcs(rp, redshift)

Compute 2-halo correlation function between central and satellite galaxies \(\xi_\mathrm{cen-sat}^\mathrm{2h}(r)\).

Parameters:
  • r (numpy array) – 3 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

Returns:

2-halo correlation function between central and satellite galaxies

Return type:

numpy array

get_xi_gg_2hss(rp, redshift)

Compute 2-halo correlation function between satellite galaxies \(\xi_\mathrm{sat-sat}^\mathrm{2h}(r)\).

Parameters:
  • r (numpy array) – 3 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

Returns:

2-halo correlation function between satellite galaxies

Return type:

numpy array

get_xi_gm(r, redshift)

Compute correlation function between galaxies and dark matter \(\xi_\mathrm{gm}(r)\).

Parameters:
  • r (numpy array) – 3 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

Returns:

correlation function between galaxies and dark matter

Return type:

numpy array

get_xi_gm_cen(r, redshift)

Compute correlation function between (centered) central galaxies and dark matter \(\xi_\mathrm{gm, cen}(r)\).

Parameters:
  • r (numpy array) – 3 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

Returns:

correlation function between (centered) central galaxies and dark matter

Return type:

numpy array

get_xi_gm_cen_off(r, redshift)

Compute correlation function between off-centered central galaxies and dark matter \(\xi_\mathrm{gm, off-cen}(r)\).

Parameters:
  • r (numpy array) – 3 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

Returns:

correlation function between off-centered central galaxies and dark matter

Return type:

numpy array

get_xi_gm_sat(r, redshift)

Compute correlation function between satellite galaxies and dark matter \(\xi_\mathrm{gm, sat}(r)\).

Parameters:
  • r (numpy array) – 3 dimensional separation in \(h^{-1}\mathrm{Mpc}\)

  • redshift (float) – redshift at which the galaxies are located

Returns:

correlation function between satellite galaxies and dark matter

Return type:

numpy array

set_cosmology(cparams)

Let the emulator know the cosmological parameters. This interface passes the 6 parameters to all the class objects used for the emulation of various halo statistics.

The current version supports wCDM cosmologies specified by the 6 parameters as described below. Other parameters are automatically computed:

\(\Omega_{m}=1-\Omega_{de},\)

\(h=\sqrt{(\omega_b+\omega_c+\omega_{\nu})/\Omega_m},\)

where the neutrino density is fixed by \(\omega_{\nu} = 0.00064\) corresponding to the mass sum of 0.06 eV.

Parameters:

cparam (numpy array) – Cosmological parameters \((\omega_b, \omega_c, \Omega_{de}, \ln(10^{10}A_s), n_s, w)\)

set_galaxy(gparams)

This method sets galaxy parameter through a dictionary. See Miyatake et al (2021) for the definition of galaxy parameters. Here is the list of keys.

  • HOD parameters:

    • logMmin (float): Central HOD parameter, \(\log M_\mathrm{min}\)

    • sigma_sq (float): Central HOD parameter, \(\sigma^2\)

    • logM1 (float): Satellite HOD parameter, \(\log M_1\)

    • alpha (float): Satellite HOD parameter, \(\alpha\)

    • kappa (float): Satellite HOD parameter, \(\kappa\)

  • off-centering parameters:

    • poff (float): Fraction of off-centered galaxies, \(p_\mathrm{off}\)

    • Roff (float): Characteristic scale of off-centered galaxies with respect to \(R_\mathrm{200m}\), \(R_\mathrm{off}\)

  • satellite distribution

    • sat_dist_type (float): Profile of satellite distribution. Valid values are ‘emulator’ or ‘NFW’. When ‘NFW’, concentration is specified in config parameter (see dark_emulator.model_hod.hod_interface.darkemu_x_hod)

  • incompleteness parameters

    • alpha_inc (float): Incompleteness parameter, \(\alpha_\mathrm{inc}\)

    • logM_inc (float): Incompleteness parameter, \(\log M_\mathrm{inc}\)

Parameters:

gparams (dict) – a dictionary to specify galaxy parameters