I use ill.groupcat.loadHalos() to load halos. But there is no haloID. So I use the index as the haloID. I don't know if it is correct. And I want to know subhalos' ID in one halo, for example, the 27th halo. How can I do?
Thanks for your time and your help!
Dylan Nelson
12 Aug '21
I am not entirely sure what you mean by "the index", but in general we use the terms "halo ID" and "halo index" interchangeably. So likely this is the correct approach, although it depends on what index you are using.
To obtain the subhalo IDs (or indices) of a given halo, you can use the GroupFirstSub and GroupNsubs entries. For halo ID (or index) i, then range(GroupFirstSub[i], GroupFirstSub[i]+GroupNsubs[i]) gives the list of subhalo IDs in that group.
Hi!
I use ill.groupcat.loadHalos() to load halos. But there is no haloID. So I use the index as the haloID. I don't know if it is correct. And I want to know subhalos' ID in one halo, for example, the 27th halo. How can I do?
Thanks for your time and your help!
I am not entirely sure what you mean by "the index", but in general we use the terms "halo ID" and "halo index" interchangeably. So likely this is the correct approach, although it depends on what index you are using.
To obtain the subhalo IDs (or indices) of a given halo, you can use the
GroupFirstSub
andGroupNsubs
entries. For halo ID (or index)i
, thenrange(GroupFirstSub[i], GroupFirstSub[i]+GroupNsubs[i])
gives the list of subhalo IDs in that group.Dear Dylan
That's what I need! Thanks for your help!!
Best wishes
Jinning Liang