;+ ; NAME : faceon (function) ; PURPOSE : Face-on Image Projection ; CALLING SEQUENCE : ; imgt=faceon(img,g_x,g_y) ; INPUTS : ; img -- image ; g_x,g_y -- position of the image center on solar disk (arc.sec.) ; KEYWORD PARAMETERS : ; pix1 -- size of image pixel (arc.sec.) ; OUTPUTS : ; img -- midified image for scatter ; ; MODIFICATION HISTORY : ; by Singo KAWAKAMI ; programming start 1 Mar,1993 ; image correction 8 Mar,1993 ; modify(x1,y1) -> (x2,y2) 17 Apr. 1993 S.K & K.I. ;- function faceon,img,g_x,g_y,pix1=pix1 ;We should use "solar radius" for observing day, but now use the value below, if keyword_set(pix1) eq 0 then pix1=pix_size('ft1') rs=970./pix1 ;unit=pixel ; s=size(img) nx=s(1) & ny=s(2) ; ;Normalization of Coordinates (unit=pixel number) xc=fix(g_x/pix1) ;center coordinate yc=-fix(g_y/pix1) ;center coordinate dx=nx/2 ;width of R.A. dy=ny/2 ;width of Dec. ; ;Destination Coordinates x1=[xc,xc,xc-dx,xc-dx,xc-dx,xc,xc+dx,xc+dx,xc+dx] y1=[yc,yc-dy,yc-dy,yc,yc+dy,yc+dy,yc+dy,yc,yc-dy] ;Distorted Coordinates th=asin(y1/rs) ph=asin(x1/rs/cos(th)) phc=ph(0) thc=th(0) x2=rs*cos(th)*sin(ph-phc) y2=rs*sin(th-thc) ;x2=fix(x1*asin(sqrt((x1/rs)^2+(y1/rs)^2))/sqrt((x1/rs)^2+(y1/rs)^2)) ;y2=fix(y1*asin(sqrt((x1/rs)^2+(y1/rs)^2))/sqrt((x1/rs)^2+(y1/rs)^2)) ; ;Determine the Transfer Matrix x1=x1-min(x1) & y1=y1-min(y1) x2=x2-min(x2) & y2=y2-min(y2) ddx=x2(0)-x1(0) ddy=y2(0)-y1(0) polywarp,x1,y1,x2-ddx,y2-ddy,2,kkx,kky imgtt=poly_2d(img,kkx,kky,1) return,imgtt end