Hi all,After upgrading yt to 3.3.3 I'm having trouble with slices. Specifically I'm doing:ds = yt.load(file)slc = ds.slice(2,0.)dx = slc['dr'].min()This is for FLASH data from a run in cylindrical (r,z) symmetry. What I get is:ValueError Traceback (most recent call last)/export/slavin/FLASH/mmsnr/plot_image.py in <module>() 101 slc = ds.slice(2,0.)102 if first:--> 103 dx = slc['dr'].min()104 xgl = ds.index.grids[0].LeftEdge[0]105 xgr = ds.index.grids[-1].RightEdge[0] /export/slavin/python/anaconda/lib/python2.7/site- packages/yt/data_objects/data_ containers.pyc in __getitem__(self, key) 270 return self.field_data[f]271 else:--> 272 self.get_data(f)273 # fi.units is the unit expression string. We depend on the registry274 # hanging off the dataset to define this unit object./export/slavin/python/anaconda/lib/python2.7/site- packages/yt/data_objects/data_ containers.pyc in get_data(self, fields) 1119 def get_data(self, fields=None):1120 if self._current_chunk is None:-> 1121 self.index._identify_base_chunk(self) 1122 if fields is None: return1123 nfields = []/export/slavin/python/anaconda/lib/python2.7/site- packages/yt/geometry/grid_ geometry_handler.pyc in _identify_base_chunk(self, dobj) 302 # fast_index = self._get_grid_tree()303 if getattr(dobj, "size", None) is None:--> 304 dobj.size = self._count_selection(dobj, fast_index = fast_index)305 if getattr(dobj, "shape", None) is None:306 dobj.shape = (dobj.size,)/export/slavin/python/anaconda/lib/python2.7/site- packages/yt/geometry/grid_ geometry_handler.pyc in _count_selection(self, dobj, grids, fast_index) 312 return fast_index.count(dobj.selector) 313 if grids is None: grids = dobj._chunk_info--> 314 count = sum((g.count(dobj.selector) for g in grids))315 return count316/export/slavin/python/anaconda/lib/python2.7/site- packages/yt/geometry/grid_ geometry_handler.pyc in <genexpr>((g,)) 312 return fast_index.count(dobj.selector) 313 if grids is None: grids = dobj._chunk_info--> 314 count = sum((g.count(dobj.selector) for g in grids))315 return count316/export/slavin/python/anaconda/lib/python2.7/site- packages/yt/data_objects/grid_ patch.pyc in count(self, selector) 381382 def count(self, selector):--> 383 mask = self._get_selector_mask(selector) 384 if mask is None: return 0385 return self._last_count/export/slavin/python/anaconda/lib/python2.7/site- packages/yt/data_objects/grid_ patch.pyc in _get_selector_mask(self, selector) 363 mask = self._last_mask364 else:--> 365 mask = selector.fill_mask(self)366 if self._cache_mask:367 self._last_mask = mask/export/slavin/python/anaconda/lib/python2.7/site- packages/yt/geometry/ selection_routines.pyx in yt.geometry.selection_ routines.SliceSelector.fill_ mask (yt/geometry/selection_ routines.c:21029)() 1235 if i == self.axis:1236 ind[i][0] = \-> 1237 <int> ((self.coord - (gobj.LeftEdge[i]).to_ndarray()) / 1238 gobj.dds[i])1239 ind[i][1] = ind[i][0] + 1ValueError: cannot convert float NaN to integer--Anyone have any ideas on why this is happening?Jon________________________________________________________
Jonathan D. Slavin Harvard-Smithsonian CfA
jslavin@cfa.harvard.edu 60 Garden Street, MS 83
phone: (617) 496-7981 Cambridge, MA 02138-1516
cell: (781) 363-0035 USA
________________________________________________________
_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users- spacepope.org