Questions about how subhalo IDs work

Jacob Morgan
  • 3
  • 27 Sep '20

I'm switching from the web-based API approach to using local data, and trying to line up what I know. To my understanding, subhaloIDs are just the mass ranking of the subhalo at each snapshot. If we do (using TNG100-3)

GroupFirstSub = il.groupcat.loadHalos(basePath,99,fields=['GroupFirstSub'])
GroupFirstSub[1]

returns 544. But I would like to know the mass of the second-most massive subhalo total, regardless of if it's a central subhalo or not. I figured I'd do:

subhalo_gas544=il.snapshot.loadSubhalo(basepath, 99, 544, 'gas')
subhalo_gas1=il.snapshot.loadSubhalo(basepath, 99, 1, 'gas')

subhalo1 has only ~1/10 the number of gas particles as subhalo544, and a similar inquiry shows that subhalo544 has more tightly bound DM particles. So it looks like subhalo544 is more massive than subhalo1. So am I wrong about how subhaloIDs are assigned?

Basically, in the web-based API I got used to being able to only refer to subhalos by snapshot and subhaloID, and I would like to be able to access all information about a subhalo by just these 2 numbers. But if I want to do something like,

subhalos=il.groupcat.loadSubhalos(basepath, 99)

the results are not ordered in accordance with mass OR subhaloID (I think). How would I find information about, say, subhalo544 in the above dataset?

Dylan Nelson
  • 2
  • 27 Sep '20

Hi Jacob,

You are basically correct, just that you shouldn't think of "subhalo IDs" as a mass ranking, but rather as the "index" into the various subhalo arrays (e.g. Subhalo* in the group catalogs). In your example, subhalos 0-543 (inclusive) are the central, and then the satellites, of the first halo. Subhalo 544 is the central of the second halo. The image from the docs is useful:

https://www.tng-project.org/static/data/specifications_snapshot.png

That is, subhalos are ordered according to their halo membership. If you really want to know the second-most massive subhalo, regardless of central status, the only way to know for sure would be to load SubhaloMass for all subhalos, and locate the second highest value.

For your final query, the results are indeed "ordered by subhalo ID" (because this is just the array index).

Jacob Morgan
  • 27 Sep '20

Hmmmmm, ok, I kind of follow. I got that thing about subhalo IDs being a mass ranking from this line in the API tutorial:

"As expected, because subhalo IDs are assigned in order of descending total mass, the most massive subhalo (with ID==0) also has the most stars. The next ID (1030) is likely a central subhalo of a subsequent FoF halo."

so I thought subhalo0>subhalo1>......subhalo2000. But now it sounds like this is only true within each halo, and then the ranking resets, is that right? So if we have halo1 with subhalos 0-3 and halo2 with subhalos 4-6, subhalo0>subhalo1>.....subhalo3, but not necessarily subhalo3>subhalo4 because they are in different halos?

Dylan Nelson
  • 28 Sep '20

Hi Jacob,

That wording is slightly ambiguous, I'll update it.

In reality, halos are sorted by GroupLen (i.e. total length of particles). Within each halo, subhalos are sorted also according to SubhaloLen (i.e. total number of bound particles). Both of these are very similar, possibly identical, to sorting by mass.

(But, the subhalo "rough mass" sorting is within each halo).

Jacob Morgan
  • 29 Sep '20

Got it, thank you so much!

  • Page 1 of 1