Questions about snapshot header and cosmological parameters

Dylan Nelson
  • 1
  • 16 Oct

Not sure where the text went:

(1) I'm trying to access the 'Header' information for a snapshot within JupyterLab. However, I'm only able to access the 'Header' for the group catalogs, and it appears to lack certain fields, such as "MassTable". My current approach is turning to API to download the HDF5 file of a specific halo and then retrieve its header information. But this approach seems not to be very convenient.

(2) Do all snapshots share the same cosmological parameters, such as Omega_m, Omega_b, and h? Or, should I adjust these parameters based on the scale factor for each snapshot?

Dylan Nelson
  • 16 Oct

(It seems you got a Error 500 trying to post this message because it contained strange characters: a greek "Omega", i.e. copy-pasted from somewhere).

Dylan Nelson
  • 16 Oct

(1) The snapshot files also have a Header group, you can just get this directly with h5py, e.g.

with h5py.File(snapPath(basePath, snapNum), 'r') as f:
    header = dict(f['Header'].attrs.items())

(2) Those are cosmological constants, they are constant for an entire simulation (all snapshots).

Morris Su
  • 1
  • 16 Oct

Thank you Dylan, I didn't realise that the Greek characters would cause an error.

As to my question, thank you for the approach you've provided. But one questions is, I don't know the snapPath of the Subhalo. To be specific, there exist many "chunks" in each snapshot. If I only have the SubhaloID and snapNum, I'm unable to determine which "Snap Chunk" contain the subhalo I'm looking for.

I also wonder if treating cosmological parameters as constants will affect the analysis of snapshot data at redshifts other than z=0?

Dylan Nelson
  • 16 Oct

The MassTable attribute of the Header is the same in every file, so it doesn't matter which chunk you load, it can just be 0.

This is just the definition of those variables you listed above - they are constants. For example, H_0 is a constant, while H(z) certainly is not. You need to be careful to use what is needed for your analysis.

Morris Su
  • 17 Oct

Thank you for your explanation. I understand now.

  • Page 1 of 1