power,'_kin','_mag',k=k,spec1=spec1,spec2=spec2,i=n,tt=t,/noplot,/double ; ; $Id: ppower_all.pro,v 1.3 2018/11/01 07:11:42 brandenb Exp $ ; ; This routine is used to view all power spectra ; that were written during the run (controlled by dspec) ; The plot range yr is set to a default value. ; The time interval of plotting is "w" (default value) ; ; 5-oct-02/axel: written ; spawn,'if (! -f param.pro) touch parameters.pro' @parameters xr=[1,max(k)] istride=1 default,w,.2 default,t1,.0 default,iover,0 default,istride,1 default,yr,[3e-12,3e-2] ampl15=3e-10 & ampl4=1e-13 ampl15=3e-6 & ampl4=1e-8 ; ; compute mean epsK and epsM ; pc_read_ts,o=ts good=where(ts.t ge t1 and ts.t le t2) epsK=mean(ts.epsK(good)) epsM=mean(ts.epsM(good)) urms=mean(ts.urms(good)) ; good=where(t ge t1 and t le t2) i1=min(good) i2=max(good) ;i2=n-2 s=1. s=k^1.666667/epsK^.666667 ;s=k^1.666667/epsK^.666667*1e63 ; for i=i1,i2,istride do begin if iover eq 0 or i eq 0 then begin plot_oo,k,s*spec1(*,i),xr=xr,yr=yr,tit='t='+str(t(i)) endif else begin oplot,k,s*spec1(*,i) endelse ;oplot,k,s*mspec1,col=55,thick=3 ;(??) oplot,k,s*spec2(*,i),col=122 ;kk=[20,180] & oplot,kk,.02/kk^1.66667 ;kkk=grange(20.,200.,100) ;kk=[20,180] & oplot,kkk,200./kkk^6 ;kk=[1,20] & oplot,kk,ampl15*kk^1.5,col=188 ;kk=[1,20] & oplot,kk,.01*ampl15*kk^1.5,col=188 ;kk=[1,20] & oplot,kk,.001*ampl15*kk^2;,col=188 print,i,t(i) wait,w end ; print,'E_K (white), E_M (red), E_T (yellow)' ; ; averages ; pc_read_kf,kf nk=n_elements(k) ;llam=spread(exp(-2.*lam*t[i1:i2]),[0],[nk]) llam=1. ;help,llam ; ngood=n_elements(good) mspec1=total(spec1(*,i1:i2),2)/ngood mspec2=total(llam*spec2(*,i1:i2),2)/ngood ; pc_read_param,o=param,/param2 eta=param.eta nu=param.nu ; @postproc ; save,file='mean_spec.sav',k,kf,epsK,epsM,nu,eta,mspec1,mspec2 ; END