;eto mozhno pomenjat'" main_dir='d:\users\kupry\Data_flares\20030318\' file_dir="\H-alpha\" spectra='H-alpha' radius=1; in pixel dir_out=main_dir+file_dir+'Ready\' ;'H-alpha' ; vybor izobrazhenija k kotoromu ty budesh' privodit' vse otal'nye CASE spectra of 'CaII':file_name='12_00_03.jpg';CaII zero=file 'H-alpha':file_name='115945.fts';H-alpha zero=file ;file0=main_dir+file_name endcase file0=main_dir+file_name a0=readfits(file0) sa0=size(a0) a0=float(a0) ; schityvanie vsekh files, u kotoryh nado poschitat' intensivnost' file_l=FINDFILE(main_dir+'12*.fts') s_list=size(file_l) ;nachinaem pereberat' "the cycle begining" for il=0,s_list(1)-2 do begin ret_point: while !D.window NE -1 do wdelete file1=file_l(il) a1=readfits(file1,hd1) mark_j:while !D.window NE -1 do wdelete window,1,xs=sa0(1),ys=sa0(2),title='Shifted image' tvcon,a1 window,0,xs=sa0(1),ys=sa0(2),title=file0 tvcon,a0 xc1=fltarr(2) xc2=fltarr(2) ;Opredelenie uchastka po kotromu budem sovmeshat' result=DIALOG_MESSAGE("Mark Left-Bottom point of region ") cursor,xx,yy,/data ,wait=2 xc1(0)=xx xc1(1)=yy ;xc1=cursorpos(/data) result=DIALOG_MESSAGE("Mark Right-Top point of region") cursor,xx,yy,/data ,wait=2 xc2(0)=xx xc2(1)=yy ;narisuem prjamugol'nichek plots,[xc1(0),xc1(0)],[xc1(1),xc2(1)],color=12^16-1 plots,[xc2(0),xc2(0)],[xc1(1),xc2(1)],color=12^16-1 plots,[xc1(0),xc2(0)],[xc1(1),xc1(1)],color=12^16-1 plots,[xc1(0),xc2(0)],[xc2(1),xc2(1)],color=12^16-1 plots,[xc1(0),xc2(0)],[xc2(1),xc2(1)],color=12^16-1 wset,0 ;stop ;xc2=cursorpos(/data) result=DIALOG_MESSAGE("Do you accept region?",/Question) if (result eq 'No') then goto, mark_j ;xc2=cursorpos(/data) a1=float(a1) sa1=size(a1) window,/free,xs=sa1(1),ys=sa1(2),title=strmid(file1,rstrpos(file1,"\")+1,rstrpos(file1,".jpg")-1-rstrpos(file1,"\")) tvcon,a1 ;provedenie k zero-image CORREL_OPTIMIZE, A0(xc1(0):xc2(0),xc1(1):xc2(1)),a1(xc1(0):xc2(0),xc1(1):xc2(1)), xoffset_optimum2, yoffset_optimum2 a1_1=shift(a1,xoffset_optimum2,yoffset_optimum2) ;**************************** wdelete window,/free,xs=sa1(1),ys=sa1(2),title='Diff-images' tvcon,hist_equal(a1_1-a0) result=DIALOG_MESSAGE('Do you accept shift?',/Question) if (result eq 'No') then goto, mark_j window,/free,xs=sa1(1),ys=sa1(2),title=strmid(file1,rstrpos(file1,"\")+1,rstrpos(file1,".jpg")-1-rstrpos(file1,"\")) tvcon,a1_1 fileout=strmid(file1,0,rstrpos(file1,'.fts')-1) writefits,fileout+'_sh.fts',a1_1,hd1 result=DIALOG_MESSAGE('Next file?',/Question) if (result eq 'No') then goto, jump end jump:result=DIALOG_MESSAGE('THE END') end