<div dir="ltr"><div>Hi Matt,<br><br></div>I was using 2.x.  If I try to run the same code in 3.0, I get a NotImplementedError at the "57 f.create_dataset("/density",data=test["Density"])"  line.  However, if I just switch data_source to source, it works fine in 2.x, so I guess that will work for now.<br>
<br>Thanks,<br><br>Mike<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 26, 2014 at 2:36 PM, 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 Mike,<br>
<br>
Are you on 2.x or 3.0?  2.x has the nasty, nasty habit of accepting<br>
kwargs without validating them, *and* in 2.x, it's the "source" kwarg<br>
not "data_source".  In 3.0 we've fixed both of these things.<br>
<br>
-Matt<br>
<div><div class="h5"><br>
On Wed, Feb 26, 2014 at 5:29 AM, Mike Butler <<a href="mailto:mbutler.astro@gmail.com">mbutler.astro@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I am trying to make a fixed resolution buffer of a projection of a region in<br>
> one of my simulations.  Here is the relevant part of the script:<br>
><br>
> size=0.025<br>
> center=[0.48,0.545,1.003]<br>
> right0=[center[0]+size,center[1]+size,center[2]+size]<br>
> left0=[center[0]-size,center[1]-size,center[2]-size]<br>
> region=pf.h.region(center,left0,right0)<br>
> p=pf.h.proj(0,"Density",data_source=region)<br>
> test=FixedResolutionBuffer(p,[0.52,0.57,0.978,1.028],(512,512))<br>
> f=h5py.File("test.h5","w")<br>
> f.create_dataset("/density",data=test["Density"])<br>
> f.close<br>
><br>
> When I write the buffer to a h5 file, it seems to be projecting through the<br>
> whole domain, instead of only the 0.05x0.05x0.05 region I specify.  Any<br>
> ideas what I am doing wrong?<br>
><br>
> Thanks,<br>
><br>
> Mike<br>
><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>