[yt-svn] commit/yt: MatthewTurk: Merged in MatthewTurk/yt (pull request #1187)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Sep 10 11:23:46 PDT 2014


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/db158c18f415/
Changeset:   db158c18f415
Branch:      yt
User:        MatthewTurk
Date:        2014-09-10 20:23:37
Summary:     Merged in MatthewTurk/yt (pull request #1187)

Fixing the cooling fields for RAMSES
Affected #:  1 file

diff -r 9b28df7c4d71482b3759c6dcbdbc3d57e395b3a5 -r db158c18f4153804f4761e782586a030e37ebb23 yt/frontends/ramses/fields.py
--- a/yt/frontends/ramses/fields.py
+++ b/yt/frontends/ramses/fields.py
@@ -94,8 +94,9 @@
             return rv
         self.add_field(("gas", "temperature"), function=_temperature,
                         units="K")
+        self.create_cooling_fields()
 
-    def create_cooling_fields(self, filename):
+    def create_cooling_fields(self):
         num = os.path.basename(self.ds.parameter_filename).split("."
                 )[0].split("_")[1]
         filename = "%s/cooling_%05i.out" % (
@@ -104,7 +105,7 @@
         if not os.path.exists(filename): return
         def _create_field(name, interp_object):
             def _func(field, data):
-                shape = data["Temperature"].shape
+                shape = data["temperature"].shape
                 d = {'lognH': np.log10(_X*data["density"]/mh).ravel(),
                      'logT' : np.log10(data["temperature"]).ravel()}
                 rv = 10**interp_object(d).reshape(shape)
@@ -131,4 +132,4 @@
             interp = BilinearFieldInterpolator(tvals[n],
                         (avals["lognH"], avals["logT"]),
                         ["lognH", "logT"], truncate = True)
-            _create_field(n, interp)
+            _create_field(("gas", n), interp)

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