Hi Guido, The *order* inside that container will be essentially a combination of resolution, IO, etc -- so, basically, not terribly consistent. Within a given data container, the arrays will always be laid out in the same order -- temp and density will be the same order, for instance. You can find out the spatial coordinates by looking at "x", "y", "z", and also .fcoords , but it sounds like what you might want is to reorder it into a 3D array. You can do this by creating a covering grid, but it will include things that are not in the disk object. Hope that helps! -Matt On Fri, Oct 4, 2019 at 3:02 PM Guido Granda Muñoz <guidogranda@gmail.com> wrote:
Hello yt users, I would like to know how data is arranged on yt arrays given a data container. For example, if I have a disk data container
ds=yt.load(snap) disk=ds.disk(center,normal,(radi,'pc'),(height,'pc'))
And I want to obtain the density:
dens=disk['dens']
Lets say that gives me a YT.array of shape (4000,). What I would like to know is how the 3D density is storage into this 1D array, for example if the density is storage first along the 'x' axis, then the 'y' axis, and finally the 'z' axis, e.g. :
for i in range(x_dims): for j in range(y_dims): for k in range(z_dims): disk['dens'] = density_inside_disk[i,j,k]
I don't know where to find that information in the yt source code. Do you know that? I'm not sure if the array disk.icoords provides that information.
Cheers, _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org