There were some values that appeared wrong when doing further analysis. So I just indexed those out.
remove_indices = [261,389,409, 525, 592, 695, 739, 831, 882, 1211]
mask = [i for j, i in enumerate(mask) if j not in remove_indices]
I then use the dark matter to match file
# The indexing of the these MW halos most massive subhalo (Which is the Host)
firstSub = halos['GroupFirstSub'][mask]
firstSub = firstSub.astype('int32')
# The indexing of the halos 'true' subhalo
secondSub = firstSub+1
# From the indexing into the Hydrodynamical simulation, the dark matter matching module
# is then used to corresping to the 'most massive' subhalos
firstSubD = DarkInd[ firstSub ]
# This is just to remove the elements that have the values of zero
# Values with 0 means their is no corresponding DM ran subhalo to match the Hydro simulatiom
w1 = np.where(firstSubD >= 0 )
firstSubD = firstSubD[w1]
secondSubD = firstSubD + 1
So then now, I retrieve the mass values for the hydro run easily by using the mask variable defined above
This returns the same values over and over again. Anyway to fix this?
Apologize as well for making this post an Announcement instead of a question.
Dylan Nelson
8 Jan '17
Hi Alexandres,
I think you maybe want to use SubhaloGrNr instead of SubhaloParent. The former gives a group/fof index, while the later gives a subhalo/subfind index. And, note that in Illustris in almost every case SubhaloParent of a satellite points to its central, while SubhaloParent of a central points to itself. The purpose of this field is to encode the hierarchical result of Subfind (e.g. subhalos of subhalos of subhalos) which is rare in Illustris.
More typically, we use SubhaloGrNr to get the SO quantities like Group_M_Crit200 like
I'm having a bit of trouble in taking steps for retrieving the Parent halo through this iteration.
First, I retrieve the particle data with my self defined base paths. It all works
I then export the halo indexes for the mass range I want to analyze. I do this for both the Hydrodynamical and DMO runs.
There were some values that appeared wrong when doing further analysis. So I just indexed those out.
I then use the dark matter to match file
So then now, I retrieve the mass values for the hydro run easily by using the
mask
variable defined aboveBut if I wanted to retrieve the halo mass for the dark halo fields using
SubhaloParent
field, this is were i'm running into some problems.This returns the same values over and over again. Anyway to fix this?
Apologize as well for making this post an Announcement instead of a question.
Hi Alexandres,
I think you maybe want to use
SubhaloGrNr
instead ofSubhaloParent
. The former gives a group/fof index, while the later gives a subhalo/subfind index. And, note that in Illustris in almost every caseSubhaloParent
of a satellite points to its central, whileSubhaloParent
of a central points to itself. The purpose of this field is to encode the hierarchical result of Subfind (e.g. subhalos of subhalos of subhalos) which is rare in Illustris.More typically, we use
SubhaloGrNr
to get the SO quantities likeGroup_M_Crit200
likeThank you, Dylan!