[yt-users] FixedResolutionBuffer problem

Matthew Turk matthewturk at gmail.com
Wed Feb 26 05:36:39 PST 2014


Hi Mike,

Are you on 2.x or 3.0?  2.x has the nasty, nasty habit of accepting
kwargs without validating them, *and* in 2.x, it's the "source" kwarg
not "data_source".  In 3.0 we've fixed both of these things.

-Matt

On Wed, Feb 26, 2014 at 5:29 AM, Mike Butler <mbutler.astro at gmail.com> wrote:
> Hello,
>
> I am trying to make a fixed resolution buffer of a projection of a region in
> one of my simulations.  Here is the relevant part of the script:
>
> size=0.025
> center=[0.48,0.545,1.003]
> right0=[center[0]+size,center[1]+size,center[2]+size]
> left0=[center[0]-size,center[1]-size,center[2]-size]
> region=pf.h.region(center,left0,right0)
> p=pf.h.proj(0,"Density",data_source=region)
> test=FixedResolutionBuffer(p,[0.52,0.57,0.978,1.028],(512,512))
> f=h5py.File("test.h5","w")
> f.create_dataset("/density",data=test["Density"])
> f.close
>
> When I write the buffer to a h5 file, it seems to be projecting through the
> whole domain, instead of only the 0.05x0.05x0.05 region I specify.  Any
> ideas what I am doing wrong?
>
> Thanks,
>
> Mike
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list