[yt-svn] commit/yt-3.0: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Sat Aug 17 12:03:36 PDT 2013


2 new commits in yt-3.0:

https://bitbucket.org/yt_analysis/yt-3.0/commits/608335eb3a58/
Changeset:   608335eb3a58
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-08-17 19:37:58
Summary:     When we add a fake field, we need to add its dependencies.  Related to #627.
Affected #:  1 file

diff -r f6c18705bf76fa980051bd4cb8e1fd4b60d94563 -r 608335eb3a58ffa642397347eb053a4a5cd5450b yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -2034,6 +2034,9 @@
             return temp_weightfield
         pf.field_info.add_field("temp_weightfield",
             function=_make_wf(field, weight))
+        # Now we have to tell the parameter file to add it and to calculate its
+        # dependencies..
+        pf.h._derived_fields_add(["temp_weightfield"], [])
         fields = ["temp_weightfield", weight]
     nv = 12*nside**2
     image = np.zeros((nv,1,4), dtype='float64', order='C')
@@ -2083,6 +2086,7 @@
     else:
         image[:,:,0] /= image[:,:,1]
         pf.field_info.pop("temp_weightfield")
+        pf.field_dependencies.pop("temp_weightfield")
         for g in pf.h.grids:
             if "temp_weightfield" in g.keys():
                 del g["temp_weightfield"]
@@ -2133,6 +2137,9 @@
                 return temp_weightfield
             pf.field_info.add_field("temp_weightfield",
                 function=_make_wf(self.field, self.weight))
+            # Now we have to tell the parameter file to add it and to calculate
+            # its dependencies..
+            pf.h._derived_fields_add(["temp_weightfield"], [])
             fields = ["temp_weightfield", self.weight]
         
         self.fields = fields
@@ -2327,6 +2334,7 @@
     image = projcam.snapshot()
     if weight is not None:
         pf.field_info.pop("temp_weightfield")
+        pf.field_dependencies.pop("temp_weightfield")
     del projcam
     return image[:,:]
 


https://bitbucket.org/yt_analysis/yt-3.0/commits/9b8414ece187/
Changeset:   9b8414ece187
Branch:      yt-3.0
User:        ngoldbaum
Date:        2013-08-17 21:03:33
Summary:     Merged in MatthewTurk/yt-3.0 (pull request #81)

When we add a fake field, we need to add its dependencies.  Related to #627.
Affected #:  1 file

diff -r 57241afde0494a6f2b6c80637009f0e6d2283229 -r 9b8414ece187d53ccc0dc4b5427e8b2aa231880e yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -2034,6 +2034,9 @@
             return temp_weightfield
         pf.field_info.add_field("temp_weightfield",
             function=_make_wf(field, weight))
+        # Now we have to tell the parameter file to add it and to calculate its
+        # dependencies..
+        pf.h._derived_fields_add(["temp_weightfield"], [])
         fields = ["temp_weightfield", weight]
     nv = 12*nside**2
     image = np.zeros((nv,1,4), dtype='float64', order='C')
@@ -2083,6 +2086,7 @@
     else:
         image[:,:,0] /= image[:,:,1]
         pf.field_info.pop("temp_weightfield")
+        pf.field_dependencies.pop("temp_weightfield")
         for g in pf.h.grids:
             if "temp_weightfield" in g.keys():
                 del g["temp_weightfield"]
@@ -2133,6 +2137,9 @@
                 return temp_weightfield
             pf.field_info.add_field("temp_weightfield",
                 function=_make_wf(self.field, self.weight))
+            # Now we have to tell the parameter file to add it and to calculate
+            # its dependencies..
+            pf.h._derived_fields_add(["temp_weightfield"], [])
             fields = ["temp_weightfield", self.weight]
         
         self.fields = fields
@@ -2327,6 +2334,7 @@
     image = projcam.snapshot()
     if weight is not None:
         pf.field_info.pop("temp_weightfield")
+        pf.field_dependencies.pop("temp_weightfield")
     del projcam
     return image[:,:]

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

--

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