[yt-users] Total quantity projected over

Geoffrey So gsiisg at gmail.com
Fri Mar 15 14:34:46 PDT 2013


I think you can get the number from the projy_average object with
projy_average.field_data['CellMass']
and double check that against what you calculate

From
G.S.

On Fri, Mar 15, 2013 at 2:26 PM, Elizabeth Tasker <
tasker at astro1.sci.hokudai.ac.jp> wrote:

> 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
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130315/020769c8/attachment.html>


More information about the yt-users mailing list