pro dihedral,instrument,xp,yp,zenith,azimuth,alpha,beta ; This procedure returns the zenith and azimuth on the sky ; (in DISR window-centered coordinates) of a pixel located ; within either of the 3 imagers or the solar aureoles (any). ; This procedure also returns the (alpha-alpha0) and (beta-beta0) ; for the pixel. ; instrument (string) = 'HRI', 'MRI', 'SLI' or 'sa' ; xpixel between 0 to 159 for HRI ; 0 to 175 for MRI ; 0 to 127 for SLI ; 0 to 5 for SA ; ypixel between 0 to 253 for HRI, MRI or SLI ; 0 to 49 for SA ; [ Note: This means, for example, that for the HRI the bottom ; left pixel is labeled pixel (0,0) and the upper right pixel is ; labeled pixel (159,253). The labels (0,0) and (159,253) refer ; to the EXACT CENTER of each of the pixels. ] ; zenith and azimuth returned in degrees ; (alpha-alpha0) and (beta-beta0) returned in degrees ; This procedure calls the procedure centrproj.pro which performs ; a central projection. xpixel = float(xp) ypixel = float(yp) rad = 3.1415926535/180. case instrument of 'HRI': begin z0=166.0 az0=0.0 zw=15.0 aw=9.6 xpw=160. ypw=254. xpw2=80. ypw2=127. end 'MRI': begin z0=149.0 az0=0.0 zw=30.5 aw=21.1 xpw=176 ypw=254 xpw2=88. ypw2=127. end 'SLI': begin z0=109.4 az0=0.0 zw=50.8 aw=25.6 xpw=128 ypw=254 xpw2=64. ypw2=127. end 'SA': begin z0=50.0 tilt=6.0 az0=(1/rad)*acos((cos(rad*tilt)-sin(rad*(90.-z0))^2)/(cos(rad*(90.-z0)))^2) q=(1/rad)*acos((sin(rad*az0)^2*cos(rad*(90.-z0))*sin(rad*(90.-z0))) $ /sin(rad*tilt)/(1.+cos(rad*az0))) rho=90.-q zw=50.0 aw=6.0 xpw=6. ypw=50. xpw2=3. ypw2=25. end endcase x=(xpixel-xpw2+0.5)/xpw*aw y=(ypw2-ypixel-0.5)/ypw*zw if (instrument eq 'SA') then begin xdum=x ydum=y x=xdum*cos(rad*rho)+ydum*sin(rad*rho) y=ydum*cos(rad*rho)-xdum*sin(rad*rho) endif centrproj,x,y,z0,az0,theta,phi zenith = theta azimuth = phi alpha = x beta = y return end