I'm new to yt. I have questions about making projections of certain region,
and inspecting the data returned.
I made a cube as follows:
import pylab as pl
center = [0.5, 0.5, 0.5]
halfwidth = 0.005
cube = pf.h.region(center, center-pl.ones(3)*halfwidth,
print min(cube['x']), max(cube['x'])
When I print cube['x'].shape, I get (10728,).
I tried to make a projection of this cube along z-axis as follows:
proj2 = pf.h.proj(2, 'Density', center=center, source=cube)
But I could not understand what is returned.
x']), max(proj2['py']), proj2['px'].shape
0.00390625 0.99609375 (19648,)
[ 0. 0. 0. ..., 0. 0. 0.]
My questions are:
1. What exactly is returned in proj2? Why does it span from 0. to 1. when I
2. I also tried 'data_source=cube' instead of 'source=cube'. It did not
raise any error, and returned
something different: array of same shape, but with different data values.
Is this keyword also used
for projection object? Is there a consistent difference between the two
keywords in yt?
3. I could not find documentation on some fields like 'px', 'py' that seem
to be generated for certain data containers
(e.g., 't' for ray objects). Is there an exhaustive list of such fields in
Thanks in advance.