Identifying a disk galaxy

Leo Macintyre
  • 1
  • 2 Oct '20

Hi,

I am trying to identify a disk galaxy using CircAbove07Frac, however I dont understand how to actually call it?

I am trying to do something along the lines of:

fields=['CircAbove07Frac']

diskiness=il.snapshot.loadSuhalo(basePath, int(input("SnapNum: ")),int(input("ID: ")),'stars',fields = fields)

however this obviously doesnt work. Basically how can I access the CircAbove07Frac for a given input galaxy?

Thanks

Dylan Nelson
  • 2 Oct '20

Hi Leo,

This data about circularities is in the "supplementary data catalog", not part of the original group catalog (so loadSubhalo won't work). Have you downloaded it for the simulation you want already? If so, e.g.

with h5py.File('stellar_circs.hdf5','r') as f:
    SubfindID = f['Snapshot_99/SubfindID'][()]
    CircAbove07Frac = f['Snapshot_99/CircAbove07Frac'][()]

target_subhalo_id = 12345
w = np.where(SubfindID == target_subhalo_id)
print('circ for this subhalo: ', CircAbove07Frac[w])
Leo Macintyre
  • 2 Oct '20

Hi,
Thanks for your response.

I am getting the error:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

I tried changing 'r' to 'rb' but it gave the same error. If you (or anyone) have any ideas it would be greatly appreciated.

Thanks

Dylan Nelson
  • 2 Oct '20

Hi Leo,

Not sure, that doesn't make much sense. What is the full output of:

f = h5py.File('stellar_circs.hdf5','r')
x = f['Snapshot_99/SubfindID'][()]

If it makes an error, either the file is wrong/corrupt (try redownloading), or your install of python/hdf5/h5py is wrong/corrupt.

Leo Macintyre
  • 8 Oct '20

Hi Dylan,

Late reply - I got all that stellar_circs stuff working so thank you for that, I just have a question on the Subfind/subhaloIDs.

If I have a subfindID of say 1000 in snapshot 50, and I want to extract the CircAbove07Frac for that galaxy throughout all the snapshots, I believe I need to:
1) Identify the subhaloID of the galaxy
2) use the subhaloID and the snapshot number for each point in time to find the corresponding subfindID for that galaxy at each snapshot
3) use the subfindID to extract the CircAbove07Frac for the galaxy at each snapshot.

Is this correct? I am just a bit confused as to how the different IDs work.

Thanks

Dylan Nelson
  • 9 Oct '20

Hi Leo,

"subfindID" and "subhaloID" are going to be the same thing. So you would follow the first code snippet, replacing 12345 by 1000 and snapshot 99 by 50. If you want to follow this object through time, you need to load it's merger tree. Once you load the main progenitor branch (backwards in time), you have two arrays SnapNum and SubfindID. At each snapshot, you re-do the same process to locate where, in the stellar circs catalog, that subfind ID is located.

  • Page 1 of 1