[yt-users] star particles count

Latif latifne at gmail.com
Tue May 14 05:02:19 PDT 2013


Hi Matt,
many thanks for a prompt response. The output looks like this.
print np.unique(dd["particle_type"])
[1 5]
print np.unique(dd["creation_time"]).size
2586
It seems particle type is 5 which i assumed to be 2.
Cheers
Latif


On Tue, May 14, 2013 at 1:45 PM, Matthew Turk <matthewturk at gmail.com> wrote:

> On Tue, May 14, 2013 at 7:21 AM, Latif <latifne at gmail.com> wrote:
> > Hi all,
> > I have star particles in enzo simulations.  Counting the particles by
> > creation time and type gave different results. Is it a problem with Yt or
> > comes from simulation? Any ideas?
> >
> > star_particles = dd["creation_time"] > 0.0
> > print "Number of star particles by creation time", star_particles.sum()
> > star_particles = dd["particle_type"] == 2
> > print "Number of star particles by type", star_particles.sum()
> >
> >
> > Number of star particles by creation time 3818
> > Number of star particles by type 0
>
> What's the output of
>
> print np.unique(dd["particle_type"])
> print np.unique(dd["creation_time"]).size
>
> ?
>
> -Matt
>
> >
> > thanks in advance,
> > Cheers
> > Latif
> >
> > _______________________________________________
> > 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/20130514/152572e9/attachment.html>


More information about the yt-users mailing list