Paste #259

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
10
11
12
import yt
from yt.fields.particle_fields import \
  add_nearest_neighbor_field

fbase = "./group_subh_hgas_iso_hdf5_plt_cnt_0000"
fbase_part = "./group_subh_hgas_iso_hdf5_part_0000"

ds = yt.load(fbase, particle_filename = fbase_part)
fn, = add_nearest_neighbor_field("all", "particle_position", ds)

dd = ds.all_data()
print(dd[fn])