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 = "http://www.illustris-project.org/api/Illustris-1/"

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

numRows = 4 # increase to trace back further
plt.figure(figsize=[5*3,numRows*3])
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
    plt.subplot(numRows,5,count)
    plt.hist2d(x,y,weights=mass,bins=[50,50],norm=LogNorm())
    plt.text(np.min(x),np.max(y)+5,"snap="+str(sub['snap']))
    plt.gca().axes.get_xaxis().set_ticks([])
    plt.gca().axes.get_yaxis().set_ticks([])
    count += 1

    if count > numRows*5:
        break

the image this produces is:

index.png

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 http://www.illustris-project.org/data/docs/faq/#snap1.

  • Page 1 of 1