Track the image of subhalo into the snapNums

Mojtaba Raouf
  • 1
  • 29 Apr '15

I want to trace back the evolution of halo into the redshift and show the evolution of subhalos which merge with each other within the great host halo(Group).

I know that we can use the "Task 10" in API documentation for doing this, however, would you please tell me how could i change the query for trace back one halo(with a subfindid )in various redshift base on task 10?

Dylan Nelson
  • 30 Apr '15

Hi Mojtaba,

You can use "Task 8" as an example, but you want to walk along the progenitors instead of descendants (backwards in time instead of forwards). To do so, replace "desc_sfid" with "prog_sfid" and "sublink_descendant" with "sublink_progenitor".

There aren't pre-made images for redshifts greater than zero (at the moment), so to make images, you can download a cutout of the stars and visualize them in any way you like. Below is an example of how this might look like in python:

from matplotlib.colors import LogNorm

id = 132699+10 # the tenth most massive subhalo of FOF#20
baseUrl = ""

start_url = baseUrl + "snapshots/135/subhalos/" + str(id)
sub = get(start_url)

numRows = 4 # increase to trace back further
count = 1

while sub['prog_sfid'] != -1:
    # request the full subhalo details of the progenitor by following the sublink URL
    sub = get(sub['related']['sublink_progenitor'])

    print sub['id'], sub['snap']

    # get cutout of stellar positions and masses
    cutout_request = {'stars':'Coordinates,Masses'}
    cutout = get(sub['meta']['url'] + "cutout.hdf5", cutout_request)

    # make 2d histogram visualization of stellar distribution
    with h5py.File(cutout,'r') as f:
        x = f['PartType4']['Coordinates'][:,0] - sub['pos_x']
        y = f['PartType4']['Coordinates'][:,1] - sub['pos_y']
        mass = f['PartType4']['Masses'][:]

    # add to plot
    count += 1

    if count > numRows*5:

the image this produces is:


Mojtaba Raouf
  • 1
  • 12 May '15

Thanks for your answer, However i want to see the merger which occur within group halos by dark matter particles of subhaloes not stars?!!

One more things, how can i find the temperature profile(indicator of X-ray luminnosity) of subhalos within group catalog ?

Dylan Nelson
  • 20 May '15

Hi Mojtaba,

  1. You can switch from stars to dark matter, by replacing cutout_request = {'stars':'Coordinates,Masses'} with cutout_request = {'dm':'Coordinates'} and everywhere PartType4 by PartType0. Also, you can delete the mass-weighting, since all DM particles have the same mass.

  2. If you download a cutout of the gas in a subhalo, you can then calculate the temperature of each gas cell, and then bin in radius, to make a radial temperature profile. This information isn't stored in the group catalog, so you will have to get it from the particle data. As for calculating gas temperature, see

  • Page 1 of 1