Hi Dave,<br><br>I believe the problem is that the ray travels right down cell boundaries with ever entering any cells.  The ray tool expects the ray to go into cells and will not interpolate between cells if it's right on the boundary.  The divide by zero is coming from trying to calculate exactly where the ray intersects cell boundaries in each direction.  If you move the start or end positions just a hair in both the x and y, it should be fine.<br>
<br>Britton<br><br><div class="gmail_quote">On Wed, Oct 20, 2010 at 8:13 PM, david collins <span dir="ltr"><<a href="mailto:antpuncher@gmail.com">antpuncher@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi, all--<br>
<br>
I'm having trouble with add_ray.  I'm trying to do the following, but<br>
I get the error that follows the following.  I saw that Dr. Tasker<br>
recently did a nearly identical thing with more success.  I've tried<br>
it both on Triton, with the projects install at<br>
/projects/lca-group/bla and a trunk install on Kraken.  Any thoughts?<br>
It works if I use [0.0]*3 and [1.0]*3 as my endpoints.<br>
<br>
>>> this_ray = pf.h.ray([0.5]*3,[0.5,0.5,1.0],'Density')<br>
>>> f='x-velocity'<br>
>>> L = plt.plot(this_ray['x'],this_ray[f])<br>
<br>
Traceback (most recent call last):<br>
  File "<stdin>", line 1, in <module><br>
  File "tmp.py", line 5, in <module><br>
    L = plt.plot(this_ray['x'],this_ray[f])<br>
  File "/projects/lca-group/local-dev/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/lagos/BaseDataTypes.py",<br>
line 249, in __getitem__<br>
    self.get_data(key)<br>
  File "/projects/lca-group/local-dev/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/lagos/BaseDataTypes.py",<br>
line 424, in get_data<br>
    for grid in self._grids])<br>
  File "/projects/lca-group/local-dev/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/lagos/BaseDataTypes.py",<br>
line 529, in _get_data_from_grid<br>
    mask = na.logical_and(self._get_cut_mask(grid),<br>
  File "/projects/lca-group/local-dev/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/lagos/BaseDataTypes.py",<br>
line 58, in check_cache<br>
    cm = func(self, grid)<br>
  File "/projects/lca-group/local-dev/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/lagos/BaseDataTypes.py",<br>
line 542, in _get_cut_mask<br>
    grid.dds, self.center, self.vec)<br>
  File "RayIntegrators.pyx", line 156, in yt.amr_utils.VoxelTraversal<br>
(yt/amr_utils.c:9986)<br>
ZeroDivisionError: float division<br>
>>> lagos<br>
<module 'yt.lagos' from<br>
'/projects/lca-group/local-dev/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/lagos/__init__.pyc'><br>
<font color="#888888"><br>
--<br>
Sent from my Stone Tablet and carried by my Pterodactyl.<br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</font></blockquote></div><br>