;----------------------------------------------------------- ; IMREC2POL XY coordinate image --> polar coordinate image ; ; IMREC2POL,inimage,outimage,x_center,y_center ; inimage -- input image (XY coordinate image) ; outimage -- output image (polar coordinate image) ; x_center, y_center -- XY coordinate of center ; ; ; IDL> IMREC2POL,'hogehoge.fits','polhoge.fits',-48.0,1008.0 ; ;----------------------------------------------------------- pro imrec2pol, 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,3000,4000) 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) ;print,c,d4(c),ra,pa d4(c)=d4(c)+1 f=d4(c) d5(c,f)=pix[i,j] ENDFOR ENDFOR c=MAX(d4) d6=d5(0:2500,0:c) mwrfits,d6,nout end