<div dir="ltr">Hi Samantha,<div><br></div><div>I think that data_source expects geometrical objects as opposed to cut regions.  So you can use ds.sphere or ds.region to pass into the ProjectionPlot, but I don't think a cut_region will work, regardless of the frontend (gadget, enzo, etc.).  But I may be wrong here.</div>

<div><br></div><div>Cameron</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 16, 2014 at 12:57 PM, Samantha Benincasa <span dir="ltr"><<a href="mailto:benincsm@mcmaster.ca" target="_blank">benincsm@mcmaster.ca</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi everyone,<br><br>I'm working with a Gasoline 
dataset.  I'm trying to create a cut region and then image/analyze just 
the particles in that set.  I'm able to successfully create the region 
using:<br>
<br>cr = ad.cut_region(["obj['Gas','Temperature'] < 1000"])<br><br></div>However, when I try to image that region:<br><br>proj = ProjectionPlot(pf, "z", ('Gas','Density'),weight_field=('Gas','Density'),data_source=cr)<br>



<br></div>I get the following error:<br><br>---------------------------------------------------------------------------<br>IndexError                                Traceback (most recent call last)<br><ipython-input-14-4d67ba49bdf1> in <module>()<br>



----> 1 proj = ProjectionPlot(pf, "z", ('Gas','Density'),weight_field=('Gas','Density'),data_source=cr)<br><br>/1/home/benincsm/yt/yt-3.0-test/yt/yt/visualization/plot_window.pyc
 in __init__(self, pf, axis, fields, center, width, axes_unit, 
weight_field, max_level, origin, fontsize, field_parameters, 
data_source, proj_style, window_size, aspect)<br>
   1217         proj = pf.proj(fields, axis, weight_field=weight_field,<br>   1218                        center=center, data_source=data_source,<br>-> 1219                        field_parameters = field_parameters, style = proj_style)<br>



   1220         PWViewerMPL.__init__(self, proj, bounds, fields=fields, origin=origin,<br>   1221                              fontsize=fontsize, window_size=window_size, aspect=aspect)<br><br>/1/home/benincsm/yt/yt-3.0-test/yt/yt/data_objects/construction_data_containers.pyc in __init__(self, field, axis, weight_field, center, pf, data_source, style, field_parameters)<br>



    226         self.data_source = data_source<br>    227         self.weight_field = weight_field<br>--> 228         self.get_data(field)<br>    229 <br>    230     @property<br><br>/1/home/benincsm/yt/yt-3.0-test/yt/yt/data_objects/construction_data_containers.pyc in get_data(self, fields)<br>



    266         # We do this once<br>    267         for chunk in self.data_source.chunks([], "io", local_only = False):<br>--> 268             self._initialize_chunk(chunk, tree)<br>    269         # This needs to be parallel_objects-ified<br>



    270         with self.data_source._field_parameter_state(self.field_parameters):<br><br>/1/home/benincsm/yt/yt-3.0-test/yt/yt/data_objects/construction_data_containers.pyc in _initialize_chunk(self, chunk, tree)<br>    342 <br>



    343     def _initialize_chunk(self, chunk, tree):<br>--> 344         icoords = chunk.icoords<br>    345         xax = self.pf.coordinates.x_axis[self.axis]<br>    346         yax = self.pf.coordinates.y_axis[self.axis]<br>



<br>/1/home/benincsm/yt/yt-3.0-test/yt/yt/data_objects/selection_data_containers.pyc in icoords(self)<br>    733     @property<br>    734     def icoords(self):<br>--> 735         return self.base_object.icoords[self._cond_ind,:]<br>



    736 <br>    737     @property<br><br>IndexError: index 9025361 is out of bounds for axis 0 with size 9025360<br><br></div>Is the imaging step not yet supported in yt-3.0?<br><br></div>Thanks,<br>Sam</div>
<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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Cameron Hummels<div>Postdoctoral Researcher</div><div>Steward Observatory</div><div>University of Arizona</div><div><a href="http://chummels.org" target="_blank">http://chummels.org</a></div>


</div>