<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 4, 2016 at 11:26 AM, Scott Feister <span dir="ltr"><<a href="mailto:sfeister@gmail.com" target="_blank">sfeister@gmail.com</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 dir="ltr"><div><div>Hi all,<br><br>1) Is there a way to do a "mean" ProjectionPlot? As far as I can tell, the options are "integrate", "mip", and "sum", so I am guessing the answer is no. I know you can do this with regions by reg.mean(), and make your own plot in matplotlib.<br></div></div></div></blockquote><div><br></div><div>If you use a weight field you'll get back a mean value (weighted by that field). If you want an unweighted mean, you can weight by the "ones" field (although this will likely not be what you want for AMR data). If you want a mass-weighted mean, you can weight by the cell_mass field. If you want a volume weighted mean, use cell_volume.</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 dir="ltr"><div><div></div><div>2) If I do a Z projection on a domain with high X,Y spatial resolution, will it average cells along X and Y (within the pixel limits) at each Z depth as it projects? Or, just pick a single cell at X,Y for each pixel?<br></div></div></div></blockquote><div><br></div><div>It will average all the cells along the line of sight at that x,y value. Those cells might have different spatial resolutions.</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 dir="ltr"><div><div></div><div dir="ltr"><br></div><div>Also, does anyone know if the reg.mean() function weights the cells equally in the mean if there is varied spatial resolution? For example, I know the reg.integrate() function multiplies by path length, but reg.sum() simply adds up cell values.<br></div></div></div></blockquote><div><br></div><div>The mean() function takes a field to weight by:</div><div><br></div><div><a href="http://yt-project.org/docs/dev/reference/api/generated/yt.data_objects.selection_data_containers.YTRegion.mean.html#yt.data_objects.selection_data_containers.YTRegion.mean">http://yt-project.org/docs/dev/reference/api/generated/yt.data_objects.selection_data_containers.YTRegion.mean.html#yt.data_objects.selection_data_containers.YTRegion.mean</a><br></div><div><br></div><div>By default it uses "ones" or "particle_ones", depending on whether you're averaging a particle or mesh field.</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 dir="ltr"><div><div><br></div><div>Thanks!<br><br></div><div dir="ltr">Scott<br><br>Scott Feister, Ph.D.<br>Postdoctoral Researcher, Flash Center for Computational Science<br></div></div><div><div><div><div><div class="gmail-m_669731357677844511gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>University of Chicago, Department of Astronomy and Astrophysics<br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div></div></div>
<br>______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
<br></blockquote></div><br></div></div>