[Debian-astro-commits] [gyoto] 94/221: yorick/gyoto.i: fix gyoto_painters_panorama_eval() for partial panoramas

Thibaut Jean-Claude Paumard thibaut at moszumanska.debian.org
Fri May 22 20:52:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

thibaut pushed a commit to branch master
in repository gyoto.

commit ad1ba1329fc6174c3d5584613afa635783e3b6ad
Author: Thibaut Paumard <paumard at users.sourceforge.net>
Date:   Wed Nov 19 15:07:36 2014 +0100

    yorick/gyoto.i: fix gyoto_painters_panorama_eval() for partial panoramas
---
 yorick/gyoto.i | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/yorick/gyoto.i b/yorick/gyoto.i
index ccec27e..f5e5967 100644
--- a/yorick/gyoto.i
+++ b/yorick/gyoto.i
@@ -977,14 +977,10 @@ func gyoto_painters_panorama_eval(theta, phi, mask=) {
   x=long(i0 + phi*phi_scale) ;
   y=long(j0 + (theta-0.5*pi)*theta_scale) ;
 
-  // Rounding algo + errors can lead to an overflow by one pixel, but
-  // more would be fishy
-  if (anyof(x<-1 | y<-1 | x>(nphi+1) | y>(ntheta+1)))
-    error, "something fishy in pixel computation";
-  if (numberof((ind=where(x==0)))) x(ind)=1;
-  if (numberof((ind=where(y==0)))) y(ind)=1;
-  if (numberof((ind=where(x==nphi+1)))) x(ind)=nphi;
-  if (numberof((ind=where(x==ntheta+1)))) x(ind)=ntheta;
+  if (numberof((ind=where(x<=0)))) x(ind)=1;
+  if (numberof((ind=where(y<=0)))) y(ind)=1;
+  if (numberof((ind=where(x>nphi)))) x(ind)=nphi;
+  if (numberof((ind=where(y>ntheta)))) y(ind)=ntheta;
   
   dd=dimsof(phi);
   

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/gyoto.git



More information about the Debian-astro-commits mailing list