filreg = '../FITS/G-band/AR9669_19oct01_g_*' f = findfile(filreg) st = 32 ;;; position of time in name tim = 3600l*strmid(f, st, 2)+60l*strmid(f, st+2, 2)+strmid(f, st+4, 2) openw, 1, 'times_199' writeu, 1, tim close, 1 tim0 = tim(0) tim = tim-tim0 ;;; align the frames, equalize intensity mkmov, mov_dim, filreg, /clip16, file='raw_g', smooth=11 sx = mov_dim(0) sy = mov_dim(1) num = mov_dim(2) ;;; equalize power spectra m_s = strtrim(sx, 2)+'x'+strtrim(sy, 2) spawn, 'cp raw_g_'+m_s+' enha_g_'+m_s openu, 1, 'enha_g_'+m_s mov = assoc(1, intarr(sx, sy)) enhance, mov, ASSOC=num ;;; remove distortions rubb_file, mov, num, av=4, cell=32, step=24, range=3, plot=3, /same, smooth=7 ;;; normalize intensity FOR i=0, num-1 DO BEGIN av = avg(mov(i)) mov(i)=1000./av*mov(i) ENDFOR close, 1 conefilt_file, 'enha_g_'+m_s, sx, sy, num, 725*0.071, 30, 6, $ PART=[512, 384], RES='filt_g_'+m_s stop mov = intarr(sx, sy, num) openr, 1, 'filt_g_'+m_s readu, 1, mov close, 1 mm1 = scale_array(mov) tt = tim+tim0 hr = tt/3600 mn = (tt MOD 3600)/60 sc = tt MOD 60 tt = nnumber(hr, 2)+":"+nnumber(mn, 2)+":"+nnumber(sc, 2) show, mm1(*, *, 0), /cent FOR i=0, num-1 DO BEGIN tv, mm1(*, *, i) clock, tt(i), /dev, siz=100, pos=[10, 10] mm1(*, *, i) = tvrd() ENDFOR write_mpeg, '../MPEG/AR9669_19oct01_g.mpg', mm1, tmp='/data/pit/tmp/mpgtmp/' mm1 = congrid(mov, sx/2, sy/2, num) mm1 = scale_array(mm1) show, mm1(*, *, 0), /cent FOR i=0, num-1 DO BEGIN tv, mm1(*, *, i) clock, tt(i), /dev, siz=75, pos=[8, 8] mm1(*, *, i) = tvrd() ENDFOR write_mpeg, '../MPEG/AR9669_19oct01_g_small.mpg', mm1, $ tmp='/data/pit/tmp/mpgtmp/' ;; Rotation code ;openr,1,'filt_1168x912' ;p=assoc(1,intarr(1168,912)) ;openr,2,'/data/pit/2001/Oct19/FITS/G-band/filt_1152x912' ;g=assoc(2,intarr(1152,912)) ;p1=p(0) ;g1=g(1) ;print,shc(g1(98:225,3:130),p1(0:127,0:127)) ;phi=findgen(2048)/2047*!pi/2 ;r=indgen(768) ;x=fltarr(2048,768) ;y=fltarr(2048,768) ;for i=0,2047 do x(i,*)=r*cos(phi(i)) ;for i=0,2047 do y(i,*)=r*sin(phi(i)) ;g2=interpolate(g1,x+162,y+67) ;p2=interpolate(p1,x+64,y+64) ;print,shc(g2,p2,/int) ;print,interpolate(phi,26.4151)*!radeg ;print,912*sin(1.16139*!dtor) ;openw,3,'align_g_1024x880x199' ;for i=0,198 do writeu,3,g(116:116+1023,4:883,i+1) ;close,3 ;openw,3,'align_k_1024x880x199' ;for i=0,198 do begin&tmp=rot(p(i),1.16139,1,0,0,/piv)&$ ;writeu,3,tmp(19:19+1023,0:879)&end ;close,3 ; END