pro obrabotka1,pol,int print,"Input file name" file=pickfile(filter="*.fts") print,file img=readfits(file) print,file img1=float(img) ss=size(img1) print,ss window,0,xsize=ss(1),ysize=ss(2) tvscl,img1 ;*********************** noun="y" e1: print,"Input up point for difference diffinition" cursor,x,y,3,/device print,x,y & y1=y print,"Input down point for difference diffinition" cursor,x,y,3,/device print,x,y & y2=y diff=y1-y2 print,"diff. is", diff print,"It is OK?(y/n)" read,noun if noun eq "n" then goto, e1 ;******************************************** e2:erase & tvscl,img1 print,"Input up limit of up strip" cursor,x,y,3,/device print,x,y & y3=y print,"Input down limit of up strip" cursor,x,y,3,/device print,x,y & y4=y up=img1(*,y4:y3) down=img1(*,y4-diff:y3-diff) help,up,down erase tvscl,up tvscl,down,0,y3-y4+10 noun="y" print,"It is OK?(y/n)" read,noun if noun eq "n" then goto, e2 ;*****n************************** erase & tvscl,up print,"Input line of up strip for x-shift " cursor,x,y,3,/device print,x,y & x1=x print,"Input line of up strip for y-shift " cursor,x,y,3,/device print,x,y & y5=y ;******************************************* erase & tvscl,down print,"Input line of down strip for x-shift " cursor,x,y,3,/device print,x,y & x2=x print,"Input line of down strip for y-shift " cursor,x,y,3,/device print,x,y & y6=y dif1=y5-y6 dif2=x1-x2 print,"X-shift",dif2,"Y-shift",dif1 print,"X-Shift " s1=size(up) ix=s1(1)-1 & iy=s1(2)-1 if dif2 ge 0 then begin i1=dif2 i2=ix i3=0 i4=ix-dif2 endif else begin i1=0 i2=ix+dif2 i3=-1*dif2 i4=ix endelse tvscl,up(i1:i2,0:iy)-down(i3:i4,0:iy) ;**************************************** if dif1 ge 0 then begin j1=dif1 j2=iy j3=0 j4=iy-dif1 endif else begin j1=0 j2=iy+dif1 j3=-1*dif1 j4=iy endelse erase & tvscl,up(i1:i2,j1:j2)-down(i3:i4,j3:j4) ;**************************************** sy=0 j0=intarr(4) print,"Input shift on y.Input y=999 for finishing." read,sy repeat begin case 1 of (sy ge 0):begin j0(0)=j1+sy j0(1)=j2 j0(2)=j3 j0(3)=iy-sy end (sy lt 0):begin j0(0)=j1 j0(1)=j2+sy j0(2)=j3-sy j0(3)=j4 end endcase erase & tvscl,up(i1:i2,j0(0):j0(1))-down(i3:i4,j0(2):j0(3)) read,sy endrep until sy eq 999 j1=j0(0) & j2=j0(1) & j3=j0(2) & j4=j0(3) ;********************************* sx=0 i0=intarr(4) print,"Input shift on x.Input x=999 for finishing." read,sx repeat begin case 1 of (sx ge 0):begin i0(0)=i1+sx i0(1)=i2 i0(2)=i3 i0(3)=i4-sx end (sx lt 0):begin i0(0)=i1 i0(1)=i2+sx i0(2)=i3-sx i0(3)=i4 end endcase erase & tvscl,up(i0(0):i0(1),j1:j2)-down(i0(2):i0(3),j3:j4) read,sx endrep until sx eq 999 i1=i0(0) & i2=i0(1) & i3=i0(2) & i4=i0(3) pol1=up(i1:i2,j1:j2)-down(i3:i4,j3:j4) int=up(i1:i2,j1:j2)+down(i3:i4,j3:j4) pol=pol1/int int=int/2.0 tvscl,pol tvscl,int,0,diff s11=size(pol) window,1,xsize=s11(1),ysize=s11(2)*2 tvscl,pol tvscl,int,0,s11(2) result=tvrd() file1=file print,"Input file name" read,file1 writefits,"int"+file1+".fts",int writefits,"pol"+file1+".fts",pol WRITE_BMP, "pol"+file1+".bmp",result end