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

Bitbucket commits-noreply at bitbucket.org
Sat Jul 28 13:37:29 PDT 2012


2 new commits in yt:


https://bitbucket.org/yt_analysis/yt/changeset/6177755640cc/
changeset:   6177755640cc
branch:      yt
user:        ngoldbaum
date:        2012-07-28 22:32:22
summary:     Updating the ProjectionCamera to once again accept tuples for the width.
affected #:  1 file

diff -r b57b604c87cd77995291a7be755b3c57dd841963 -r 6177755640cc1d33825732b37373cda12be61f7f yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -297,8 +297,7 @@
                 (-self.width[0]/2.0, self.width[0]/2.0,
                  -self.width[1]/2.0, self.width[1]/2.0),
                 image, self.orienter.unit_vectors[0], self.orienter.unit_vectors[1],
-                na.array(self.width),
-                self.transfer_function, self.sub_samples)
+                na.array(self.width), self.sub_samples)
         return args
 
     def get_sampler(self, args):
@@ -1537,20 +1536,12 @@
             pass
 
     def get_sampler_args(self, image):
-        width = self.width[2]
-        north_vector = self.orienter.unit_vectors[0]
-        east_vector = self.orienter.unit_vectors[1]
-        normal_vector = self.orienter.unit_vectors[2]
-
-        back_center= self.center - 0.5*width * normal_vector
-        rotp = na.concatenate([na.linalg.pinv(self.orienter.unit_vectors).ravel('F'),
-                               back_center])
-
-        args = (rotp, normal_vector * width, back_center,
-            (-width/2, width/2, -width/2, width/2),
-            image, north_vector, east_vector,
-            na.array([width, width, width], dtype='float64'),
-            self.sub_samples)
+        rotp = na.concatenate([self.orienter.inv_mat.ravel('F'), self.back_center.ravel()])
+        args = (rotp, self.box_vectors[2], self.back_center,
+            (-self.width[0]/2, self.width[0]/2,
+             -self.width[1]/2, self.width[1]/2),
+            image, self.orienter.unit_vectors[0], self.orienter.unit_vectors[1],
+                na.array(self.width), self.sub_samples)
         return args
 
     def finalize_image(self,image):



https://bitbucket.org/yt_analysis/yt/changeset/3c812c439922/
changeset:   3c812c439922
branch:      yt
user:        ngoldbaum
date:        2012-07-28 22:37:14
summary:     Merging
affected #:  2 files

diff -r 6177755640cc1d33825732b37373cda12be61f7f -r 3c812c4399229f64217b19c9f6d68ee632316238 yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
--- a/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
+++ b/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
@@ -579,14 +579,8 @@
     this_end = na.copy(end)
     t = 0.0
     tolerance = 1e-6
-
+    
     while t < 1.0 - tolerance:
-        nearest = na.array([close[q]([this_end[q], wall[q]]) \
-                                for q in range(start.size)])
-        dt = ((nearest - this_start) / vector)[bound].min()
-        now = this_start + vector * dt
-        segments.append([na.copy(this_start), na.copy(now)])
-        this_start = na.copy(now)
         hit_left = (this_start <= left) & (vector < 0)
         if (hit_left).any():
             this_start[hit_left] += dim[hit_left]
@@ -595,6 +589,13 @@
         if (hit_right).any():
             this_start[hit_right] -= dim[hit_right]
             this_end[hit_right] -= dim[hit_right]
+
+        nearest = na.array([close[q]([this_end[q], wall[q]]) \
+                                for q in range(start.size)])
+        dt = ((nearest - this_start) / vector)[bound].min()
+        now = this_start + vector * dt
+        segments.append([na.copy(this_start), na.copy(now)])
+        this_start = na.copy(now)
         t += dt
 
     return segments


diff -r 6177755640cc1d33825732b37373cda12be61f7f -r 3c812c4399229f64217b19c9f6d68ee632316238 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -373,7 +373,7 @@
             [self.parameters["%smin" % ax] for ax in 'xyz']).astype("float64")
         self.domain_right_edge = na.array(
             [self.parameters["%smax" % ax] for ax in 'xyz']).astype("float64")
-        self.min_level = self.parameters["lrefine_min"] -1
+        self.min_level = self.parameters.get("lrefine_min", 1) - 1
 
         # Determine domain dimensions
         try:

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