er change projy_average to projy_proj
I think you can get the number from the projy_average object withprojy_average.field_data['CellMass']and double check that against what you calculateFromG.S.
On Fri, Mar 15, 2013 at 2:26 PM, Elizabeth Tasker <email@example.com> wrote:
On Mar 15, 2013, at 5:17 PM, Matthew Turk <firstname.lastname@example.org> wrote:
> Hi Elizabeth,
> On Fri, Mar 15, 2013 at 5:15 PM, Elizabeth Tasker
> <email@example.com> wrote:
>> When you create a projection:
>> projy_proj = pf.h.proj(2, 'Density', source=cloud)
>> is there a way of knowing the sum of the quantity that has been integrated over? (or equally, knowing the integration depth for each cell, so the total quantity can be calculated)?
>> I'd like to sum up the mass above a certain surface density threshold in my source, "cloud". From the above, projy_proj will tell me which regions of my cloud are above a threshold, but I can't think of an easy way to know how much mass has been summed over in that cell.
>> projy_average = pf.h.proj(2, "CellMass", weight_field="Ones", source=cloud) will give me an average, but not a total.
> You could sum up the cell sizes:
> (proj["pdx"] * 2.0)**2.sum()
> Note that pdx is half-widths, so we multiply by two. This will need
> to be unit-converted from code to whatever.
>> yt-users mailing list
> yt-users mailing list
yt-users mailing list