Trouble with FixedResolutionBuffer

Hi all, I'm trying to use FixedResolutionBuffer to generate 2d projections following the example in the docs (http://yt-project.org/doc/analyzing/generating_processed_data.html) from yt.mods import * pf = load("DD0000/test_disk_0000") projden = pf.h.proj(0,'Density',data_source=pf.h.all_data(),center=[0.5,0.5,0.5]) frb = FixedResolutionBuffer(projden,(0,0,1,1),(512,512)) print frb['Density'] ------> print(frb['Density']) yt : [INFO ] 2011-09-02 00:03:10,273 Making a fixed resolution buffer of 512 by 512 [[ nan nan nan ..., nan nan nan] [ nan nan nan ..., nan nan nan] [ nan nan nan ..., nan nan nan] ..., [ nan nan nan ..., nan nan nan] [ nan nan nan ..., nan nan nan] [ nan nan nan ..., nan nan nan]] Is there a problem with how I'm creating the buffer? I'm pretty sure the way this is done in the docs on the page I linked is incorrect, since I get an error when I do when I try to say sl = pf.h.proj(0,0.5) Thanks for your help, Nathan

Hi Nathan, On Fri, Sep 2, 2011 at 3:08 AM, Nathan Goldbaum <goldbaum@ucolick.org> wrote:
Hi all, I'm trying to use FixedResolutionBuffer to generate 2d projections following the example in the docs (http://yt-project.org/doc/analyzing/generating_processed_data.html) from yt.mods import * pf = load("DD0000/test_disk_0000") projden = pf.h.proj(0,'Density',data_source=pf.h.all_data(),center=[0.5,0.5,0.5]) frb = FixedResolutionBuffer(projden,(0,0,1,1),(512,512)) print frb['Density'] ------> print(frb['Density']) yt : [INFO ] 2011-09-02 00:03:10,273 Making a fixed resolution buffer of 512 by 512 [[ nan nan nan ..., nan nan nan] [ nan nan nan ..., nan nan nan] [ nan nan nan ..., nan nan nan] ..., [ nan nan nan ..., nan nan nan] [ nan nan nan ..., nan nan nan] [ nan nan nan ..., nan nan nan]] Is there a problem with how I'm creating the buffer?
The bounds should be (pixelplane_x_min, pixelplane_x_max, pixelplane_y_min, pixelplane_y_max) -- you've ordered them with both mins, then both maxes.
I'm pretty sure the way this is done in the docs on the page I linked is incorrect, since I get an error when I do when I try to say sl = pf.h.proj(0,0.5)
Yup, thanks -- that should be "slice" which will be fixed in the next build of the docs, going up today. Projections will implicitly use the whole domain, so you can call: pf.h.proj(0, "Density") if you want a column density of the domain. Best, -Matt
Thanks for your help, Nathan
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Hi Matt, Thanks, that fixed it! Best, Nathan Goldbaum Graduate Student Astronomy & Astrophysics, UCSC goldbaum@ucolick.org http://www.ucolick.org/~goldbaum On Sep 2, 2011, at 4:06 AM, Matthew Turk wrote:
Hi Nathan,
On Fri, Sep 2, 2011 at 3:08 AM, Nathan Goldbaum <goldbaum@ucolick.org> wrote:
Hi all, I'm trying to use FixedResolutionBuffer to generate 2d projections following the example in the docs (http://yt-project.org/doc/analyzing/generating_processed_data.html) from yt.mods import * pf = load("DD0000/test_disk_0000") projden = pf.h.proj(0,'Density',data_source=pf.h.all_data(),center=[0.5,0.5,0.5]) frb = FixedResolutionBuffer(projden,(0,0,1,1),(512,512)) print frb['Density'] ------> print(frb['Density']) yt : [INFO ] 2011-09-02 00:03:10,273 Making a fixed resolution buffer of 512 by 512 [[ nan nan nan ..., nan nan nan] [ nan nan nan ..., nan nan nan] [ nan nan nan ..., nan nan nan] ..., [ nan nan nan ..., nan nan nan] [ nan nan nan ..., nan nan nan] [ nan nan nan ..., nan nan nan]] Is there a problem with how I'm creating the buffer?
The bounds should be (pixelplane_x_min, pixelplane_x_max, pixelplane_y_min, pixelplane_y_max) -- you've ordered them with both mins, then both maxes.
I'm pretty sure the way this is done in the docs on the page I linked is incorrect, since I get an error when I do when I try to say sl = pf.h.proj(0,0.5)
Yup, thanks -- that should be "slice" which will be fixed in the next build of the docs, going up today. Projections will implicitly use the whole domain, so you can call: pf.h.proj(0, "Density") if you want a column density of the domain.
Best,
-Matt
Thanks for your help, Nathan
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
!DSPAM:10175,4e60b8be261142573210892!
participants (2)
-
Matthew Turk
-
Nathan Goldbaum