[yt-users] Accumulation in 3.0

John Regan johnanthonyregan at gmail.com
Sat Nov 1 04:10:44 PDT 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20141101/ec52fe60/attachment.htm>


More information about the yt-users mailing list