pro testfor0,kmax,kkmax,lmax,llmax n1=640 n2=512 pwr=n2 im_init = bytarr(n1,n2) im = bytarr(pwr,pwr) image_1 = bytarr(pwr) nwindow = 15 nb = nwindow - 1 name1 = 'spi_c242' kmax=-1 kkmax=-1 lmax=-1 llmax=-1 coumax=40 for i = 0, nb do begin ;===================== number = string( format='(2I)', i) no = strcompress( number,/remove_all) ss = no if (i lt 10) then ss = '0' + no file = name1 + ss + '.bin' openr, 1, file readu, 1, im_init close,1 print, 'Reading from file ', file im=im_init(0:511,0:511) ;recherche de lignes zeros kmaxi=-1 kkmaxi=-1 lmaxi=-1 llmaxi=-1 for coupe=0,coumax do begin ;--------------------------- image_1=im(coupe,*) ;------------------ k=0 for j=0,511 do begin if image_1(j) eq 0B then k=k+1 endfor if k eq 512 then kmaxi=coupe image_1=im(511-coupe,*) ;------------------------ kk=0 for j=0,511 do begin if image_1(j) eq 0B then kk=kk+1 endfor if kk eq 512 then kkmaxi=coupe image_1 = im( *, coupe ) ;------------------------ k=0 for j=0,511 do begin if image_1(j) eq 0B then k=k+1 endfor if k eq 512 then lmaxi=coupe image_1=im(*,511-coupe) ;------------------------ kk=0 for j=0,511 do begin if image_1(j) eq 0B then kk=kk+1 endfor if kk eq 512 then llmaxi=coupe ;next coupe endfor if kmaxi gt kmax then kmax= kmaxi if kkmaxi gt kkmax then kkmax=kkmaxi if lmaxi gt lmax then lmax= lmaxi if llmaxi gt llmax then llmax=llmaxi ; next file endfor print,'kmax=',kmax,' kkmax=',kkmax,' lmax=',lmax,' llmax=',llmax return end