function az_ang,sN,cN,sp,cp,sa,ca,sb,cb,sg,cg,X,Y,rpr ; This function restores the Azimuth Angle phi' given an initial azimuth ; and nadir angle along with the offset Euler angles of a coordinate rotation: ; alpha, beta and gamma, the offset coordinates X, Y and Z between a ; pair of images and the altitude and radius of the planet being imaged ; Transformation derived with no restrictions on X, Y, and Z. r is computed ; as a function of nadir angle for a spherical planet's surface by na_to_r ; v2 by B. Rizk 11/24/97 ; v3 by B. Rizk 12/15/97 to implement the distortion versus the undistortion ; transformations ; v4, v5 by B. Rizk 12/17/97 to speed up processing ; v6 by B. Rizk 3/11/98 to implement more useful coordinate transformation ; (alpha, beta, gamma instead of gamma, beta, alpha rotation) num=Y+rpr*(-sN*cp*cb*sg-sN*sp*sa*sb*sg+sN*sp*ca*cg-cN*ca*sb*sg-cN*sa*cg) denom=X+rpr*(sN*cp*cb*cg+sN*sp*sa*sb*cg+sN*sp*ca*sg+cN*ca*sb*cg-cN*sa*sg) az=atan(num,denom) return,az*!radeg end