<div dir="ltr">Hello Nathan,<div><br></div><div>This works! Thank you so much!</div><div><br></div><div>Best,</div><div>Hansheng</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-21 11:22 GMT-04:00 Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Hansheng,<div><br></div><div>Given a ProjectionPlot instance, you can get at the 2D image buffer using the "frb" attribute of the plot object:</div><div><br></div><div>    plot = ProjectionPlot(ds, 2, 'density')</div><div>    density_image = plot.frb['density']</div><div><br></div><div>In this example, 'density_image' will be a 2D array containing an image of the projected gas density.</div><div><br></div><div>One can do this manually without going through ProjectionPlot to customize the FixedResolutionBuffer:</div><div><br></div><div><a href="http://yt-project.org/docs/dev/visualizing/manual_plotting.html" target="_blank">http://yt-project.org/docs/dev/visualizing/manual_plotting.html</a><br></div><div><br></div><div>Hope that helps,</div><div><br></div><div>Nathan</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 21, 2016 at 11:19 AM, Hansheng Chen <span dir="ltr"><<a href="mailto:jasonhs1221@gmail.com" target="_blank">jasonhs1221@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Britton,<div><br></div><div>Thank you for your response. I am able to load data by yt, and get a projection plot of the data. However, what I would like to do is to get a projected data of gas density in 2-D, because the original data is in 3-D. I do not know how to get a projected data through yt. Could you please give me some help?</div><span><div><br></div><div>Thank you very much!</div><div><br></div><div>Sincerely,</div><div>Hansheng</div></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-21 5:52 GMT-04:00 Britton Smith <span dir="ltr"><<a href="mailto:brittonsmith@gmail.com" target="_blank">brittonsmith@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Hansheng,<div><br></div><div>What you want to do is referred to as a projection in yt.  I assume that you are already able to load your data with yt.  If that is not the case, let us know.  The function to check out is yt.ProjectionPlot.  Have a look here for some more information on this:</div><div><a href="http://yt-project.org/doc/visualizing/plots.html" target="_blank">http://yt-project.org/doc/visualizing/plots.html</a><br></div><div>It will do the integration and also generate a figure for you.</div><div><br></div><div>Britton</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Jun 20, 2016 at 8:59 PM, Hansheng Chen <span dir="ltr"><<a href="mailto:jasonhs1221@gmail.com" target="_blank">jasonhs1221@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hello,<div><br></div><div>I would like to use yt to analyze the electron density of a galaxy. I have the data of the electron density in 3-D, but I would like to get the projected electron density in 2-dimensional. This means that I need to integrate the electron density in 3-D along the z-axis and show the integrated data in x-y coordinates. I do not know how to integrate the 3-D data along one direction by using yt. Could you please give me some help?</div><div><br></div><div>Thank you very much!</div><div><br></div><div>Sincerely,</div><div>Hansheng Chen</div></div>
<br></div></div>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
</div></div><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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>