[yt-users] TotalQuantity vs. summing manually

Geoffrey So gsiisg at gmail.com
Fri Dec 20 18:02:36 PST 2013


Hi all,

I found that using a Enzo dataset I was getting slightly different numbers
when
1) using the list of dark matter particles selected by creation_time < 0.0

In [97]: sph_dm = sph['creation_time'] < 0.0
In [98]: print "%12.12e" % (sph['ParticleMassMsun'][sph_dm]).sum()
1.211311468567e+11

2) compared to summing the dark matter particles inside a 3D container with
TotalQuantity

In [101]: print "%12.12e" %
(sph.quantities['TotalQuantity']('Dark_Matter_Density')[0]*vol/Msun)
1.188937185993e+11

I'm wondering if the field and particles are handled differently when being
counted as inside or outside the 3D container?

From
G.S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20131220/588ca9f8/attachment.htm>


More information about the yt-users mailing list