pro frontend,instrument,xpixel,ypixel,zenith,azimuth ; 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). ; 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,253) and the upper right pixel is ; labeled pixel (159,0). The labels (0,253) and (159,0) refer ; to the EXACT CENTER of each of the pixels. ] ; zenith and azimuth returned in degrees ; This procedure calls the procedure centrproj.pro which performs ; a central projection. rad = 3.1415926535/180. if (instrument eq 'hri') then begin z0=166.0 az0=0.0 zw=15.0 aw=9.6 xpw=160. ypw=254. xpw2=80. ypw2=127. rot=0.0 endif if (instrument eq 'mri') then begin z0=149.0 az0=0.0 zw=30.5 aw=21.1 xpw=176. ypw=254. xpw2=88. ypw2=127. rot=0.0 endif if (instrument eq 'sli') then begin z0=109.4 az0=0.0 zw=50.8 aw=25.6 xpw=128. ypw=254. xpw2=64. ypw2=127. rot=0.0 endif if (instrument eq 'sa') then 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 az0=4.5 rho=3.5 zw=50.0 aw=6.0 xpw=6. ypw=50. xpw2=3. ypw2=25. endif if (instrument eq 'dlvs') then begin z0=148.0 az0=-2. rho=6. zw=44.0 aw=2.0 xpw=1.0 ypw=20.0 xpw2=0.5 ypw2=10.0 endif x=(xpixel-xpw2+0.5)/xpw*aw y=(ypw2-ypixel-0.5)/ypw*zw if (instrument eq 'dlvs') then begin x=(xpw2-xpixel-0.5)/xpw*aw endif if (instrument eq 'sa' or instrument eq 'dlvs') 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 print,zenith,azimuth return end