Need help with opening catalogs using python_illustris

Ivan Rapoport
  • 3
  • 19 Jan

Hello, I am new to using illustris-TNG

I followed the guide on how to open subhalo catalogs and then fields from installed batches on the PC:
I installed the python_illustris library, and I wanted to try the code on a single batch from the illustris-3 z=1 snapshot, so I installed:
groups_085.0.hdf5
snap_085.0.hdf5
I made sure to follow the folder naming convention and hierarchy
I gave the full path to my folder for basePath:
basePath = 'C:/Users/Ivan/illustris-3/output'
and ran the following lines:
fields = ['SubhaloMass','SubhaloSFRinRad']
subhalos = il.groupcat.loadSubhalos(basePath,85,fields=fields)

this is the resulting error:
[Errno 2] Unable to open file (unable to open file: name = 'C:/Users/Ivan/illustris-3/output//groups_085/fof_subhalo_tab_085.1.hdf5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

From previous threads I understand that this is likely a pathing error, but I am not sure how to resolve this. I can see that the files exist when I run for example:
os.listdir('C:/Users/Ivan/illustris-3/output/groups_085')
-> ['groups_085.0.hdf5']

What can I do to solve this? Thanks in advance,
Ivan

edit: I realize now that the problem may be the fact that I downloaded only 1 batch when it is necessary to download the whole file list, is this really the issue?

Dylan Nelson
  • 1
  • 23 Jan

Yes, you need to download all the "chunks" of a particular snapshot. Otherwise the loading will fail (with a different message), since it knows how many total halos and subhalos there are, and is trying to load them all from the chunks.

The particular issue you have above seems to be the difference in file names between fof_subhalo_tab_085.*.hdf5 and groups_085.*.hdf5.

These are two different conventions, but if you have the current illustris_python scripts, it will automatically try both, as you can see.

  • Page 1 of 1