Stellar Mass Distribution images of galaxies from Rosas-Guevara+10

Thiago Bueno Dalpiaz
  • 2
  • 16 Apr '22

Hi there,

I am annalyzing the data about barred galaxies available on the TNG50 Rosas-Guevara+10 catalog. I need to make an image of stellar mass distribution of the 53 strong barred galaxies presented, but still unsure how to do it. What i have until now is the following code:

import h5py
import numpy as np

filename = "tng50-1_bars_rosasguevara22.hdf5"

with h5py.File(filename,'r') as f:
    glxtype = f['Snapshot_99']['Bartype'][:]
    Amax = f['Snapshot_99']['TabAmax2'][:]
    Rbar = f['Snapshot_99']['TabRbar'][:]

    barred = np.where(glxtype == 1)
    strong_barred = np.where((glxtype == 1) & (Amax >= 0.4))

    subid = f['Snapshot_99']['SubfindID'][:]
    mass = f['Snapshot_99']['TabMstar'][:]
    log_mass = np.log10(mass)

    brd_glx_id = subid[barred]
    brd_glx_mass = log_mass[barred]
    brd_glx_Amax = Amax[barred]
    brd_glx_Rbar = Rbar[barred]
    str_brd_glx_id = subid[strong_barred]
    str_brd_glx_mass = log_mass[strong_barred]
    str_brd_glx_Amax = Amax[strong_barred]
    str_brd_glx_Rbar = Rbar[strong_barred]

Thanks, Thiago

Dylan Nelson
  • 18 Apr '22

I would just use the SubfindID with the VIsualize Galaxies tool (select "particle type" = "stars" and "field" = "coldens_msunkpc2").

Once you make one as you like it, you'll see the link into the API which generates the image, then you can just use this API point and loop over all your SubfindID's, to make all the images programmatically.

  • Page 1 of 1