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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Sep 2 14:23:29 PDT 2014


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/cddc7db004ba/
Changeset:   cddc7db004ba
Branch:      yt-3.0
User:        mzingale
Date:        2014-08-01 02:46:04
Summary:     this gets the orientation correct for a volume-rendered image when
saved either through write_png or save_annotated.  Previously, the
write_png stuff was upside down.
Affected #:  1 file

diff -r d9933af8625faa7a45957a6269cfce3909a64d14 -r cddc7db004ba75c1aca969b6891f5c4c78590b6e yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -649,7 +649,7 @@
             del nz
         else:
             nim = im
-        ax = self._pylab.imshow(nim[:,:,:3]/nim[:,:,:3].max(), origin='lower')
+        ax = self._pylab.imshow(nim[:,:,:3]/nim[:,:,:3].max(), origin='upper')
         return ax
 
     def draw(self):
@@ -747,6 +747,9 @@
         image = ImageArray(self._render(double_check, num_threads, 
                                         image, sampler),
                            info=self.get_information())
+
+        # flip it up/down to handle how the png orientation is donetest.png
+        image = image[:,::-1,:]
         self.save_image(image, fn=fn, clip_ratio=clip_ratio, 
                        transparent=transparent)
         return image


https://bitbucket.org/yt_analysis/yt/commits/66661ac7b420/
Changeset:   66661ac7b420
Branch:      yt
User:        ChrisMalone
Date:        2014-09-02 23:23:23
Summary:     Merged in mzingale/yt/yt-3.0 (pull request #1117)

this gets the orientation correct for a volume-rendered image
Affected #:  1 file

diff -r 2c3d2e84074ac8260feb8f056b0720c3a7442e82 -r 66661ac7b4208e71cd9b3ce97f36c1bdc06f5deb yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -649,7 +649,7 @@
             del nz
         else:
             nim = im
-        ax = self._pylab.imshow(nim[:,:,:3]/nim[:,:,:3].max(), origin='lower')
+        ax = self._pylab.imshow(nim[:,:,:3]/nim[:,:,:3].max(), origin='upper')
         return ax
 
     def draw(self):
@@ -747,6 +747,9 @@
         image = ImageArray(self._render(double_check, num_threads, 
                                         image, sampler),
                            info=self.get_information())
+
+        # flip it up/down to handle how the png orientation is donetest.png
+        image = image[:,::-1,:]
         self.save_image(image, fn=fn, clip_ratio=clip_ratio, 
                        transparent=transparent)
         return image

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