Discrepancy between "visualization of galaxies and halos" online and halos loaded from data

Xie Yushan
  • 3
  • 2 Jun '19

Hi TNG team and other friends,

I tried to deal with the TNG300-3 data, and here I would like to use TNG300-3, snapshot_78, halo_0 as an example to describe my puzzlements.

At first, my goal was to load all subhalos for the most massive halo- halo_0 in snapshot 78, while I found that there was no direct methods to find the subhalos for a specific halo. Hence my solution is to load the central subhalo by using the "GroupFirstSub", and then load the subsequent subhalos till the one for the next halo.
For Halo_0, I found 279 subhalos in total from subhalo_0 to subhalo_278.

Here my first question: Is my method correct? Or is there any more convenient way to load all of the subhalos for each halo?

Then I plot the distribution of gas mass of halo_0 in snapshot_78 with code (in python):

plt.hist2d(gas_x, gas_y, weights=gas_mass, bins=[150,100])

However, when I checked the visualization of galaxies and halos online (http://www.tng-project.org/data/vis/) for the same halo gas mass map, the result seems so different from mine.

Sorry I failed to upload the images here.

They seem like coming from various datasets, but I have no idea about what was going wrong in my process.
Could you please give me some hints or advice?

Thank you in advance,
Y.-S. Xie.

Dylan Nelson
  • 1
  • 8 Jun '19


Yes you can use GroupFirstSub and GroupNsubs together. You are correct that haloID=0 for TNG300-3 at snapshot 78 has 279 subhalos. You could produce their IDs (indices) without any looping as e.g. np.arange(GroupFirstSub,GroupFirstSub+GroupNsubs).

The online vis tool produces this image for the gas density of this halo. I'm not sure sure what image you made, perhaps if you post it we can think more.

Xie Yushan
  • 21 Jun '19

Hi Dylan,
Sorry for my so late reply!
Here is my image about the gas density of this halo.
It seems like the vis tool image is part of my result, which I marked with the red rectangle.
Is my url accessible?
So I'm not sure how many gas cells should I use when calculating the gas centre for the halo.

Thank you for your patience!
Yushan Xie.

Dylan Nelson
  • 21 Jun '19


Yes you're clearly plotting the right object, just more zoomed out.

Likely this halo is made up of multiple large subhalos, so when you calculate the gas centre, you end up somewhere in the middle. You can, alternatively, use GroupPos or SubhaloPos for the center location.

Xie Yushan
  • 25 Jun '19

Hi Dylan,
I got it, thanks a lot!

  • Page 1 of 1