Data in Subhalo Search does not match data accessed using `loadSubhalos` (sig figs issue)

Ambica Govind
  • 1
  • 17 Sep '23

Here's where you can find data from TNG50-1.
As you can see SubhaloID zero gives a dark matter mass of 11400 10^10 solar masses/h. However when I try to access the same via this command:

basePath = 'sims.TNG/TNG50-1/output'
mass_type_code=il.groupcat.loadSubhalos(basePath,99,fields=['SubhaloMassInRadType','SubhaloHalfmassRad','SubhaloFlag','SubhaloMass','SubhaloSFR','SubhaloVmax','SubhaloVelDisp'])
mass_type_code

the result for mass_type_code is

{'count': 5688113,
 'SubhaloMassInRadType': array([[1.9089340e+01, 6.2826105e+02, 0.0000000e+00, 0.0000000e+00,
         2.4609709e+02, 5.7894856e-01],
        [4.8656287e-03, 2.0372456e+01, 0.0000000e+00, 0.0000000e+00,
         1.8507784e+01, 5.4223195e-02],
        [6.1318814e-03, 1.1299605e+01, 0.0000000e+00, 0.0000000e+00,
         9.1996527e+00, 2.9711133e-02],
        ...,
        [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
         0.0000000e+00, 0.0000000e+00],
        [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
         0.0000000e+00, 0.0000000e+00],
        [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
         0.0000000e+00, 0.0000000e+00]], dtype=float32),
 'SubhaloHalfmassRad': array([362.2303   ,  29.539518 ,  58.69923  , ...,   2.2308853,
          1.787874 ,   2.9835608], dtype=float32),
 'SubhaloFlag': array([ True,  True,  True, ...,  True,  True,  True]),
 'SubhaloMass': array([1.3289604e+04, 1.6945901e+02, 1.5706009e+02, ..., 9.8357664e-04,
        9.8357664e-04, 7.9915603e-04], dtype=float32),
 'SubhaloSFR': array([1.1578332e+00, 0.0000000e+00, 9.8545756e-04, ..., 0.0000000e+00,
        0.0000000e+00, 0.0000000e+00], dtype=float32),
 'SubhaloVmax': array([1093.4725   ,  536.15564  ,  354.70453  , ...,    3.4943771,
           3.9826174,    3.2285786], dtype=float32),
 'SubhaloVelDisp': array([501.2919   , 212.09184  , 154.11183  , ...,   2.0532544,
          2.1960058,   1.3457043], dtype=float32)}

and you can see that none of the members in the first element of mass_type_code['SubhaloMassInRadType'] are even close to this. Please help. It would also be great if you let me know which Particle type each of the six entries correspond to, since the documentation only states 5 kinds of particles to my knowledge. Thank you!

Dylan Nelson
  • 19 Sep '23

If you click on the 'spyglass' icon you are taken to the API page for subhalo 0 of TNG50-1 at z=0. Then you can see "mass": 13289.6, which agrees with your SubhaloMass[0] from loadSubhalos() above. The "InRad" and "InHalfRad" values also seem ok.

You are right, however, that the "Subhalo Search" seems to be rounding (some) numbers to 3 significant digits, for display.

Dylan Nelson
  • 19 Sep '23

I've turned this off, not sure why I thought this was ever a good idea. (Masses now always show two digits after the decimal points in this Search Results page). Thanks for pointing it out.

Ambica Govind
  • 26 Sep '23

Thank you for the clarification, but my question was more along these lines:
The SubhaloMassInRadType field for ID=0 is [1.9089340e+01, 6.2826105e+02, 0.0000000e+00, 0.0000000e+00, 2.4609709e+02, 5.7894856e-01].
Which value corresponds to which mass component(dark matter, stars, gas etc)? Because the masses as seen in Subhalo Search are very much different from what is in this list?

Dylan Nelson
  • 26 Sep '23

You will find the six particle types/numbers in the snapshot documentation.

The masses shown in subhalo search are, by default, the total masses, not the masses within twice the half mass radius.

  • Page 1 of 1