hmfast.halos.profiles.B12PressureProfile

class hmfast.halos.profiles.B12PressureProfile(x_grid=None, A_P0=18.1, A_xc=0.497, A_beta=4.35, alpha_m_P0=0.154, alpha_m_xc=-0.00865, alpha_m_beta=0.0393, alpha_z_P0=-0.758, alpha_z_xc=0.731, alpha_z_beta=0.415, x_out=inf)[source]

Bases: PressureProfile

Electron pressure profile from Battaglia et al. (2012).

The profile is evaluated as a function of the comoving radius \(r\), but its normalization and shape are defined using the native \(200c\) calibration mass and radius:

\[P_e(r, M, z) = P_{200c} \, P_0 \left(\frac{x_{200c}}{x_c}\right)^\gamma \left[1 + \left(\frac{x_{200c}}{x_c}\right)^\alpha\right]^{-\beta} \tag{1}\]

where \(x_{200c} = r / r_{200c}\) and \(r_{200c}\) has the same units as \(r\). In this implementation, \(\alpha = 1\) and \(\gamma = -0.3\), and the remaining profile parameters follow the Battaglia scaling

\[X(M_{200c}, z) = A_X \left(\frac{M_{200c} / h}{10^{14} M_\odot}\right)^{\alpha_m^X} (1 + z)^{\alpha_z^X} \tag{2}\]

where \(X \in \{P_0, x_c, \beta\}\). In the implementation, the input halo mass is first converted from the halo model’s mass definition to \(M_{200c}\). Note that the scaling parameters must be calibrated with respect to a \(200c\) mass definition.

The projected Fourier-space pressure profile is evaluated as

\[u_\ell(\ell, M, z) = \frac{4 \pi (1+z) r_\Delta}{\ell_\Delta^2} \int dx \, x^2 \, P_e(x, M, z) \, \frac{\sin\!\left[(\ell / \ell_\Delta) x\right]} {(\ell / \ell_\Delta) x} \tag{3}\]

where \(\ell_\Delta(M, z) = d_A(z) / r_\Delta(M, z)\) and \(\chi(z) = (1+z) d_A(z)\).

Attributes:
x_gridjnp.ndarray

Dimensionless radial grid \(x = r / r_\Delta\) used to tabulate the profile and define the Hankel transform, with \(r_\Delta\) expressed in the same units as \(r\).

A_P0float

Amplitude \(A_{P_0}\) of the pressure normalization scaling.

A_xcfloat

Amplitude \(A_{x_c}\) of the core-radius scaling.

A_betafloat

Amplitude \(A_\beta\) of the outer-slope scaling.

alpha_m_P0float

Mass-scaling exponent \(\alpha_m^{P_0}\).

alpha_m_xcfloat

Mass-scaling exponent \(\alpha_m^{x_c}\).

alpha_m_betafloat

Mass-scaling exponent \(\alpha_m^\beta\).

alpha_z_P0float

Redshift-scaling exponent \(\alpha_z^{P_0}\).

alpha_z_xcfloat

Redshift-scaling exponent \(\alpha_z^{x_c}\).

alpha_z_betafloat

Redshift-scaling exponent \(\alpha_z^\beta\).

Methods

calibrate(model_key)

Return a new profile with shape parameters set to a named Battaglia et al. (2012) calibration.

fourier(halo_model, k, m, z)

Compute the Fourier-space pressure profile for halo-model calculations.

real(halo_model, r, m, z)

Compute the electron-pressure profile.

update([A_P0, A_xc, A_beta, alpha_m_P0, ...])

Return a new profile instance with updated B12 parameters.

Attributes

x_grid

property x_grid
update(A_P0=None, A_xc=None, A_beta=None, alpha_m_P0=None, alpha_m_xc=None, alpha_m_beta=None, alpha_z_P0=None, alpha_z_xc=None, alpha_z_beta=None, x_out=None, x_grid=None)[source]

Return a new profile instance with updated B12 parameters.

Parameters:
A_P0, A_xc, A_beta, alpha_m_P0, alpha_m_xc, alpha_m_beta, alpha_z_P0, alpha_z_xc, alpha_z_beta, x_outfloat, optional

Replacement values for the corresponding class attributes. Any argument left as None keeps its current value.

x_gridjnp.ndarray, optional

New dimensionless radial grid. Will be sorted and used to rebuild the Hankel transform.

Returns:
B12PressureProfile

New profile instance with updated parameters.

fourier(halo_model, k, m, z)

Compute the Fourier-space pressure profile for halo-model calculations.

Parameters:
halo_modelHaloModel

Halo model providing the cosmology and halo-radius relation.

kfloat or jnp.ndarray

Comoving wavenumber(s) in \(\mathrm{Mpc}^{-1}\).

mfloat or jnp.ndarray

Halo mass or masses in physical \(M_\odot\).

zfloat or jnp.ndarray

Redshift(s).

Returns:
jnp.ndarray

Transformed profile with shape \((N_k, N_m, N_z)\), where singleton dimensions get squeezed before return.

calibrate(model_key)[source]

Return a new profile with shape parameters set to a named Battaglia et al. (2012) calibration. This acts as a wrapper around update() that allows setting all nine shape parameters at once based on the calibration name.

Parameters:
model_keystr

Case-insensitive calibration name. Supported values: 'agn'.

Returns:
B12PressureProfile

New profile instance with all nine shape parameters replaced. The radial grid x_grid and truncation radius x_out are preserved unchanged.

real(halo_model, r, m, z)[source]

Compute the electron-pressure profile.

Parameters:
halo_modelHaloModel

Halo model providing the cosmology, mass-definition conversion, and halo radius.

rfloat or jnp.ndarray

Comoving radius or radii in \(\mathrm{Mpc}\).

mfloat or jnp.ndarray

Halo mass or masses in physical \(M_\odot\).

zfloat or jnp.ndarray

Redshift(s).

Returns:
jnp.ndarray

Electron pressure profile with shape \((N_r, N_m, N_z)\), where singleton dimensions get squeezed before return.