[yt-users] Star Projections
Munier Azzam Salem
msalem at astro.columbia.edu
Tue Dec 4 18:22:48 PST 2012
Hi Stephen,
Thanks for the response. I ran your script on several of the files.
For some of them it gave me an output like this:
*
*
*creation_time is probably not in this simulation*
*From 565 grids, 0 have stars, and 565 have no particles.*
BUT for others the output was like
*From 557 grids, 557 have stars, and 0 have no particles.*
And odder still, the order of yes's and no's is not contiguous. I think
this may be an issue with my run itself?
thanks,
Munier
On Tue, Dec 4, 2012 at 4:10 PM, Stephen Skory <s at skory.us> wrote:
> Hi Munier,
>
> > File
> >
> "/share/home/01686/msalem/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
> > line 412, in __call__
> > raise NeedsDataField(doesnt_have)
> > yt.data_objects.field_info_container.NeedsDataField: (['creation_time'])
> >
> > Is anyone aware of what the issue may be? I'm wondering if enzo
> itself
> > is not printing something yt needs here.
>
> This last bit of your error message says what's going on - yt is
> trying to access the 'creation_time' particle field and can't find it.
> There are a few reasons for this - either the snapshot you're using
> has no stars, has only a few stars in a few grids and yt isn't finding
> it automatically, or perhaps the snapshot has a grid with no particles
> at all. All are easy to test with this simple example script:
>
> pf = load('snapshot')
> all_fields = set(pf.h.derived_field_list + pf.h.field_list)
>
> if 'creation_time' not in all_fields:
> print "creation_time is probably not in this simulation"
>
> ct_yes = 0
> ct_no = 0
> for g in pf.h.grids:
> try:
> ct = g['creation_time']
> ct_yes+=1
> except:
> ct_no += 1
>
> print "From %d grids, %d have stars, and %d have no particles." %
> (ct_yes + ct_no, ct_yes, ct_no)
>
> Can you run this script (modified for your situation) and report back,
> please?
>
> Good luck!
>
> --
> Stephen Skory
> s at skory.us
> http://stephenskory.com/
> 510.621.3687 (google voice)
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
--
Munier A. Salem // 845.489.6450
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20121204/eaf2f81d/attachment.html>
More information about the yt-users
mailing list