[yt-users] cutting plane not working or changed behavior

Slavin, Jonathan jslavin at cfa.harvard.edu
Fri Mar 10 12:02:20 PST 2017


Hi all,

I have some code that uses a cutting plane to create a non-axis aligned
slice plot:
ds = yt.load(file)
ctr = YTArray([15.,15.,15.],'pc')
cut = ds.cutting(normal=(1.,-1.,0.), center=ctr, north_vector=(0.,0.,1.))
frb = cut.to_frb(width=(42.427,'pc'),height=(30.,'pc'),resolution=(512,724))
image = frb['density']/2.126E-24

I then view the image using the matplotlib imshow command.
The data is a 30 pc**3 cartesian FLASH AMR dataset with maximum resolution
of
​512**3.  I used this code to produce an image, which I have, so I know it
used to work (last April).  Now however it does not seem to project in the
same direction and seems to be shaped incorrectly with a top portion of the
image filled with NaNs.  Has anyone else experienced this behavior?  I
tried various things, for example reducing the resolution or switching the
order of those values (that leads to a core dump!).  The goal here is to
create a slice along the plane aligned with the z axis and 45 degrees away
from the x and y axes (the data goes from 0 to 30 pc in each direction).
Any help would be appreciated.​

Jon

-- 
________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
jslavin at cfa.harvard.edu       60 Garden Street, MS 83
phone: (617) 496-7981       Cambridge, MA 02138-1516
cell: (781) 363-0035             USA
________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170310/d003b9e0/attachment.htm>


More information about the yt-users mailing list