PRO geoster,lat0,long0,alt,maxza,latarr,longarr $ ,degrees=degrees,zoom=zoom,dblsize=dblsize ; Make arrays of (x,y) values for a stereographic projection centered ; at latitude lat0 and longitude long0. To be used for mapping PoCa ; images to geographic coordinates. IF NOT KEYWORD_SET(degrees) THEN BEGIN phi_p=!RADEG*lat0 lambda_p=!RADEG*long0 ENDIF ELSE BEGIN phi_p=lat0 lambda_p=long0 ENDELSE IF KEYWORD_SET(zoom) THEN ht=alt ELSE ht=300. maxrad=za2dist(maxza,ht,degrees=degrees,radius=relc(phi_p)) edge=(1+KEYWORD_SET(dblsize))*191+1 ; x=REBIN((FINDGEN(192)-95.5)*maxrad/96,192,192) x=REBIN((FINDGEN(edge)-(edge-1)/2.)*maxrad/(edge/2.),edge,edge) y=TRANSPOSE(x) re=relc(phi_p)+alt alpha=ATAN(x,y) h=!PI/2.-2.*ATAN(SQRT(x*x+y*y),2.*re) sinphi=SIN(phi_p*!DTOR)*SIN(h)+COS(phi_p*!DTOR)*COS(h)*COS(alpha) latarr=ASIN(sinphi) sindlam=SIN(alpha)*COS(h)/COS(latarr) longarr=lambda_p*!DTOR+ASIN(sindlam) IF KEYWORD_SET(degrees) THEN BEGIN latarr=!RADEG*latarr longarr=!RADEG*longarr ENDIF RETURN END