[yt-svn] commit/yt: 4 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Mar 3 18:47:55 PST 2016
4 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/e9d7593b3dff/
Changeset: e9d7593b3dff
Branch: yt
User: jisuoqing
Date: 2016-03-03 21:13:53+00:00
Summary: Enforce length/width ratio of camera and image to be the same
Affected #: 1 file
diff -r 9321ff69146d0129738ece9ffc181212fb2c648f -r e9d7593b3dff15f83bd954d3a7dd834befeaf1d0 yt/visualization/volume_rendering/lens.py
--- a/yt/visualization/volume_rendering/lens.py
+++ b/yt/visualization/volume_rendering/lens.py
@@ -150,6 +150,10 @@
return self.current_image
def _get_sampler_params(self, camera, render_source):
+ # Enforce width[1] / width[0] = resolution[1] / resolution[0]
+ camera.width[1] = camera.width[0] \
+ * (1. * camera.resolution[1] / camera.resolution[0])
+
if render_source.zbuffer is not None:
image = render_source.zbuffer.rgba
else:
@@ -272,9 +276,10 @@
return self.current_image
def _get_sampler_params(self, camera, render_source):
- # We should move away from pre-generation of vectors like this and into
- # the usage of on-the-fly generation in the VolumeIntegrator module
- # We might have a different width and back_center
+ # Enforce width[1] / width[0] = 2 * resolution[1] / resolution[0]
+ camera.width[1] = camera.width[0] \
+ * (2. * camera.resolution[1] / camera.resolution[0])
+
if self.disparity is None:
self.disparity = camera.width[0] / 2.e3
https://bitbucket.org/yt_analysis/yt/commits/eaff358f9bb8/
Changeset: eaff358f9bb8
Branch: yt
User: jisuoqing
Date: 2016-03-03 21:20:41+00:00
Summary: The same thing for plane-parallel
Affected #: 1 file
diff -r e9d7593b3dff15f83bd954d3a7dd834befeaf1d0 -r eaff358f9bb8f9e8ee9a3f0859b2d6f1e198e348 yt/visualization/volume_rendering/lens.py
--- a/yt/visualization/volume_rendering/lens.py
+++ b/yt/visualization/volume_rendering/lens.py
@@ -89,6 +89,10 @@
super(PlaneParallelLens, self).__init__()
def _get_sampler_params(self, camera, render_source):
+ # Enforce width[1] / width[0] = resolution[1] / resolution[0]
+ camera.width[1] = camera.width[0] \
+ * (1. * camera.resolution[1] / camera.resolution[0])
+
if render_source.zbuffer is not None:
image = render_source.zbuffer.rgba
else:
https://bitbucket.org/yt_analysis/yt/commits/360cadadc71a/
Changeset: 360cadadc71a
Branch: yt
User: jisuoqing
Date: 2016-03-04 00:10:40+00:00
Summary: import division from future
Affected #: 1 file
diff -r eaff358f9bb8f9e8ee9a3f0859b2d6f1e198e348 -r 360cadadc71acb4fc7124999b31a05f8bea2f057 yt/visualization/volume_rendering/lens.py
--- a/yt/visualization/volume_rendering/lens.py
+++ b/yt/visualization/volume_rendering/lens.py
@@ -13,6 +13,7 @@
# The full license is in the file COPYING.txt, distributed with this software.
# ----------------------------------------------------------------------------
+from __future__ import division
from yt.funcs import mylog
from yt.utilities.parallel_tools.parallel_analysis_interface import \
ParallelAnalysisInterface
@@ -91,7 +92,7 @@
def _get_sampler_params(self, camera, render_source):
# Enforce width[1] / width[0] = resolution[1] / resolution[0]
camera.width[1] = camera.width[0] \
- * (1. * camera.resolution[1] / camera.resolution[0])
+ * (camera.resolution[1] / camera.resolution[0])
if render_source.zbuffer is not None:
image = render_source.zbuffer.rgba
@@ -156,7 +157,7 @@
def _get_sampler_params(self, camera, render_source):
# Enforce width[1] / width[0] = resolution[1] / resolution[0]
camera.width[1] = camera.width[0] \
- * (1. * camera.resolution[1] / camera.resolution[0])
+ * (camera.resolution[1] / camera.resolution[0])
if render_source.zbuffer is not None:
image = render_source.zbuffer.rgba
https://bitbucket.org/yt_analysis/yt/commits/8bb44733b706/
Changeset: 8bb44733b706
Branch: yt
User: jisuoqing
Date: 2016-03-04 00:14:16+00:00
Summary: Add comments
Affected #: 1 file
diff -r 360cadadc71acb4fc7124999b31a05f8bea2f057 -r 8bb44733b706b98bcab4d691ab4bc207e6424a12 yt/visualization/volume_rendering/lens.py
--- a/yt/visualization/volume_rendering/lens.py
+++ b/yt/visualization/volume_rendering/lens.py
@@ -282,6 +282,8 @@
def _get_sampler_params(self, camera, render_source):
# Enforce width[1] / width[0] = 2 * resolution[1] / resolution[0]
+ # For stereo-type lens, images for left and right eye are pasted together,
+ # so the resolution of single-eye image will be 50% of the whole one.
camera.width[1] = camera.width[0] \
* (2. * camera.resolution[1] / camera.resolution[0])
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