[yt-users] Accumulation in 3.0

Kacper Kowalik xarthisius.kk at gmail.com
Sat Nov 1 11:49:47 PDT 2014


Hi John,
I think that if you want to compute "total" instead of mean you need to set
weight_field to None in create_profile.
Cheers,
Kacper

On Sat Nov 01 2014 at 6:10:50 AM John Regan <johnanthonyregan at gmail.com>
wrote:

> Hi All,
>
> Is the accumulation flag working in 3.0?
> I tried to plot the enclosed mass in a sphere and I got some funny
> results.
>
> rpm = yt.create_profile(sp, 'radius',  'cell_mass',
>                         units = {'radius': 'pc', 'cell_mass' : 'Msun'},
>                         weight_field='density', accumulation=True,
> fractional=False)
>
> print "Mass = ", rpm["gas", "cell_mass"]
>
> In this case bin[n-1] gives a mass of something like 0.5 Msun but when I
> print the totals quantity I get a value of several orders of magnitude
> higher and closer to what I would expect.
>
> sp.quantities.total_quantity(["cell_mass", "particle_mass"])
>
> Cheers,
> John
> _______________________________________________
> 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/20141101/53cd9d5b/attachment.htm>


More information about the yt-users mailing list