<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 3, 2014 at 5:29 PM, Suoqing JI <span dir="ltr"><<a href="mailto:suoqing@physics.ucsb.edu" target="_blank">suoqing@physics.ucsb.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">Hi Stephanie,<div><br></div><div>Maybe you could specify a disk, use BinnedProfile1D to create bins along cylindrical radial ('cylindrical_r'), and do</div><div><br></div><div>profile.add_fields(‘cell_mass’, weight=None)</div><div><br></div><div>then you could plot profile[‘cell_mass’] vs. profile['cylindrical_r’] and get the 1-D plot the surface density.<br></div></div></blockquote><div><br></div><div>This will be a profile of the gas mass as a function of radius, but it's not quite a surface density profile.  That said, for an unweighted projection, I think it's the same up to a constant scaling factor.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>Best wishes,</div><div><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div>--</div><div>Suoqing JI</div><div>Ph.D Student</div><div>Department of Physics</div><div>University of California, Santa Barbara</div><div>CA 93106, USA</div></div></div></div></div>
</div>
<br><div><blockquote type="cite"><div><div class="h5"><div>On Nov 3, 2014, at 5:17 PM, Stephanie Tonnesen <<a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr"><div><div>Hi yt-users,<br><br></div>I would like to make a 1D plot of column density vs radius for a disk (to compare with observations).  I can make a projectionplot, but want something a bit more simple to look at.  I am using yt3.0.1--is there a nice way to to this?<br></div></div></div></div></div></blockquote></div></div></div></blockquote><div><br></div>The key is to use the numpy.digitize and numpy.bincount functions to find the histogram of the surface density as a function of radius.  Here's an example:<br><br><a href="http://nbviewer.ipython.org/gist/ngoldbaum/af8e7f317efe8f115e8b">http://nbviewer.ipython.org/gist/ngoldbaum/af8e7f317efe8f115e8b</a><br></div><div class="gmail_quote"><div> <br></div><div>This is a simplified version of what I've done for a project I'm working on right now, which involves making a ton of radial plots of projected quantities:<br><br><a href="https://bitbucket.org/ngoldbaum/galaxy_analysis/src/910f5a7e278247a36f25d62bdc478a7b5a7fe8ce/galanyl/galaxy_analyzer.py?at=default#cl-338">https://bitbucket.org/ngoldbaum/galaxy_analysis/src/910f5a7e278247a36f25d62bdc478a7b5a7fe8ce/galanyl/galaxy_analyzer.py?at=default#cl-338</a><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div><div><div class="h5"><div dir="ltr"><div><br></div>Thanks!<br><br>Stephanie<br><br clear="all"><div><div><div><div><div><div dir="ltr"><div><div><div><font face="garamond,serif">--<br>Dr. Stephanie Tonnesen<br></font></div><font face="garamond,serif">Alvin E. Nashman Postdoctoral Fellow<br></font></div><font face="garamond,serif">Carnegie Observatories, Pasadena, CA<br></font></div><font face="garamond,serif"><a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a><br></font></div></div></div>
</div></div></div></div></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" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br></div></blockquote></div><br></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" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div></div>