[yt-users] FRB question
Matthew Turk
matthewturk at gmail.com
Tue Sep 16 06:43:53 PDT 2014
On Tue, Sep 16, 2014 at 8:33 AM, David Collins <dcollins4096 at gmail.com> wrote:
> 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?
I think you only need to specify 0.5, the coordinate at which you take
the slice, not [0.5, 0.5, 0.5].
>
> 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
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
More information about the yt-users
mailing list