[yt-svn] commit/yt: brittonsmith: Fixing issue 321 where exponential zoom fails if center is 0, 0, 0.
Bitbucket
commits-noreply at bitbucket.org
Mon Nov 14 13:43:17 PST 2011
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/be7925123b29/
changeset: be7925123b29
branch: yt
user: brittonsmith
date: 2011-11-14 22:43:07
summary: Fixing issue 321 where exponential zoom fails if center is 0, 0, 0.
affected #: 1 file
diff -r f0f9c1d64e797be3cc80d07eb59e00ce30f5d7e1 -r be7925123b29d9ae4cac18d048c557d65792ac71 yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -449,6 +449,8 @@
if not iterable(final_width):
width = na.array([final_width, final_width, final_width])
# front/back, left/right, top/bottom
+ if (self.center == 0.0).all():
+ self.center += (na.array(final) - self.center) / (10. * n_steps)
final_zoom = final_width/na.array(self.width)
dW = final_zoom**(1.0/n_steps)
else:
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