Projecting a smaller subset of the simulation box

Alexandres Lazar
  • 13 Jul '17

Hi Dylan,

When going about projecting the cosmic web in histogram2d like in the snapshot section of the Example Scripts page, is it possible focus on one of the denser regions by making a subset of the volume with sides of length 2 cMpc and project the high number of particle data surrounding it?

More so, but constraining the 'dm_pos' somehow?

Dylan Nelson
  • 21 Jul '17

If you have the position of a group or subhalo, e.g. center containing the x,y,z coordinates, then it should be simple to restrict the histogram and re-center, something like

center = [x,y,z]
for i in range(3):
    dm_pos[:,i] -= center[i]
w = np.where( np.abs(dm_pos) <= 2000.0 )

dm_pos_nearby = dm_pos[w]

plt.hist2d(dm_pos_nearby[:,0], dm_pos_nearby[:,1], norm=mpl.colors.LogNorm(), bins=64);
  • Page 1 of 1