--- ray/src/cv/source.cal 1997/07/25 12:08:06 2.8 +++ ray/src/cv/source.cal 2008/01/24 23:15:46 2.10 @@ -1,11 +1,10 @@ -{ SCCSid "$SunId$ LBL" } - +{ RCSid: $Id: source.cal,v 2.10 2008/01/24 23:15:46 greg Exp $ } { Source distribution coordinates (degrees). Theta is measured from the negative z-axis. Phi is measured from the positive x-axis (0 degrees) - towards the negative y-axis (90 degrees). + towards the positive y-axis (90 degrees). srcB_vert and srcB_horiz are angles used in type B photometry. @@ -40,15 +39,15 @@ lboxcorr(v) = A1 * v / lboxprojection; { local box cor cylcorr(v) = A1 * v / cylprojection; { cylinder correction } src_theta = Acos(Dz) / DEGREE; { 0-180 } -src_phi = mod( Atan2(Dy, -Dx) / DEGREE, 360 ); { 0-360 } +src_phi = mod( Atan2(-Dy, -Dx) / DEGREE, 360 ); { 0-360 } { bilateral symmetry } src_phi2 = tri( src_phi, 180 ); { 0-180 } { quadrilateral symmetry } src_phi4 = tri( src_phi, 90 ); { 0-90 } { Type B photometry coordinates } -srcB_vert = atan( -Dx/Dz ) / DEGREE; -srcB_horiz = Asin(Dy) / DEGREE; +srcB_vert = atan2( -Dx, Dz ) / DEGREE; +srcB_horiz = atan2( Dy, Dz ) / DEGREE; { w/ symmetry } srcB_vert2 = abs( srcB_vert ); srcB_horiz2 = abs( srcB_horiz );