Over the last week or so I have been reading in the gas particle data for the snapshot 99 TNG50-1 box and calculating the neutral gas mass (and then the HI/H2 splitting per gas cell following Diemer+ 2018, 2019). However, I cannot seem to achieve the same values as the ones quoted in the HI/H2 supplementary data set (i.e. 'm_neutral_H').
I am loading the gas particle data using the il.snapshot.loadSubhalo() function, using the subhalo ids identified in the 'id_subhalo' dataset of the HI/H2 supplementary data file, then calculating the total neutral H mass using:
total neutral H mass per subhalo = sum(gas_masses x NeutralHydrogenAbundances x Xh)
(I've experimented with setting Xh to 0.76 and also reading in the appropriate value for each particle from 'GFM_Metals'). The values seem to agree well at low gas masses, but alter by a factor of ~2 when the gas masses are high (with the values I calculate being consistently lower).
Is there something I am doing wrong/is not consistent with the HI/H2 supplementary dataset?
Thanks for your help!
Lilian
Dylan Nelson
25 Aug '22
Can you post a specific subhalo ID, with a significant difference? Perhaps we can get to the bottom of it.
Lilian Garratt-Smithson
29 Aug '22
Hi Dylan,
Thanks for your reply! Yes, so for halo ID 0 I get 6.02x10^9 Msun for the neutral mass, while (assuming I am reading it correctly) the HI/H2 data lists this halo as having 7.28x10^9 Msun (so my value is 0.83 times that of the catalogue).
Cheers,
Lilian
Dylan Nelson
5 Sep '22
Perhaps this is related to some choice you (or the catalog) is making about star-forming gas cells? My quick check, including all gas in either the (FoF) halo, or the central subhalo, gives:
In [1]: sim = tenet.sim('tng50-1', redshift=0.0)
In [2]: mass = sim.snapshotSubsetP('gas', 'mass', haloID=0)
In [3]: xh = sim.snapshotSubsetP('gas', 'NeutralHydrogenAbundance', haloID=0)
In [6]: sim.units.codeMassToMsun(np.sum(mass*xh))
Out[6]: array([4.9710285e+10], dtype=float32)
---
In [7]: mass = sim.snapshotSubsetP('gas', 'mass', subhaloID=0)
In [8]: xh = sim.snapshotSubsetP('gas', 'NeutralHydrogenAbundance', subhaloID=0)
In [9]: sim.units.codeMassToMsun(np.sum(mass*xh))
Out[9]: array([8.0702034e+09], dtype=float32)
Lilian Garratt-Smithson
12 Sep '22
Hi Dylan,
Thanks again for your help on this! So the value I get agrees with yours using the subhaloID, it's just that I also multiply the NeutralHydrogenAbundance by the hydrogen mass fraction Xh. I was working under the assumption that the NeutralHydrogenAbundance was the fraction of the hydrogen cell mass, rather than the total gas mass - is this wrong?
This also doesn't explain the discrepancy with the MHI catalogue, however, which doesn't look like it correlates with the same subhaloID or haloID - perhaps the 'id subhalo' field refers to an alternative id? If it was a choice related to a cell cut/subset (e.g. SF cells etc.) I'd (maybe naively) expect the value to be lower than mine rather than higher, so not sure what to try. Is there anything you could suggest?
Apologies for all the questions!
Lilian
Dylan Nelson
15 Sep '22
Yes you're right, NeutralHydrogenAbundance is "Fraction of the hydrogen cell mass (or density) in neutral hydrogen".
I agree that the "(i) Molecular and atomic hydrogen (HI+H2) galaxy contents" lists the value of m_neutral_H for subhalo 0 (halo 0) of TNG50-1 at z=0 as 7.28e9 Msun, but that your value (also mine) is more like 6.1e9. This doesn't seem consistent with the description of this field in the documentation. It must either be an error in the catalog, or in the documentation description. I will check on this.
Benedikt Diemer
15 Sep '22
Hi Lilian,
as Dylan suspected, I think the discrepancy comes from star-forming cells. There, I assumed the cold fraction in the SH03 subgrid model to correspond to the neutral fraction (between 80 and 100%, depending on density). The NeutralHydrogenAbundance field is not meaningful for those cells, as stated in the docs. I tried to express this point in the docs of the supplementary catalog:
"The total neutral hydrogen mass (including all bound gas cells). Note that the neutral fraction is determined by the simulation (that is, by the Springel & Hernquist 2003 ISM model for cells above the star formation threshold), and does not depend on the HI/H2 model."
Maybe we should make this clearer... anyway, I hope this helps!
Benedikt
Lilian Garratt-Smithson
27 Sep '22
Hi both,
Thanks very much for your help and the clarification, yes I hadn't completely understood the comment and incorrectly assumed this was already altered in the 'NeutralHydrogenAbundance' field.
Hi TNG collaboration,
Over the last week or so I have been reading in the gas particle data for the snapshot 99 TNG50-1 box and calculating the neutral gas mass (and then the HI/H2 splitting per gas cell following Diemer+ 2018, 2019). However, I cannot seem to achieve the same values as the ones quoted in the HI/H2 supplementary data set (i.e. 'm_neutral_H').
I am loading the gas particle data using the il.snapshot.loadSubhalo() function, using the subhalo ids identified in the 'id_subhalo' dataset of the HI/H2 supplementary data file, then calculating the total neutral H mass using:
total neutral H mass per subhalo = sum(gas_masses x NeutralHydrogenAbundances x Xh)
(I've experimented with setting Xh to 0.76 and also reading in the appropriate value for each particle from 'GFM_Metals'). The values seem to agree well at low gas masses, but alter by a factor of ~2 when the gas masses are high (with the values I calculate being consistently lower).
Is there something I am doing wrong/is not consistent with the HI/H2 supplementary dataset?
Thanks for your help!
Lilian
Can you post a specific subhalo ID, with a significant difference? Perhaps we can get to the bottom of it.
Hi Dylan,
Thanks for your reply! Yes, so for halo ID 0 I get 6.02x10^9 Msun for the neutral mass, while (assuming I am reading it correctly) the HI/H2 data lists this halo as having 7.28x10^9 Msun (so my value is 0.83 times that of the catalogue).
Cheers,
Lilian
Perhaps this is related to some choice you (or the catalog) is making about star-forming gas cells? My quick check, including all gas in either the (FoF) halo, or the central subhalo, gives:
Hi Dylan,
Thanks again for your help on this! So the value I get agrees with yours using the subhaloID, it's just that I also multiply the NeutralHydrogenAbundance by the hydrogen mass fraction Xh. I was working under the assumption that the NeutralHydrogenAbundance was the fraction of the hydrogen cell mass, rather than the total gas mass - is this wrong?
This also doesn't explain the discrepancy with the MHI catalogue, however, which doesn't look like it correlates with the same subhaloID or haloID - perhaps the 'id subhalo' field refers to an alternative id? If it was a choice related to a cell cut/subset (e.g. SF cells etc.) I'd (maybe naively) expect the value to be lower than mine rather than higher, so not sure what to try. Is there anything you could suggest?
Apologies for all the questions!
Lilian
Yes you're right, NeutralHydrogenAbundance is "Fraction of the hydrogen cell mass (or density) in neutral hydrogen".
I agree that the "(i) Molecular and atomic hydrogen (HI+H2) galaxy contents" lists the value of
m_neutral_H
for subhalo 0 (halo 0) of TNG50-1 at z=0 as 7.28e9 Msun, but that your value (also mine) is more like 6.1e9. This doesn't seem consistent with the description of this field in the documentation. It must either be an error in the catalog, or in the documentation description. I will check on this.Hi Lilian,
as Dylan suspected, I think the discrepancy comes from star-forming cells. There, I assumed the cold fraction in the SH03 subgrid model to correspond to the neutral fraction (between 80 and 100%, depending on density). The NeutralHydrogenAbundance field is not meaningful for those cells, as stated in the docs. I tried to express this point in the docs of the supplementary catalog:
"The total neutral hydrogen mass (including all bound gas cells). Note that the neutral fraction is determined by the simulation (that is, by the Springel & Hernquist 2003 ISM model for cells above the star formation threshold), and does not depend on the HI/H2 model."
Maybe we should make this clearer... anyway, I hope this helps!
Benedikt
Hi both,
Thanks very much for your help and the clarification, yes I hadn't completely understood the comment and incorrectly assumed this was already altered in the 'NeutralHydrogenAbundance' field.
Thanks again!
Lilian