I'm trying to access the dark matter particle masses (which I understand are all equal at a given snapshot). I have attempted to access the Header snapshot with the MassTable field, but have been unable to figure out how to do so. Thus far, I have tried
headerfile = il.groupcat.loadHeader(basePath,illustrisslice)
but this Header file does not contain the 'MassTable' field. On previous help topics I have seen
h = cosmo.load.snapshotHeader()
but could not figure out how to replicate. Any assistance much appreciated,
The MassTable will be in the header of any snapshot file, but not in the header of a group catalog file, which is what the groupcat.loadHeader() function loads.
But this function is very simple, e.g.
with h5py.File('any_snapshot_file_chunk_here.0.hdf5,'r') as f:
header = dict( f['Header'].attrs.items() )
print(header['MassTable']) # 10^10 msun/h
Excellent, thank you Dylan.