Not able to locate field associated to 3D [x_i, y_i, z_i] position of ith HI-galaxy in the HI-gal catalog

Patrice Okouma
  • 25 Feb '21

Hi Dylan,

I got the TNG-100 for an initial test for extraction of x,y,z positions of galaxies in the sim at z = 1.
Catalog at
I can locate the field for the mass of HI and related BUT not the field for the 3D position
[x_i, y_i, z_i] of any ith HI-galaxy in the HI-gal catalog above.

I am attaching full list of fields as per HDFviewer below.
Could you perhaps assist me in locating the right field to use.

I am basically trying to extract a matrix [x_i, y_i, z_i] of ith HI-galaxy in the HI-gal catalog above + HI mass m_HI_i of the associated ith HI galaxy.

Many thanks in advance


Dylan Nelson
  • 26 Feb '21

HI Patrice,

You need to link the entries in this catalog to the group catalogs. The id_subhalo does this, specifically it gives you the "subhalo ID" of that galaxy.

If you download the group catalogs, or use the scripts, then the x,y,z positions of these galaxies can be obtained as:

ids = hih2_catalog['id_subhalo']
snapNum = 50

SubhaloPos = il.groupcat.loadSubhalos(basePath,snapNum,fields=['SubhaloPos'])

xyz = SubhaloPos[ids,:]

Alternatively, or as a double-check, you can use the API:{id}/

replacing {id} by an actual subhalo ID. Here you see three entries pos_x, pos_y, and pos_z, which are exactly the same as in the group catalog load.

  • Page 1 of 1