Paste #118

Welcome To LodgeIt

Welcome to the LodgeIt pastebin. In order to use the notification feature a 31 day cookie with an unique ID was created for you. The lodgeit database does not store any information about you, it's just used for an advanced pastebin experience :-). Read more on the about lodgeit page. Have fun :-)

hide this notification

1
2
3
4
5
6
7
8
9
import yt

data_ds = yt.load(<original snapshot>)
halos_ds = yt.load("catalog/catalog.0.h5")
for i in range(halos_ds.r['particle_identifier'].size):
    center = data_ds.arr(halos_ds.r['particle_position'][i].to('unitary'), 'unitary')
    radius = data_ds.quan(halos_ds.r['virial_radius'][i].to('unitary'), 'unitary')
    sphere = data_ds.sphere(center, radius)
    pos = sphere['particle_position']