;$Id: pSCL2.pro,v 1.13 2022/01/02 21:11:15 brandenb Exp $
if !d.name eq 'PS' then begin
  ;device,xsize=18,ysize=8,yoffset=3
  device,xsize=18,ysize=11,yoffset=3
  !p.charthick=3 & !p.thick=3 & !x.thick=3 & !y.thick=3
end
;
;  mv idl.ps ~/tex/roper/GW/fig/pspecm_scl2.ps
;  mv idl.ps ~/tex/prop/computing/pdc/18/fig/pspecm_scl3n.ps
;
siz=1.7
@parameters
!p.charsize=1.7
;!p.charsize=1.8
!x.margin=[7.4,0.2]
!y.margin=[3.2,0.4]
;!p.multi=[0,1,2]
;
default,iread,0
if iread eq 0 then begin
  ;power,'_GWh','_GWh',k=k,spec1=spec1 ,spec2=spec1 ,i=n,tt=t,/noplot
  ;power,'_SCL','_SCL',k=k,spec1=spec1 ,spec2=spec1 ,i=n,tt=t,/noplot
  ;power,'_SCL','_SCL',k=k,spec1=spec2 ,spec2=spec2 ,i=n,tt=t,/noplot
  ;power,'_VCT','_VCT',k=k,spec1=spec2 ,spec2=spec2 ,i=n,tt=t,/noplot
  ;power,'_VCT','_VCT',k=k,spec1=spec2 ,spec2=spec2 ,i=n,tt=t,/noplot
  ;power,'_GWh','_GWh',k=k,spec1=spec0 ,spec2=spec0 ,i=n,tt=t,/noplot,/lkscale
  power,'_Str','_Str',k=k,spec1=spec1 ,spec2=spec1 ,i=n,tt=t1,/noplot,/lkscale
  power,'_Tpq','_Tpq',k=k,spec1=spec2 ,spec2=spec2 ,i=n,tt=t,/noplot,/lkscale
  power,'_SCL','_SCL',k=k,spec1=spec3 ,spec2=spec3 ,i=n,tt=t3,/noplot,/lkscale
  power,'_VCT','_VCT',k=k,spec1=spec4 ,spec2=spec4 ,i=n,tt=t4,/noplot,/lkscale
  iread=1
endif
;spec2=reform(spec2,576,1)
s0=size(spec0) & nt0=s0[2]
s1=size(spec1) & nt1=s1[2]
s2=size(spec2) & nt2=s2[2]
s3=size(spec3) & nt3=s3[2]
s4=size(spec4) & nt4=s4[2]
;print,'nt0,nt1,nt2=',nt0,nt1,nt2,nt3,nt4
print,'nt0,nt1,nt2=',nt0,nt1,nt3,nt4
!x.title='!8k!6'
default,ytitSVT,'!6'
!y.title=ytitSVT
;
default,it,10
default,yrSVT,[1e-22,1e-3]
print,'t=',t1[it],t3[it],t4[it]
plot_oo,yr=yrSVT,k[1:*],spec1[1:*,it],li=0
oplot,k[1:*],spec2[1:*,it],li=1
oplot,k[1:*],spec3[1:*,it]*k[1:*]^4,col=55
oplot,k[1:*],spec4[1:*,it]*k[1:*]^2,col=122
;
cwd,run
xxx=160. & dxx=160.
if run eq "E1152e_t11_M4d_double" then begin
  xx=[150.,450.] & oplot,xx,5e-10*xx^2
  xx=[1.4e3,8e3] & oplot,xx,1e7/xx^3
  xx=[1.0e3,5e3] & oplot,xx,3e8/xx^4.333
  xyouts,3e3,1e-3,siz=siz,'!9A!8k!6!u-3!n'
  xyouts,250,3e-6,siz=siz,'!9A!8k!6!u2!n'
  xyouts,1.3e3,1e-8,siz=siz,'!9A!8k!6!u-13/3!n'
  xx=160. & dx=160.
  legend,xx,dx,1e-10,0,col=55,'scalar'
  legend,xx,dx,3e-12,0,col=122,'vector'
  legend,xx,dx,1e-13,0,'tensor'
end else if run eq "M1152e_exp6k4_M4b_rerun" then begin ;(ini3)
  xx=[110.,300.] & oplot,xx,5e-10*xx^2
  xx=[1.0e3,3e3] & oplot,xx,2e7/xx^3
  xx=[7.0e2,2e3] & oplot,xx,3e0/xx^1.6667
  xyouts,2.4e3,2e-3,siz=siz,'!9A!8k!6!u-3!n'
  xyouts,230,3e-6,siz=siz,'!9A!8k!6!u2!n'
  xyouts,7e2,7e-7,siz=siz,'!9A!8k!6!u-5/3!n'
  xx=160. & dx=160.
  legend,xx,dx,1e-10,0,col=55,'scalar'
  legend,xx,dx,3e-12,0,col=122,'vector'
  legend,xx,dx,1e-13,0,'tensor'
end else if run eq "K512sig1_k6_ramp1a" then begin ;(Ksig1)
  ;xx=[110.,200.] & oplot,xx,5e-9*xx^2 & xyouts,230,1e-4,siz=siz,'!9A!8k!6!u2!n'
  ;xx=[1e3,7e3] & oplot,xx,3e1/xx^1.6667 & xyouts,5e3,4e-5,siz=siz,'!9A!8k!6!u-5/3!n'
  xx=[120.,350.] & oplot,xx,6e-9*xx^1.5 & xyouts,140,2e-5,siz=siz,'!9A!8k!6!u3/2!n'
  xx=[1.6e3,6e3] & oplot,xx,9e-2/xx^1.0& xyouts,5e3,3e-5,siz=siz,'!9A!8k!6!u-1!n'
  xx=160. & dx=160.
  legend,xx,dx,2e-7,0,col=55,'scalar'
  legend,xx,dx,6e-8,0,col=122,'vector'
  legend,xx,dx,2e-8,0,'tensor'
end else if run eq "K512sig0_k6_ramp1a" then begin ;(Ksig0)
  xx=[120.,350.] & oplot,xx,6e-9*xx^1.5 & xyouts,140,2e-5,siz=siz,'!9A!8k!6!u3/2!n'
  xx=[1.6e3,6e3] & oplot,xx,9e-2/xx^1.0& xyouts,5e3,3e-5,siz=siz,'!9A!8k!6!u-1!n'
  xx=160. & dx=160.
  legend,xx,dx,2e-7,0,col=55,'scalar'
  legend,xx,dx,6e-8,0,col=122,'vector'
  legend,xx,dx,2e-8,0,'tensor'
end else if run eq "M512sig1_k6_ramp1b" then begin ;(Msig1)
  xx=[110.,200.] & oplot,xx,5e-9*xx^2 & xyouts,230,1e-4,siz=siz,'!9A!8k!6!u2!n'
  xx=[1e3,7e3] & oplot,xx,3e1/xx^1.6667 & xyouts,5e3,4e-5,siz=siz,'!9A!8k!6!u-5/3!n'
  xx=160. & dx=160.
  legend,xx,dx,2e-7,0,col=55,'scalar'
  legend,xx,dx,6e-8,0,col=122,'vector'
  legend,xx,dx,2e-8,0,'tensor'
end else if run eq "M512sig0_k6_ramp1b" then begin ;(Msig0)
  xx=[120.,450.] & oplot,xx,4e-9*xx^1.5 & xyouts,140,2e-5,siz=siz,'!9A!8k!6!u3/2!n'
  xx=[1.6e3,8e3] & oplot,xx,1e1/xx^1.6667 & xyouts,5e3,1e-5,siz=siz,'!9A!8k!6!u-5/3!n'
  xx=160. & dx=160.
  legend,xx,dx,2e-7,0,col=55,'scalar'
  legend,xx,dx,6e-8,0,col=122,'vector'
  legend,xx,dx,2e-8,0,'tensor'
end else if run eq "K512irro_k6_ramp1c" then begin ;(irro, expansion wave)
  xx=[120.,450.] & oplot,xx,4e-9*xx^1.5 & xyouts,140,2e-5,siz=siz,'!9A!8k!6!u3/2!n'
  xx=[1.3e3,8e3] & oplot,xx,4e1/xx^2.   & xyouts,5e3,2e-6,siz=siz,'!9A!8k!6!u-2!n'
  xx=[1.0e3,7e3] & oplot,xx,8e3/xx^3.3  & xyouts,2e3,4e-9,siz=siz,'!9A!8k!6!u-3.3!n'
  legend,xxx,dxx,2e-8,0,col=55,'scalar'
  legend,xxx,dxx,6e-9,0,col=122,'vector'
  legend,xxx,dxx,2e-9,0,'tensor'
end else if run eq "K512irrok6c" then begin ;(irro, plane wave)
  xx=[120.,450.] & oplot,xx,2e-9*xx^1.5 & xyouts,140,1e-5,siz=siz,'!9A!8k!6!u3/2!n'
  xx=[1.9e3,6e3] & oplot,xx,5e0/xx^1.8& xyouts,4e3,2e-6,siz=siz,'!9A!8k!6!u-1.8!n'
  xx=[1.0e3,7e3] & oplot,xx,2e2/xx^2.8  & xyouts,2e3,4e-9,siz=siz,'!9A!8k!6!u-2.8!n'
  legend,xxx,dxx,2e-8,0,col=55,'scalar'
  legend,xxx,dxx,6e-9,0,col=122,'vector'
  legend,xxx,dxx,2e-9,0,'tensor'
end
;
;print,"$convert idl.ps /D/Print/GW_prog2019/pSCL_"+run+".png"
print,'$mv idl.ps ~/tex/sayan/SVT/fig/pSCL2_'+run+'.ps'
END
