<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Jun-Hwan,</div><div><br></div><div>You can also generate a fixed resolution buffer by operating on the object.  For your script you would have:</div><div><br></div><div>frb = FixedResolutionBuffer(proj,(leftx,rightx,lefty,righty),res)</div><div><br></div><div>Where (leftx,rightx,lefty,righty) are the bottom left and upper right coordinates of the window.</div><div><br></div><div>There may not be a to_frb() method for that particular object yet.</div><div><br></div><div>Another, possible slower but definitely more general option is to use the offaxis projection interface: <a href="http://yt-project.org/doc/cookbook/index.html#offaxis-projection">http://yt-project.org/doc/cookbook/index.html#offaxis-projection</a></div><div><br></div><div>Best,</div><br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Nathan Goldbaum<br>Graduate Student<br>Astronomy & Astrophysics, UCSC<br><a href="mailto:goldbaum@ucolick.org">goldbaum@ucolick.org</a><br>http://www.ucolick.org/~goldbaum</div></span></div></span></div>
</div>
<br><div><div>On Feb 6, 2012, at 1:45 PM, Jun-Hwan Choi wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Matthew,<br><br>I try the following script<br>from yt.mods import *<br>import matplotlib.pylab as pylab<br><br># load up a dataset<br>index = 30<br>pf = load("DD%04d/DD%04d" % (index,index))<br>all_center = pf.h.find_max("Density")[1]<br>#sphere = pf.h.sphere(all_center, (50, 'pc'))<br>#sphere_center = sphere.quantities["CenterOfMass"]()<br><br># create density slices   proj = pf.h.proj(2, 'Density')<br>width = 100/pf['pc']<br>res = [1000,1000]<br>frb = proj.to_frb(width, res, center=all_center)<br><br>pylab.imshow(frb['Density'])<br>pylab.xlabel(r'$x\ \mathrm{pc}$')<br>pylab.ylabel(r'$x\ \mathrm{furlongs}$')<br>pylab.savefig('my_perfect_figure.png')<br><br>and I got following error message:<br>frb = proj.to_frb(width, res, center=sphere_center)<br>AttributeError: 'AMRQuadTreeProj' object has no attribute 'to_frb'<br><br>What does error mean?<br><br>Thank you,<br>Junhwan<br>Matthew Turk wrote:<br><blockquote type="cite">Hi Jun-Hwan,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Mon, Feb 6, 2012 at 4:09 PM, Jun-Hwan Choi <<a href="mailto:jhchoi@pa.uky.edu">jhchoi@pa.uky.edu</a>> wrote:<br></blockquote><blockquote type="cite">  <br></blockquote><blockquote type="cite"><blockquote type="cite">Hi all,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I wonder whether that I can obtain the value that generate projection plot.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I can make a projection image for my disk using add_projection  in the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">plot_collation.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I am interested in to get the projected density value and its position (and<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">its pixel size) to perform the FFT analysis in order to find the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">non-axisymmertic feature such as disk-bar.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Is there way to get this values using yt?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">    <br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Yes.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://yt-project.org/docs/2.3/visualizing/manual_plotting.html">http://yt-project.org/docs/2.3/visualizing/manual_plotting.html</a><br></blockquote><blockquote type="cite"><a href="http://yt-project.org/docs/2.3/analyzing/generating_processed_data.html#d-image-arrays">http://yt-project.org/docs/2.3/analyzing/generating_processed_data.html#d-image-arrays</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The function you're looking for is "to_frb" which is a method on the<br></blockquote><blockquote type="cite">projection object.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">pf = load(...)<br></blockquote><blockquote type="cite">proj = pf.h.proj(axis, field, weight)<br></blockquote><blockquote type="cite">frb = proj.to_frb()<br></blockquote><blockquote type="cite">field = frb[field]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-Matt<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">  <br></blockquote><blockquote type="cite"><blockquote type="cite">Thank you in advance,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Junhwan<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">--<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">--------------------------------------------------------------<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Jun-Hwan Choi, Ph.D.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Department of Physics and Astronomy, University of Kentucky<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Tel: (859) 897-6737        Fax: (859) 323-2846<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Email: <a href="mailto:jhchoi@pa.uky.edu">jhchoi@pa.uky.edu</a>   URL: <a href="http://www.pa.uky.edu/~jhchoi">http://www.pa.uky.edu/~jhchoi</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">--------------------------------------------------------------<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">yt-users mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">    <br></blockquote></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">yt-users mailing list<br></blockquote><blockquote type="cite"><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br></blockquote><blockquote type="cite"><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br></blockquote><blockquote type="cite">  <br></blockquote><br><br>-- <br>--------------------------------------------------------------<br>Jun-Hwan Choi, Ph.D.<br>Department of Physics and Astronomy, University of Kentucky<br>Tel: (859) 897-6737        Fax: (859) 323-2846<br>Email: <a href="mailto:jhchoi@pa.uky.edu">jhchoi@pa.uky.edu</a>   URL: <a href="http://www.pa.uky.edu/~jhchoi">http://www.pa.uky.edu/~jhchoi</a><br>--------------------------------------------------------------<br><br>_______________________________________________<br>yt-users mailing list<br><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br><br>!DSPAM:10175,4f3049fb87972478223174!<br><br></div></blockquote></div><br></body></html>