pro norma,init,numim ; normalization of images. ; input: files spot[init:init+numim-1].dat, output: same files spot........ ; reading the input image ; !!!! TO BE CHANGED WITH RESPECT TO WHERE THE IMAGES ARE STORED !!!! stra=string('/home1/msobotka/lap93/grand/spot') stro=string('/home1/msobotka/lap93/grand/spot') strb=string('.dat') ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;input parameters x1=412 ;boundaries of subimage to which mean value y1=350 ; the normalization will be done... x2=667 y2=477 ima=intarr(700,500) ;input image array openw,2,'norma.log' for i=0,numim-1 do begin dcn=strtrim(i+init,2) str=dcn if (str eq '159') then goto,skip ;bad frame spot159.dat ;if strlen(dcn) eq 3 then str='0'+dcn ;if strlen(dcn) eq 2 then str='00'+dcn ;if strlen(dcn) eq 1 then str='000'+dcn print,'Now reading image:' print,stra+str+strb openr,1,stra+str+strb readu,1,ima close,1 std=stdev(ima(x1:x2,y1:y2),mea) print,'mean =',mea,' norm.std =',std/mea printf,2,i+init,mea,std/mea ; normalization ima=float(ima)/mea*10000. ima=nint(ima) print,'Saving image:' print,stro+str+strb openw,1,stro+str+strb writeu,1,ima close,1 skip: endfor close,2 print,'normalization terminated ok' end