[yt-users] Get particle extent for a non-cosmological simulation

Jared Coughlin Jared.W.Coughlin.29 at nd.edu
Mon Dec 11 09:52:56 PST 2017


Hello! I have a gadget snapshot that was generated from a non-cosmological
simulation. This causes yt to ignore the box size parameter. However, when
I try to make a plot, yt generally fails because ds.domain_left_edge =
ds.domain_right_edge = 0.0. This necessitates that I change those
parameters manually. My question is: is there a way to get the domain
bounds from the file so that I don't have to set these manually every time?

I noticed that if I get the box size wrong, yt complains about particle
bounds exceeding the domain bounds, and so I looked a little bit at the
code to see if I could figure out how yt was getting these numbers and see
if I could just do something similar, but I haven't had a whole lot of
luck. It seems that in the compute_morton function there's a pos_x.max and
min function, but those are passed in _initialize_index as data having been
read from an hdf5 file?

I'm not super sure I understand what's going on there, but if anyone has
any thoughts, I'd greatly appreciate it. I basically just need the max and
min particle positions along each of the x, y, and z directions, but trying
ad["Coordinates"] fails unless the bounds are properly set to begin with.
Thanks!

-Jared
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20171211/be41fd72/attachment.html>


More information about the yt-users mailing list