(il.snapshot.loadSubhalos) throwing Exception: Group catalog does not have requested field [SubhaloFlag]!

André Barbosa
  • 26 Dec '22

Hi Dylan,

Trying to load subhalo data using the API:

snap = 99
subfields = ['SubhaloFlag', 'SubhaloBHMass']
subhalos = ill.groupcat.loadSubhalos(basePath, snap, fields=subfields)

Exception: Group catalog does not have requested field [SubhaloFlag]! (which are listed in the Data Spec)...

Question: what are the admissable fields that can be used with the ill.groupcat.loadSubhalos function of the API?

Dylan Nelson
  • 28 Dec '22

What is basePath in your example?

André Barbosa
  • 28 Dec '22

Thanks Dylan,

My basepath changes locally depending on whether I am on Linux/Windows:

# Config basepath accordingly (Linux vs Windows)
basePath = 'D:/IllustrisData/TNG100-1-Dark/output'
#basePath = '/home/andre/Illustris_Data/TNG100-1-Dark/output'

But I dont think that is the issue, since getting the halo data is working:

snap = 99
fields = ['Group_M_Crit200', 'GroupFirstSub']
halos = ill.groupcat.loadHalos(basePath, snap, fields=fields)
print("halos['Group_M_Crit200'] = ", halos['Group_M_Crit200'].shape)
print("halos['GroupFirstSub'] = ", halos['GroupFirstSub'])

The issue happens when I try the corresponding sub-halo data:

subfields = ['SubhaloFlag', 'SubhaloMass']
subhalos = ill.groupcat.loadSubhalos(basePath, snap, fields=subfields)

This is for Illustris-1-Dark locally downloaded (snap-99).

Dylan Nelson
  • 28 Dec '22

The SubhaloFlag field only exists for baryonic runs, not dark matter only runs, where it wouldn't make sense.

I have added this clarification to the documentation, thanks for the note.

André Barbosa
  • 28 Dec '22

Thanks Dylan.

  • Page 1 of 1