BaryonForge.Profiles.Battaglia module
- class BaryonForge.Profiles.Battaglia.Pressure(self, Model_def, mass_def=<function MassDef200c>, truncate=False)[source]
Bases:
HaloProfileClass for implementing the Battaglia pressure profile using CCL’s halo profile framework.
This class computes the pressure profile of halos using the Battaglia et al. (2012) model. The model is based on numerical simulations and provides a way to calculate the electron pressure profile in galaxy clusters, which is useful for studying the thermal Sunyaev-Zel’dovich effect and other astrophysical phenomena. The final profile is in units of comoving volume. Use a factor of 1/a^3 (not 1/a^4) to convert to physical pressure.
Inherits from
ccl.halos.profiles.HaloProfile : Base class for halo profiles in CCL.
- param Model_def:
Specifies the model calibration to use from Battaglia et al. (2012). Options are: - ‘200_AGN’: Calibrated using AGN feedback and a 200c overdensity mass definition. - ‘500_AGN’: Calibrated using AGN feedback and a 500c overdensity mass definition. - ‘500_SH’: Calibrated without AGN feedback and a 500c overdensity mass definition.
- type Model_def:
str
- param truncate:
Radius (in units of ( R / R_{ ext{def}} ), where ( R_{ ext{def}} ) is the halo radius defined via the chosen spherical overdensity) at which to truncate the profiles and set them to zero. Default is False, meaning no truncation is applied.
- type truncate:
float, optional
Notes
The Battaglia pressure profile is parameterized based on simulations and provides
different calibrations depending on the inclusion of AGN feedback and the mass definition used (200c or 500c overdensities). This class supports switching between these calibrations using the Model_def parameter.
The profile has limits for validity, including redshift, halo mass, and distance
from the halo center. The truncate parameter can be used to enforce a distance cutoff, setting the profile to zero beyond the specified radius.
The pressure profile is computed using the following parameters from Battaglia et al. (2012):
\[P(r) = P_\delta \cdot P_0 \cdot \left( \frac{x}{x_c} \right)^\gamma \cdot \left( 1 + \left( \frac{x}{x_c} \right)^\alpha \right)^{-\beta}\]- where:
( x = frac{r}{R} ) is the radial distance normalized by the halo radius.
( P_delta ) is the self-similar expectation for pressure.
( P_0, x_c, beta ) are model parameters depending on the chosen Model_def.
( alpha, gamma ) are set to 1 and -0.3, respectively.
Cosmological and halo parameters such as ( Omega_m ), ( Omega_b ), ( Omega_g ),
and ( h ) are obtained from the cosmo object. - If the truncate parameter is set, the profile is truncated to zero beyond the specified radius. - Units are converted to CGS for the final profile values.
Examples
Compute the Battaglia pressure profile for a given cosmology and halo:
>>> battaglia_model = BattagliaPressure(Model_def='200_AGN', truncate=1.5) >>> r = np.logspace(-2, 1, 50) # Radii in comoving Mpc >>> M = 1e14 # Halo mass in solar masses >>> a = 0.5 # Scale factor corresponding to redshift z >>> pressure_profile = battaglia_model._real(my_cosmology, r, M, a)
- class BaryonForge.Profiles.Battaglia.ElectronPressure(self, Model_def, mass_def=<function MassDef200c>, truncate=False)[source]
Bases:
PressureComputes the electron pressure profile based on the Battaglia et al. (2012) model.
This class extends BattagliaPressure by scaling the gas pressure profile to electron pressure using a predefined conversion factor.
Inherits from
BattagliaPressure : Base class for computing thermal pressure profiles.
Notes
The electron pressure is calculated as a scaled version of the thermal pressure using:
\[P_{\text{e}}(r) = P_{\text{gas-to-e}} \times P_{\text{gas}}(r)\]where ( P_{text{gas-to-e}} ) is a constant conversion factor.
- class BaryonForge.Profiles.Battaglia.GasDensity(self, Model_def, truncate=False)[source]
Bases:
HaloProfileComputes the gas density profile based on the Battaglia et al. (2012) model.
This class implements the gas density profile using the Battaglia model, allowing for different calibrations and optional truncation at specified radii. The mass-definition is forced to be 200c.
Inherits from
ccl.halos.profiles.HaloProfile : Base class for halo profiles in CCL.
- param Model_def:
Specifies the calibration model to use (‘200_AGN’, ‘200_SH’). These options determine the parameters based on different feedback scenarios and mass definitions.
- type Model_def:
str
- param truncate:
Radius (in units of ( R / R_{text{def}} )) at which to truncate the profile. Default is False, meaning no truncation is applied.
- type truncate:
float, optional
Notes
The gas density profile is calibrated using simulations with and without AGN feedback, depending on the selected Model_def.