Paste #374
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 :-)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import yt if __name__ == "__main__": ds = yt.load("/disk12/legacy/GVD_C700_l1600n2048_SLEGAC/dm_gadget/covering_grids/snapshot_101_covering_grid.h5") c = ds.arr([0.70095276, 0.84325974, 0.81088409], "unitary") w = ds.quan(83, "Mpccm/h") box = ds.box(c-w/2, c+w/2) V = box.quantities.total_quantity(("index", "cell_volume")) M = box.quantities.total_quantity(("grid", "nbody_mass")) rho_ave = ds.cosmology.critical_density(0) * (1 + ds.current_redshift)**3 * ds.omega_matter delta = (M/V) / rho_ave - 1 print (f"{delta=}") |