pc_read_ts,obj=ts pc_read_param,obj=param,/param2 ; spawn,'touch parameters.pro' @parameters.pro ; default,t1,0. default,t2,9e29 default,t1b,0. default,t2b,9e29 default,file,'o32.dat' default,dir,'../idl/' ; ; Note: put a minus sign here, because of the minus sign ; in the definition of alp and eta ; tt=ts.t alp=.5*(ts.alp11+ts.alp22) eta=.5*(ts.eta11+ts.eta22) ; lam=param.lam_testfield om=param.om_testfield c=cos(om*tt) s=sin(om*tt) ; good=where(tt gt t1 and tt le t2) tgood=tt(good) good2=where(tgood gt t1b and tgood le t2b) ; !p.multi=[0,2,2] !p.multi=0 !p.multi=[0,1,2] ; alpc=alp*c alpcm=accum(alpc(good)) alp_re=mean(alpcm(good2)) plot,tt,alpc,yst=3 oplot,tgood,alpcm,col=122 oplot,tgood(good2),accum(alpcm(good2)),col=188 ; alps=alp*s alpsm=accum(alps(good)) alp_im=mean(alpsm(good2)) plot,tt,alps oplot,tgood,alpsm,col=122 oplot,tgood(good2),accum(alpsm(good2)),col=188 ; etac=eta*c etacm=accum(etac(good)) eta_re=mean(etacm(good2)) ;plot,tt,etac,yst=3 ;oplot,tgood,etacm,col=122 ;oplot,tgood(good2),accum(etacm(good2)),col=188 ; etas=eta*s etasm=accum(etas(good)) eta_im=mean(etasm(good2)) ;plot,tt,etas ;oplot,tgood,etasm,col=122 ;oplot,tgood(good2),accum(etasm(good2)),col=188 ; cwd,run openw,1,file fo='(2f8.4,4f9.4,2x,a)' print,lam,om,alp_re,alp_im,eta_re,eta_im,run,fo=fo printf,1,lam,om,alp_re,alp_im,eta_re,eta_im,run,fo=fo close,1 ; spawn,'cat '+file+'>>'+dir+file END