;eto mozhno pomenjat'" main_dir="D:\OLD_PC\Old_disk\D_disk\Users\student\Chornogor\" ;file_dir="\CaII\" file_dir="H_alpha\" spectra='H-alpha' radius=15; 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='13_29_12.jpg';CaII zero=file 'H-alpha':file_name='25Jul04_13_35_04.jpg';H-alpha zero=file ;file0=main_dir+file_name endcase file0=main_dir+file_name read_jpeg,file0,a0,true=3 sa0=size(a0) a0=float(a0) mark_j:window,0,xs=sa0(1)/2,ys=sa0(2)/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) ; schityvanie vsekh files, u kotoryh nado poschitat' intensivnost' file_l=FINDFILE(main_dir+file_dir+'25Jul04_*.jpg') s_list=size(file_l) ;stop ;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) read_jpeg,file1,a1 a1=float(a1) sa1=size(a1) window,/free,xs=sa1(1)/2,ys=sa1(2)/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 ; stop a1_1=shift(a1,xoffset_optimum2,yoffset_optimum2) ;**************************** wdelete window,/free,xs=sa1(1)/2,ys=sa1(2)/2,title=strmid(file1,rstrpos(file1,"\")+1,rstrpos(file1,".jpg")-1-rstrpos(file1,"\")) tvcon,a1_1 ;vybor uchastka dlaj normirovki result=DIALOG_MESSAGE("Intensity normalization",/Question) if (result eq 'No') then goto, jump mark_j1:tvcon,a1_1 result=DIALOG_MESSAGE("Mark Left-Bottom point of quiet region ") ;x1=cursorpos(/data) cursor,xx,yy,/data ,wait=2 x1=fltarr(2) x1(0)=xx x1(1)=yy result=DIALOG_MESSAGE("Mark Right-Top point of quiet region") ;x2=cursorpos(/data) cursor,xx,yy,/data ,wait=2 x2=fltarr(2) x2(0)=xx x2(1)=yy ;*********************obrisovyvaem spokojnuju oblast' plots,[x1(0),x1(0)],[x1(1),x2(1)],color=12^16-1 plots,[x2(0),x2(0)],[x1(1),x2(1)],color=12^16-1 plots,[x1(0),x2(0)],[x1(1),x1(1)],color=12^16-1 plots,[x1(0),x2(0)],[x2(1),x2(1)],color=12^16-1 plots,[x1(0),x2(0)],[x2(1),x2(1)],color=12^16-1 wset,!d.window ;stop ;xc2=cursorpos(/data) result=DIALOG_MESSAGE("Do you accept quiet region?",/Question) if (result eq 'No') then goto, mark_j1 wdelete xx=a1_1(x1(0):x2(0),x1(1):x2(1)) ssx=size(xx) & ss=total(xx)/(float(ssx(4))) window,/free,xs=sa1(1)/2,ys=sa1(2)/2 ; normirujem a1_1=a1_1/ss tvcon,a1_1 if il eq 0 then begin ;pomechaem tochku v kotoroj berem intensivnost' result=DIALOG_MESSAGE("Input point of intensity") cursor,xx,yy,/data ,wait=2 xy=fltarr(2) xy(0)=xx xy(1)=yy end ;nakhodim vse nomera massiva v zadanom radiuse ot nee im=a1_1 & dist_circle ,im, [sa1(1),sa1(2)],xy(0),xy(1) sh=size(a1_1(where(im lt radius)));opredeljaem ikh obshee kolichestvo a1_3=a1_1 a1_3(sh)=255. tvcon,a1_3 sintensity=total(a1_1(where(im lt 1)))/sh(1); Schitaem srednjuju intensivnost' v etom uchastke print,sintensity result=DIALOG_MESSAGE("Next file?",/Question) if (result eq 'No') then goto, jump end jump:result=DIALOG_MESSAGE("THE END") end