[yt-users] FRB question

David Collins dcollins4096 at gmail.com
Tue Sep 16 06:33:26 PDT 2014


Hi, Everybody--

I have a dumb question about getting fixed resolution buffers working in
yt3.0.  I'm trying the following:

>>> slice = ds.slice(0,[0.5]*3)
>>> frb = slice.to_frb((1.0,'unitary'),[512,512])

but accessing data in the frb is causing things to choke.  Any idea what I
might be doing wrong?

Thanks!

>>> frb['density']
yt : [INFO     ] 2014-09-16 09:29:47,060 Making a fixed resolution buffer
of (density) 512 by 512
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/visualization/fixed_resolution.py",
line 127, in __getitem__
    int(self.antialias))
  File
"/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/geometry/cartesian_coordinates.py",
line 54, in pixelize
    antialias, dimension, periodic)
  File
"/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/geometry/cartesian_coordinates.py",
line 67, in _ortho_pixelize
    buff = _MPL.Pixelize(data_source['px'], data_source['py'],
  File
"/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/data_objects/data_containers.py",
line 237, in __getitem__
    self.ds.arr(self._generate_container_field(f))
  File
"/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/data_objects/selection_data_containers.py",
line 231, in _generate_container_field
    self.index._identify_base_chunk(self)
  File
"/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/geometry/grid_geometry_handler.py",
line 280, in _identify_base_chunk
    gi = dobj.selector.select_grids(self.grid_left_edge,
  File
"/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/data_objects/data_containers.py",
line 546, in selector
    self._selector = sclass(self)
  File "selection_routines.pyx", line 974, in
yt.geometry.selection_routines.SliceSelector.__init__
(yt/geometry/selection_routines.c:22578)
TypeError: a float is required
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140916/799d7d7e/attachment.htm>


More information about the yt-users mailing list