Hi Matt,

On Dec 2, 2009, at 3:27 PM, Matthew Turk wrote:

Hi Rick,

I'm looking at the fixed resolution extraction example, and I'm wondering: what ordering (row or column) will the final will have?

The "cube" object in that example can also return the x, y, z fields. If you add this code in to the example:

for xi in [0, -1]: for yi in [0, -1]: for zi in [0, -1]: print xi, yi, zi, print cube['x'][xi,yi,zi], print cube['y'][xi,yi,zi], print cube['z'][xi,yi,zi]

the results give back:

0 0 0 0.00390625 0.00390625 0.00390625 0 0 -1 0.00390625 0.00390625 0.99609375 0 -1 0 0.00390625 0.99609375 0.00390625 0 -1 -1 0.00390625 0.99609375 0.99609375 -1 0 0 0.99609375 0.00390625 0.00390625 -1 0 -1 0.99609375 0.00390625 0.99609375 -1 -1 0 0.99609375 0.99609375 0.00390625 -1 -1 -1 0.99609375 0.99609375 0.99609375

So the set of array indices [0,0,0] is the lowest value in all three coordinates and the set of array indices [-1, -1, -1] is the maximum in all three coordinates. These correspond to the coordinate system Enzo uses. Does that answer your question?

I think it does, since the field referenced by cube['x'] is the same type of object (i.e., Numpy ndarray) as cube["Density"]. After writing out the x, y and z fields to a test file everything seems to be in order (some pun intended).

Thanks, Rick

-Matt _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org