Skip to content

Commit

Permalink
Hot gas fraction (#291)
Browse files Browse the repository at this point in the history
* Baryon fraction of hot gas

* Update colibre/registration.py

Co-authored-by: Evgenii Chaikin <bowowoda@gmail.com>

---------

Co-authored-by: Evgenii Chaikin <bowowoda@gmail.com>
  • Loading branch information
robjmcgibbon and EvgeniiChaikin authored Nov 18, 2024
1 parent 19b35c0 commit eac772c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
39 changes: 39 additions & 0 deletions colibre/auto_plotter/baryon_fractions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,45 @@ gas_fraction_500_no_bias:
- filename: HaloMassGasFractions/Eckert2016.hdf5
- filename: HaloMassGasFractions/Lovisari2015.hdf5

hot_gas_fraction_500_no_bias:
type: "scatter"
select_structure_type: 1
comment: "Centrals only"
legend_loc: "upper left"
x:
quantity: "spherical_overdensities.mass_500_rhocrit"
units: Solar_Mass
start: 1e10
end: 1e15
y:
quantity: "derived_quantities.hot_gas_fraction_true_R500"
units: "dimensionless"
log: false
start: 0.
end: 1.2
median:
plot: true
log: true
min_num_points_highlight: 0
adaptive: true
number_of_bins: 25
start:
value: 1e10
units: Solar_Mass
end:
value: 1e15
units: Solar_Mass
metadata:
title: "Halo hot gas fractions within $R_{500}$ (no hydrostatic bias)"
caption: Fraction of halo mass within $R_{500}$ in hot ($T>10^5$K) gas, normalised by the cosmic mean. These are 'true' values, i.e. no cut or observational correction was applied. The observational data does not include any correction for hydrostatic bias.
section: Baryon Fractions
observational_data:
- filename: HaloMassGasFractions/Lin2012.hdf5
- filename: HaloMassGasFractions/Sun2009.hdf5
- filename: HaloMassGasFractions/Vikhlinin2006.hdf5
- filename: HaloMassGasFractions/Eckert2016.hdf5
- filename: HaloMassGasFractions/Lovisari2015.hdf5

gas_fraction_500_with_bias:
type: "scatter"
select_structure_type: 1
Expand Down
9 changes: 9 additions & 0 deletions colibre/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1864,6 +1864,7 @@ def register_gas_fraction(self, catalogue):

M_500 = catalogue.get_quantity("spherical_overdensities.mass_500_rhocrit")
M_500_gas = catalogue.get_quantity("spherical_overdensities.mass_gas_500_rhocrit")
M_500_hot_gas = catalogue.get_SOAP_quantity("so.500_crit.hotgasmass")
M_500_star = catalogue.get_quantity("spherical_overdensities.mass_star_500_rhocrit")
M_500_baryon = M_500_gas + M_500_star

Expand All @@ -1881,6 +1882,13 @@ def register_gas_fraction(self, catalogue):
name = "$f_{\\rm gas, 500, true} / (\\Omega_{\\rm b} / \\Omega_{\\rm m})$"
f_gas_500.name = name

f_hot_gas_500 = unyt.unyt_array(np.zeros(M_500.shape), units=unyt.dimensionless)
f_hot_gas_500[M_500 > 0.0] = (M_500_hot_gas[M_500 > 0.0] / M_500[M_500 > 0.0]) / (
Omega_b / Omega_m
)
name = "$f_{\\rm hot \\, gas, 500, true} / (\\Omega_{\\rm b} / \\Omega_{\\rm m})$"
f_hot_gas_500.name = name

f_star_500 = unyt.unyt_array(np.zeros(M_500.shape), units=unyt.dimensionless)
f_star_500[M_500 > 0.0] = (M_500_star[M_500 > 0.0] / M_500[M_500 > 0.0]) / (
Omega_b / Omega_m
Expand All @@ -1890,6 +1898,7 @@ def register_gas_fraction(self, catalogue):

setattr(self, "baryon_fraction_true_R500", f_b_500)
setattr(self, "gas_fraction_true_R500", f_gas_500)
setattr(self, "hot_gas_fraction_true_R500", f_hot_gas_500)
setattr(self, "star_fraction_true_R500", f_star_500)

return
Expand Down

0 comments on commit eac772c

Please sign in to comment.