;$Id: ppower_oplot.pro,v 1.1 2011/04/02 14:27:38 brandenb Exp $ if !d.name eq 'PS' then begin device,xsize=18,ysize=12,yoffset=3 !p.charthick=3 & !p.thick=3 & !x.thick=3 & !y.thick=3 end ; ; convert idl.ps ~/Figures/MHDturbulence/bangalore10/ppower_helical_512c.png ; !p.charsize=1.7 !x.margin=[8.8,.5] !y.margin=[3.2,.2] ; power,'_kin','_mag',k=k,spec1=spec1,spec2=spec2,i=n,tt=t,/noplot & print,n ; ; $Id: ppower_oplot.pro,v 1.1 2011/04/02 14:27:38 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)] default,w,.2 default,t1,.0 default,iover,0 comp=k comp(0)=1. comp=1./comp ; yr=[1e-10,1e-2] plot_oo,k,comp*spec1(*,n-2),xr=xr,yr=yr,tit='!6',li=1 for i=0,n-2,20 do begin if(t(i) ge t1) then begin oplot,k,comp*spec1(*,i),li=1 oplot,k,comp*spec2(*,i) print,i end end ; print,'E_K (white), E_M (red), E_T (yellow)' ; ; averages ; mspec1=total(spec1,2)/i mspec2=total(spec2,2)/i mspec1h=total(spec1h,2)/i mspec2h=total(spec2h,2)/i ; save,file='mean_spec.sav',k,mspec1,mspec2,mspec1h,mspec2h ; END