[yt-users] Temperature Slice Issues with Gasoline data

ALEXANDER WOODFINDEN woodfiaj at mcmaster.ca
Mon Jun 16 08:51:41 PDT 2014


Hi Matt,

That worked! Thanks for your help.

Alex


On Mon, Jun 16, 2014 at 11:26 AM, Matthew Turk <matthewturk at gmail.com>
wrote:

> Hi Alex,
>
> Can you try changing your command to be explicitly:
>
> slc = SlicePlot(pf,'z',("gas",
> 'temperature'),width=(1,'kpc'),center=[0,0,0])
>
> and see if that addresses it?  It looks like it's trying to get a
> fixed res of the particle temperature, which won't work.
>
> -Matt
>
> On Mon, Jun 16, 2014 at 10:17 AM, ALEXANDER WOODFINDEN
> <woodfiaj at mcmaster.ca> wrote:
> > Hi everyone,
> >
> > I'm new to yt and am using the latest version (3.0), with support for
> TIPSY
> > output.  I'm having issues creating temperature slices.  The data I am
> using
> > is a periodic box, not equal length in all dimensions.
> >
> > My script goes like this:
> >
> > pf = load(fn, parameter_file=paramfile)
> > pf.field_list
> > slc = SlicePlot(pf,'z','temperature',width=(1,'kpc'),center=[0,0,0])
> >
> > When I try to create the slice, I receive the following error:
> > In [9]: slc =
> SlicePlot(pf,'z','temperature',width=(1,'kpc'),center=[0,0,0])
> > yt : [INFO     ] 2014-06-16 11:14:40,033 xlim = -0.500000 0.500000
> > yt : [INFO     ] 2014-06-16 11:14:40,033 ylim = -0.500000 0.500000
> > yt : [INFO     ] 2014-06-16 11:14:40,033 Making a fixed resolution
> buffer of
> > (('gas', 'temperature')) 800 by 800
> > yt : [INFO     ] 2014-06-16 11:14:40,076 Making a fixed resolution
> buffer of
> > (('deposit', 'Gas_smoothed_temperature')) 800 by 800
> > yt : [INFO     ] 2014-06-16 11:14:40,096 xlim = -0.500000 0.500000
> > yt : [INFO     ] 2014-06-16 11:14:40,096 ylim = -0.500000 0.500000
> > yt : [INFO     ] 2014-06-16 11:14:40,097 Making a fixed resolution
> buffer of
> > (('gas', 'temperature')) 800 by 800
> > yt : [INFO     ] 2014-06-16 11:14:40,117 Making a fixed resolution
> buffer of
> > (('deposit', 'Gas_smoothed_temperature')) 800 by 800
> > yt : [INFO     ] 2014-06-16 11:14:40,138 Making a fixed resolution
> buffer of
> > (('gas', 'temperature')) 800 by 800
> > yt : [INFO     ] 2014-06-16 11:14:40,159 Making a fixed resolution
> buffer of
> > (('deposit', 'Gas_smoothed_temperature')) 800 by 800
> > yt : [INFO     ] 2014-06-16 11:14:40,183 Making a fixed resolution
> buffer of
> > (('all', 'temperature')) 800 by 800
> >
> ---------------------------------------------------------------------------
> > error                                     Traceback (most recent call
> last)
> > <ipython-input-9-4dae35760081> in <module>()
> > ----> 1 slc =
> SlicePlot(pf,'z','temperature',width=(1,'kpc'),center=[0,0,0])
> >
> >
> /net/imp/3/home/woodfiaj/python/yt-3.0/yt/yt/visualization/plot_window.pyc
> > in SlicePlot(pf, normal, fields, axis, *args, **kwargs)
> >    1779             del kwargs['north_vector']
> >    1780
> > -> 1781         return AxisAlignedSlicePlot(pf, normal, fields, *args,
> > **kwargs)
> >
> >
> /net/imp/3/home/woodfiaj/python/yt-3.0/yt/yt/visualization/plot_window.pyc
> > in __init__(self, pf, axis, fields, center, width, axes_unit, origin,
> > fontsize, field_parameters)
> >    1006         if axes_unit is None:
> >    1007             axes_unit = get_axes_unit(width, pf)
> > -> 1008         self.set_axes_unit(axes_unit)
> >    1009
> >    1010 class ProjectionPlot(PWViewerMPL):
> >
> >
> /net/imp/3/home/woodfiaj/python/yt-3.0/yt/yt/visualization/plot_container.pyc
> > in newfunc(*args, **kwargs)
> >      53         rv = f(*args, **kwargs)
> >      54         args[0]._plot_valid = False
> > ---> 55         args[0]._setup_plots()
> >      56         return rv
> >      57     return newfunc
> >
> >
> /net/imp/3/home/woodfiaj/python/yt-3.0/yt/yt/visualization/plot_window.pyc
> > in _setup_plots(self)
> >     745                 zlim = (None, None)
> >     746
> > --> 747             image = self._frb[f]
> >     748
> >     749             if image.max() == image.min():
> >
> >
> /net/imp/3/home/woodfiaj/python/yt-3.0/yt/yt/visualization/fixed_resolution.pyc
> > in __getitem__(self, item)
> >     123         buff =
> self.pf.coordinates.pixelize(self.data_source.axis,
> >     124             self.data_source, item, bounds, self.buff_size,
> > --> 125             int(self.antialias))
> >     126         # Need to add _period and self.periodic
> >     127         # self._period, int(self.periodic)
> >
> >
> /net/imp/3/home/woodfiaj/python/yt-3.0/yt/yt/geometry/cartesian_coordinates.pyc
> > in pixelize(self, dimension, data_source, field, bounds, size, antialias,
> > periodic)
> >      52         if dimension < 3:
> >      53             return self._ortho_pixelize(data_source, field,
> bounds,
> > size,
> > ---> 54                                         antialias, dimension,
> > periodic)
> >      55         else:
> >      56             return self._oblique_pixelize(data_source, field,
> > bounds, size,
> >
> >
> /net/imp/3/home/woodfiaj/python/yt-3.0/yt/yt/geometry/cartesian_coordinates.pyc
> > in _ortho_pixelize(self, data_source, field, bounds, size, antialias,
> dim,
> > periodic)
> >      69                              data_source[field], size[0],
> size[1],
> >      70                              bounds, int(antialias),
> > ---> 71                              period, int(periodic)).transpose()
> >      72         return buff
> >      73
> >
> > error: data is of incorrect type (wanted 1D float)
> >
> > I have no idea what could be causing this, any ideas on how to solve this
> > error?
> >
> > Alex
> >
> > _______________________________________________
> > yt-users mailing list
> > yt-users at lists.spacepope.org
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140616/c7ccb7ad/attachment.htm>


More information about the yt-users mailing list