<div dir="ltr">Thanks, guys!<div><br></div><div>Nathan, that worked just fine.  </div><div><br></div><div>d.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 2, 2014 at 1:18 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</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"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">On Wed, Jul 2, 2014 at 8:37 AM, David Collins <span dir="ltr"><<a href="mailto:dcollins4096@gmail.com" target="_blank">dcollins4096@gmail.com</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">Hi, everyone--<div><br></div><div><br></div><div>I"m trying to run a callback on a projected sphere, and I'm running into a missing piece of data. </div>



<div><br></div><div>I'm doing the following:</div>

<div><br></div><div>>>> sph = pf.h.sphere( c, w)</div><div>>>> proj = pf.h.proj(1,'Density',source = sph)</div><div>>>> pw=proj.to_pw( center= c, width=2)</div></div></blockquote><div><br>



</div></div><div>If you instead do:</div><div><br></div><div>proj = pf.h.proj(1,'Density', source=sph, center=c)</div><div><br></div><div>I believe it will work.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div class="h5">

<div dir="ltr"><div><br></div><div>this works fine, and reproduces the plot I want.  I have this callback that accesses "plot.data.center", but that seems to be an empty object.  This callback is based on the ParticlesCallback, so it's accessing a sub region in the following manner below.  So the plot object doesn't seem to be getting the center information any more. Is there a way to access this information now?</div>





<div><br></div><div>Thanks!</div><div><br></div><div>d.</div><div><br></div><div>A snap from the relevant callback, the line that chokes is the access to data.center, and pdb says that the structure is None.</div><div><br>





</div><div><div>    def __call__(self, plot):</div><div>        data = plot.data</div><div>        # we construct a recantangular prism</div><div>        x0, x1 = plot.xlim</div><div>        y0, y1 = plot.ylim</div><div>




        xx0, xx1 = plot._axes.get_xlim()</div>
<div>        yy0, yy1 = plot._axes.get_ylim()</div><div>        reg = self._get_region((x0,x1), (y0,y1), plot.data.axis, data)</div></div><div><div><br></div><div>    def _get_region(self, xlim, ylim, axis, data):</div><div>





        LE, RE = [None]*3, [None]*3</div><div>        xax = x_dict[axis]</div><div>        yax = y_dict[axis]</div><div>        zax = axis</div><div>        LE[xax], RE[xax] = xlim</div><div>        LE[yax], RE[yax] = ylim</div>





<div>        LE[zax] = data.center[zax] - self.width*0.5</div><div>        RE[zax] = data.center[zax] + self.width*0.5</div><div>        if self.region is not None \</div><div>            and np.all(self.region.left_edge <= LE) \</div>





<div>            and np.all(self.region.right_edge >= RE):</div><div>            return self.region</div><div>        self.region = data.pf.h.periodic_region(</div><div>            data.center, LE, RE)</div><div>        return self.region</div>



<span><font color="#888888">

</font></span></div><span><font color="#888888"><div><br></div><div>-- <br><div dir="ltr">-- Sent from a computer.<br></div>
</div></font></span></div>
<br></div></div><div class="">_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">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></div></blockquote></div><br></div></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><div dir="ltr">-- Sent from a computer.<br></div>
</div>