; ; $Id: pgrowth.pro,v 1.3 2017/01/11 04:47:24 brandenb Exp $ ; for plotting brms and local growth rate ; a summary of the results are in roberts.dat in this directory ; !p.multi=[0,1,2] pc_read_ts,o=ts tt=ts.t t1=10. & t2=max(tt) t1=1.0 & t2=2.9 brms=ts.brms tmax=max(tt) lam=deriv(tt,alog(brms)) default,t1,(1<(tmax/2.)) default,t2,(4<(tmax/2.)) @parameters ; ; brms ; plot_io,tt,brms,xr=minmax(tt) ; ; growth rate ; good=where(tt gt t1 and tt lt t2) if good(0) ne -1 then begin lamm=mean(lam(good)) print,'lam=',lamm endif ; yr=[-1,1]*6.*max(lamm) plot,tt,lam,yr=yr,xtit='!8t!6',ytit='',xr=minmax(tt) oplot,tt,tt*0 ; good=where(tt gt t1 and tt lt t2) if good(0) ne -1 then begin oplot,tt(good),lam(good),col=122 lamm=mean(lam(good)) oplot,tt(good),tt(good)-tt(good)+lamm,li=3,col=188 print,'lam=',lamm endif else begin print,'time series still too short for getting growth rate' endelse wait,1 ; ; period fit ; phase=+1.4735 & ampl=1.270e-7 & om1=1.4294 & om2=1.4300 & nfit=20 & t1=1. ;(nx=512) ; tt=ts.t goodsig=where(tt ge t1) signalfull=ts.bxpt signal=signalfull[goodsig] ttgood=tt[goodsig] oom=grange(om1,om2,nfit) diff=fltarr(nfit) print,max(abs(signal)),ampl,fo="(2e9.2)" ; END