Dear Illustris Collaboration,
I am trying to select halos with zero redshift including only 2 subhalos and collect their subhalos' information(id, coordinates, spin, velocity, mass) by using API or any easier method.
If there are any recipes for doing this, please help me. Unfortunately, I couldn't found any recipes for this myself.
Do you mean, halos with 1 satellite (1 central subhalo and 1 satellite subhalo), or 2 satellites (1 central subhalo and 2 satellite subhalos)?
Either way, we cannot do this search on the web API, because we cannot search on FoF halo quantities. So, we would want to
GroupNsubs = il.groupcat.loadHalos(basePath, snapNum, fields='GroupNsubs')
w = np.where(GroupNsubs == 2)
then w are a set of halo indices. The corresponding subhalo indices of the first and second subhalos of each (i.e. the central and 1st most massive satellite of each) would be:
GroupFirstSub = il.groupcat.loadHalos(basePath, snapNum, fields='GroupFirstSub')
w1 = GroupFirstSub[w]
w2 = GroupFirstSub[w]+1
and the properties of these subhalos e.g.
subhalos = il.groupcat.loadSubhalos(basePath, snapNum, fields=['SubhaloVel','SubhaloSpin'])
vel1 = subhalos['SubhaloVel'][w1,:]
vel2 = subhalos['SubhaloVel'][w2,:]