[yt-users] Total quantity projected over

Elizabeth Tasker tasker at astro1.sci.hokudai.ac.jp
Fri Mar 15 14:26:19 PDT 2013


wonderful!

Thank you!

Elizabeth


On Mar 15, 2013, at 5:17 PM, Matthew Turk <matthewturk at gmail.com> wrote:

> Hi Elizabeth,
> 
> On Fri, Mar 15, 2013 at 5:15 PM, Elizabeth Tasker
> <tasker at astro1.sci.hokudai.ac.jp> wrote:
>> Hi,
>> 
>> 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.
> 
> -Matt
> 
>> 
>> Elizabeth
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org




More information about the yt-users mailing list