[yt-svn] commit/yt: alrosen: Sink particle files come from simulations that use ray tracing have one extra field so I made a quick

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Aug 6 09:26:40 PDT 2015


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/8af567aaf305/
Changeset:   8af567aaf305
Branch:      yt
User:        alrosen
Date:        2015-07-21 22:18:50+00:00
Summary:     Sink particle files come from simulations that use ray tracing have one extra field so I made a quick
change to read in star properties correctly if the star has 18 or 19 properties.

-ALR, 7/21/15
Affected #:  1 file

diff -r 15e0883da341774c22c9ee83a71b5261c2ead8b3 -r 8af567aaf3051efe31a8a0a5ff5d48cb337b4a0f yt/frontends/chombo/io.py
--- a/yt/frontends/chombo/io.py
+++ b/yt/frontends/chombo/io.py
@@ -241,19 +241,18 @@
         index['particle_r']         = 11
         index['particle_mdeut']     = 12
         index['particle_n']         = 13
-        index['particle_mdot']      = 14,
+        index['particle_mdot']      = 14
         index['particle_burnstate'] = 15
 
-    elif len(line.strip().split()) == 18:
+    elif (len(line.strip().split()) == 18 or len(line.strip().split()) == 19):
         # these are the newer style, add luminosity as well
         index['particle_mlast']     = 10
         index['particle_r']         = 11
         index['particle_mdeut']     = 12
         index['particle_n']         = 13
-        index['particle_mdot']      = 14,
-        index['particle_burnstate'] = 15,
+        index['particle_mdot']      = 14
+        index['particle_burnstate'] = 15
         index['particle_luminosity']= 16
-
     else:
         # give a warning if none of the above apply:
         mylog.warning('Warning - could not figure out particle output file')

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the yt-svn mailing list