I was wondering if you could give your opinion on this issue. Particle data is accessed by means of the loadSubhalo method apllied to the snapshot object , the arguments of this method include the "id". Id in this context is the index in the subhalo catalog (for example, at z=0 in the Illustris-3 simulation, a number between 0 and 127000 aprox.), not the SubhaloID given by the loadTree method.
If you want to access the particle data when walking through a tree, how is the best way to do it? I have managed to make a function, that returns the index in the subhalo catalog giving the SubhaloID from the tree, but it is not very efficient. Is there a straightforward way to do it?
Many thanks in advance.
You're right the SubhaloID is really internal to the trees.
But, in the tree we also have SubfindID and SnapNum. If you load these two fields when walking through the tree, then they immediately give you the inputs you need for a loadSubhalo() particle call.
Oh! The SubfindID is the Index for the loadSubhalo call. I though it was the equivalent of the SubhaloID but only available for the LHalo trees. I mis interpreted it.