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