Downloading the 'Subhalo Matching To Dark' and creating a base path for that file, how do you access the catalog? If you use groupcat.py, then what do you define the snapshot number to be?
Dylan Nelson
20 Sep '16
Hi Alexandres,
The supplementary catalogs can't (aren't by default) loaded with the provided scripts, but just manually, e.g.
f = h5py.File('subhalo_matching_to_dark.hdf5','r')
dark_inds = f['Snap_135_SubhaloIndexDark'][()]
f.close()
note also I have flipped the last line, following the description of this matching catalog: "array of integer indices, with a length equal to the number of subhalos in the full physics run. Each value in the array gives the corresponding index of the matched subhalo in the DM only run."
Alexandres Lazar
20 Sep '16
And then with FirstSubD, I can apply to field of my choosing to extract those values, ie
assuming they are shape (N,3), or flipped if (3,N), I forget which.
For values that return -1, do you mean particularly in this case? E.g., halos with no first subhalo? If you are particularly interested in low-mass halos and need the matching, you could do a matching on FoFs instead of on Subfind, but you would have to do this yourself, we don't have anything. But, these are mostly FoF halos near the minimum particle limit of 32, meaning they are really not resolved and their properties are not robust. It would make more sense to consider only FoF halos with at least >=100 particles, say.
Alexandres Lazar
20 Sep '16
So I would be completely fine to still use indices of -1? Or could I just remove the indices of -1 for the particular case of indexing with Subhalo match to dark with values of the hydrodynamical run?
Dylan Nelson
20 Sep '16
You must remove them, which I did above with w = np.where(halos['GroupFirstSub'] >= 0) and then using only the subset defined by w from then on.
Downloading the 'Subhalo Matching To Dark' and creating a base path for that file, how do you access the catalog? If you use
groupcat.py
, then what do you define the snapshot number to be?Hi Alexandres,
The supplementary catalogs can't (aren't by default) loaded with the provided scripts, but just manually, e.g.
Once again, I appreciate it, Dylan.
One quicky, for the indexing, what is wrong with the way I have it in this example?
This returns an index error
Actually probably exactly what we just discussed here:
http://www.illustris-project.org/data/forum/topic/51/groupfirstsub-in-illustris-3/
so you need to filter out those halos without any subhalos (equivalently any reasonable minimum mass cut would do the trick), e.g.
note also I have flipped the last line, following the description of this matching catalog: "array of integer indices, with a length equal to the number of subhalos in the full physics run. Each value in the array gives the corresponding index of the matched subhalo in the DM only run."
And then with
FirstSubD
, I can apply to field of my choosing to extract those values, ie?
One final question that could raise future issues. How do you deal with values that return -1?
Yes but be careful since those are 3D fields, e.g.
assuming they are shape (N,3), or flipped if (3,N), I forget which.
For values that return -1, do you mean particularly in this case? E.g., halos with no first subhalo? If you are particularly interested in low-mass halos and need the matching, you could do a matching on FoFs instead of on Subfind, but you would have to do this yourself, we don't have anything. But, these are mostly FoF halos near the minimum particle limit of 32, meaning they are really not resolved and their properties are not robust. It would make more sense to consider only FoF halos with at least >=100 particles, say.
So I would be completely fine to still use indices of -1? Or could I just remove the indices of -1 for the particular case of indexing with
Subhalo match to dark
with values of the hydrodynamical run?You must remove them, which I did above with
w = np.where(halos['GroupFirstSub'] >= 0)
and then using only the subset defined byw
from then on.