;----------------------------------------------------------- ; IMPOL2REC polar coordinate image --> XY coordiante image ; ; IMPOL2REC,inimage,outimage,x_center,y_center ; inimage -- input image (polar coordinate, IMREC2POL output) ; outimage -- output image (XY coordinate image) ; x_center, y_center -- XY coordinate of center ; ; ; IDL> IMPOL2REC,'polhoge.fits','rechoge.fits',-48.0,1008.0 ; ;----------------------------------------------------------- pro impol2rec, name, nout, xc, yc a=1.0 r=0.d0 b=1.0 c=1 f=1 ra=1.0 pa=1.0 d1=findgen(4500000) d2=findgen(4500000) d3=findgen(4500000) d4=INTARR(50000) d5=replicate(-100000.0,2500,2500) r=0l pix=MRDFITS(name,0) FOR j=0,2047 DO BEGIN FOR i=0,2047 DO BEGIN r=r+1.0 x=(float(i)-xc)/2048.0 y=(float(j)-yc)/2048.0 RECPOL,x,y,ra,pa,/DEGREES q=ULONG(r) ra=ra*2048.0 d1(q)=ra d2(q)=pa d3(q)=pix[i,j] c=fix(ra) d4(c)=d4(c)+1 f=d4(c) d5(i,j)=pix[c,f] ENDFOR ENDFOR c=MAX(d4) d6=d5(0:2047,0:2047) mwrfits,d6,nout end