Hi all,
I am attempting to follow the examples of how to make a fixed resolution buffer, and I have run into a problem. If I follow the first example on this page http://yt.enzotools.org/doc/analyzing/generating_processed_data.html:
sl = pf.h.proj(0, 0.6) frb = FixedResolutionBuffer(sl, (0.3, 0.5, 0.6, 0.8), (512, 512)) my_image = frb["Density"]
I get this error http://paste.enzotools.org/show/1603/ which makes it look like it's trying to use the second term of .proj() '0.6' as a data field. So, if I change things to:
sl = pf.h.proj(0, 'Density')
I get this error http://paste.enzotools.org/show/1604/ complaining about 'px'. Am I doing something wrong, or is this a bug? I am using 4216:5c6f932b9f34. Thanks!
Hi Stephen,
The first example should be slice, not proj. My typo. Please feel free to correct it in the doc repo.
-Matt
On Wed, Apr 27, 2011 at 7:24 PM, Stephen Skory s@skory.us wrote:
Hi all,
I am attempting to follow the examples of how to make a fixed resolution buffer, and I have run into a problem. If I follow the first example on this page http://yt.enzotools.org/doc/analyzing/generating_processed_data.html:
sl = pf.h.proj(0, 0.6) frb = FixedResolutionBuffer(sl, (0.3, 0.5, 0.6, 0.8), (512, 512)) my_image = frb["Density"]
I get this error http://paste.enzotools.org/show/1603/ which makes it look like it's trying to use the second term of .proj() '0.6' as a data field. So, if I change things to:
sl = pf.h.proj(0, 'Density')
I get this error http://paste.enzotools.org/show/1604/ complaining about 'px'. Am I doing something wrong, or is this a bug? I am using 4216:5c6f932b9f34. Thanks!
-- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Matt,
The first example should be slice, not proj. My typo. Please feel free to correct it in the doc repo.
Ok, will do.
Hi Matt,
I have found another error (well, actually I think it might be the same as the second error above). I try this script:
from yt.mods import * import matplotlib.pyplot as pyplot
pf = load("DD0252") re = pf.h.region([0.5]*3, [0.48]*3, [0.52]*3) pp = pf.h.proj(0, 'Density', weight_field=None, data_source = re, center = [0.5]*3, serialize = False)
frb = FixedResolutionBuffer(pp, (0.48, 0.52, 0.48, 0.52), (512, 512), antialias = False)
pyplot.imshow(na.log10(frb['Density']))
and I get this http://paste.enzotools.org/show/1605/. I made this example by following how the projections are made in multi_halo_profiler, and indeed I get this same error when I ask the halo profiler to make projections. However, as recently as last week I successfully made halo profiler projections, and I've tried reverting to the version of yt that was most current then, and the problems do not go away.
So, I guess in summary, if you cannot see any typo in my script above, and you cannot reproduce my error, then I probably messed up my install in some subtle way, which will be useful information. Thank you very much!
Hi Stephen,
This script works for me on DD0252.
I would recommend you dig in with pdb and figure out which keys your projection has. Try reproducing this error without data_source. Try manually removing the .yt file (although that should not come into play here because you both data_source and serialize=False.) See if you can determine where the step went bad. Are you using the current tip in the primary yt repo? If not, what changes have you made?
-Matt
On Thu, Apr 28, 2011 at 10:30 AM, Stephen Skory s@skory.us wrote:
Hi Matt,
I have found another error (well, actually I think it might be the same as the second error above). I try this script:
from yt.mods import * import matplotlib.pyplot as pyplot
pf = load("DD0252") re = pf.h.region([0.5]*3, [0.48]*3, [0.52]*3) pp = pf.h.proj(0, 'Density', weight_field=None, data_source = re, center = [0.5]*3, serialize = False)
frb = FixedResolutionBuffer(pp, (0.48, 0.52, 0.48, 0.52), (512, 512), antialias = False)
pyplot.imshow(na.log10(frb['Density']))
and I get this http://paste.enzotools.org/show/1605/. I made this example by following how the projections are made in multi_halo_profiler, and indeed I get this same error when I ask the halo profiler to make projections. However, as recently as last week I successfully made halo profiler projections, and I've tried reverting to the version of yt that was most current then, and the problems do not go away.
So, I guess in summary, if you cannot see any typo in my script above, and you cannot reproduce my error, then I probably messed up my install in some subtle way, which will be useful information. Thank you very much!
-- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Matt,
I would recommend you dig in with pdb and figure out which keys your projection has. Try reproducing this error without data_source. Try manually removing the .yt file (although that should not come into play here because you both data_source and serialize=False.)
Removing the .yt file did it, which is odd because you think it shouldn't have been the source of the problem. Anyway, thanks for the help!
Hi Stephen,
Even when I had a .yt file, it worked for me. My guess is that yours had been corrupted somehow and did not have the px field saved. When it was reloaded, this field was not found and could not be re-generated without a full re-projection.
-Matt
On Thu, Apr 28, 2011 at 10:50 AM, Stephen Skory sskory@physics.ucsd.edu wrote:
Hi Matt,
I would recommend you dig in with pdb and figure out which keys your projection has. Try reproducing this error without data_source. Try manually removing the .yt file (although that should not come into play here because you both data_source and serialize=False.)
Removing the .yt file did it, which is odd because you think it shouldn't have been the source of the problem. Anyway, thanks for the help!
-- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org