[yt-users] FLASH and Off Axis Projections

John Zuhone jzuhone at gmail.com
Thu Jun 11 09:10:25 PDT 2015


Hi Jeff,

Which cookbook example are you using? I think you might have to paste the script in full that shows the YTUnitOperationError, because I can’t produce that one over here with a FLASH dataset I have using the two lines you posted. 

As far as the indices/periodic boundaries error, I have seen this one before, and it has to do with the fact that when you project along the whole depth of the domain, to do the off-axis projection it wants to create guard cells that are outside the domain, and it doesn’t know how to do that unless the boundary is periodic. This is something we probably need to fix for non-periodic datasets. You can do two things here:

1) You can adjust the depth of the projection so it doesn’t span the entire domain, by changing the “depth” of the projection. This example only projects through half the domain size:

prj = yt.OffAxisProjectionPlot(ds, [-1,1,0], 'dens', depth=(0.5,"unitary”))

where “unitary” refers to the size of the domain. 

2) You can override the periodicity for the dataset by doing this:

ds.periodicity = (True, True, True)

which will fool yt into thinking the domain is periodic. Depending on what your data is like, the resulting image would probably be fine, especially if the stuff on the edges is of low significance. 

Best,

John Z

> On Jun 11, 2015, at 11:56 AM, Jeffrey Alan Gritton <jgritton at uga.edu> wrote:
> 
> Hi all,
> 
> I'm having a bit of a problem with off axis projections and my FLASH domains. I want to create an off axis projection for the entire domain. However, I try to follow the Cookbook I run into one of two errors. The first being:
> 
> ds = yt.load("4.2.1_hdf5_plt_cnt_0150")
> prj = yt.OffAxisProjectionPlot(ds, [-1,1,0], 'dens')
> ...
> ...
> YTUnitOperationError: The subtraction operator for YTArrays with units (code_length) and (1) is not well defined.
> 
> 
> The second I can't recreate at the moment but yt throws an error back complaining about accessing indicies outside of the array and suggests overriding periodic boundaries. My domain has no periodic boundaries. Has anyone ever run into this?
> 
> 
> Thank you for your help,
> 
> Jeff
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org <mailto:yt-users at lists.spacepope.org>
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org <http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150611/fb1045e3/attachment.htm>


More information about the yt-users mailing list