j: Next unread message
k: Previous unread message
j a: Jump to all threads
j l: Jump to MailingList overview
On Tue, Oct 4, 2016 at 11:26 AM, Scott Feister email@example.com wrote:
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.
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.
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?
It will average all the cells along the line of sight at that x,y value. Those cells might have different spatial resolutions.
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.
The mean() function takes a field to weight by:
By default it uses "ones" or "particle_ones", depending on whether you're averaging a particle or mesh field.
Scott Feister, Ph.D. Postdoctoral Researcher, Flash Center for Computational Science University of Chicago, Department of Astronomy and Astrophysics
yt-users mailing list firstname.lastname@example.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org