[yt-svn] commit/yt: MatthewTurk: Allow swapping out the sampler in the Camera object

Bitbucket commits-noreply at bitbucket.org
Tue Jul 3 13:14:58 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/dc23af3e647a/
changeset:   dc23af3e647a
branch:      yt
user:        MatthewTurk
date:        2012-07-03 22:14:48
summary:     Allow swapping out the sampler in the Camera object
affected #:  1 file

diff -r 90869269c7ff63182c0c7fbb9137b3ee43198bd9 -r dc23af3e647af2183458339eb6d59e1ffda63f2a yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -49,6 +49,9 @@
     pixelize_healpix, arr_fisheye_vectors
 
 class Camera(ParallelAnalysisInterface):
+
+    _sampler_object = VolumeRenderSampler
+
     def __init__(self, center, normal_vector, width,
                  resolution, transfer_function,
                  north_vector = None, steady_north=False,
@@ -311,7 +314,7 @@
             sampler = LightSourceRenderSampler(*args, light_dir=temp_dir,
                     light_rgba=self.light_rgba)
         else:
-            sampler = VolumeRenderSampler(*args)
+            sampler = self._sampler_object(*args)
         return sampler
 
     def finalize_image(self, 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