--- ray/src/cv/source.cal 1992/03/03 15:01:45 2.2 +++ ray/src/cv/source.cal 1992/10/14 13:21:09 2.4 @@ -19,7 +19,6 @@ A2,A3,A4 - X,Y,Z dimensions of axis-aligned box } { local definitions } -norm_deg(d) : if( d, d, d+360 ); boxprojection = abs(Dx)*A3*A4 + abs(Dy)*A2*A4 + abs(Dz)*A2*A3; lboxprojection = ( noneg(abs(Px-Dx*Ts)-A2/2)*A3*A4 + noneg(abs(Py-Dy*Ts)-A3/2)*A2*A4 + @@ -31,7 +30,7 @@ boxcorr(v) = A1 * v / boxprojection; { correction for lboxcorr(v) = A1 * v / lboxprojection; { local box correction } src_theta = Acos(Dz) / DEGREE; { 0-180 } -src_phi = norm_deg( atan2(Dy, Dx) / DEGREE ); { 0-360 } +src_phi = mod( atan2(Dy, Dx) / DEGREE, 360 ); { 0-360 } { bilateral symmetry } src_phi2 = tri( src_phi, 180 ); { 0-180 } { quadrilateral symmetry } @@ -40,5 +39,6 @@ src_phi4 = tri( src_phi, 90 ); { 0-90 } { Type B photometry coordinates } srcB_vert = atan( -Dx/Dz ) / DEGREE; srcB_horiz = Asin(Dy) / DEGREE; - { w/ bilateral symmetry } + { w/ symmetry } +srcB_vert2 = abs( srcB_vert ); srcB_horiz2 = abs( srcB_horiz );