[yt-users] add_ray problem

david collins antpuncher at gmail.com
Wed Oct 20 19:13:40 PDT 2010


Hi, all--

I'm having trouble with add_ray.  I'm trying to do the following, but
I get the error that follows the following.  I saw that Dr. Tasker
recently did a nearly identical thing with more success.  I've tried
it both on Triton, with the projects install at
/projects/lca-group/bla and a trunk install on Kraken.  Any thoughts?
It works if I use [0.0]*3 and [1.0]*3 as my endpoints.

>>> this_ray = pf.h.ray([0.5]*3,[0.5,0.5,1.0],'Density')
>>> f='x-velocity'
>>> L = plt.plot(this_ray['x'],this_ray[f])

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "tmp.py", line 5, in <module>
    L = plt.plot(this_ray['x'],this_ray[f])
  File "/projects/lca-group/local-dev/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/lagos/BaseDataTypes.py",
line 249, in __getitem__
    self.get_data(key)
  File "/projects/lca-group/local-dev/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/lagos/BaseDataTypes.py",
line 424, in get_data
    for grid in self._grids])
  File "/projects/lca-group/local-dev/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/lagos/BaseDataTypes.py",
line 529, in _get_data_from_grid
    mask = na.logical_and(self._get_cut_mask(grid),
  File "/projects/lca-group/local-dev/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/lagos/BaseDataTypes.py",
line 58, in check_cache
    cm = func(self, grid)
  File "/projects/lca-group/local-dev/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/lagos/BaseDataTypes.py",
line 542, in _get_cut_mask
    grid.dds, self.center, self.vec)
  File "RayIntegrators.pyx", line 156, in yt.amr_utils.VoxelTraversal
(yt/amr_utils.c:9986)
ZeroDivisionError: float division
>>> lagos
<module 'yt.lagos' from
'/projects/lca-group/local-dev/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/lagos/__init__.pyc'>

-- 
Sent from my Stone Tablet and carried by my Pterodactyl.



More information about the yt-users mailing list