;$Id: ppower_comp_exp6k.pro,v 1.6 2022/08/09 17:26:11 brandenb Exp $
if !d.name eq 'PS' then begin
  device,xsize=18,ysize=18,yoffset=3
  !p.charthick=2 & !p.thick=2 & !x.thick=2 & !y.thick=2
end
;
;  mv idl.ps ~/tex/roper/PencilGW/fig/ppower_comp6k.ps
;
!p.charsize=1.7
!x.margin=[7.2,.5]
!y.margin=[3.2,.2]
;
;  scale factor for GW spectra:
;
sGW=1./(32.*!pi)
;
dir1='M144_k10d_exp6'
dir2='M144_k10a_exp6k'
dir2='M144_k10a_exp6k_wmixed'
dir3='M144_k10a_exp6k_wmixed'
dir3='M144_k10a_exp6k_2nd_order_dt02'
;
power,'_GWs','_mag',k=k,spec1=spec1,spec2=spec1b,i=n,tt=t1,/noplot,datatopdir='../'+dir1+'/data'
power,'_GWs','_mag',k=k,spec1=spec2,spec2=spec2b,i=n,tt=t2,/noplot,datatopdir='../'+dir2+'/data'
;power,'_GWh','_GWm',k=k,spec1=spec3,spec2=spec3b,i=n,tt=t3,/noplot,datatopdir='../'+dir3+'/data'
power,'_GWs','_mag',k=k,spec1=spec3,spec2=spec3b,i=n,tt=t3,/noplot,datatopdir='../'+dir3+'/data'
;
!x.title='!6'
!y.title='!6'
!p.multi=[0,1,3]
!p.charsize=2.4
fo='(f6.1)'
siz=1.7
xx=1.2
th2=2
li2=0
th=8
k0=10.
;
yr=[2e-9,3e-2]
it=10 & itd2=0 & itd3=0
print,t1[it],t2[it+itd2];,t3[it]
plot_oo,k[1:*]/k0,sGW*spec1[1:*,it],yr=yr
;oplot,k[1:*]/k0,sGW*spec2[1:*,it+itd2],col=122,li=li2,th=th2
;oplot,k[1:*]/k0,sGW*spec2[1:*,it+itd2]+sGW*spec3[1:*,it+itd2]/t1[it]^2-2*sGW*spec3b[1:*,it+itd2]/t1[it],col=122,li=2,th=th2*2
oplot,k[1:*]/k0,sGW*spec2[1:*,it+itd2],col=122,li=2,th=th2*2
;oplot,k[1:*]/k0,sGW*spec2[1:*,it+itd2]+sGW*spec3[1:*,it+itd2]/t1[it]^2-2*sGW*spec3b[1:*,it+itd2]/t1[it],col=122,li=li2,th=th2
oplot,k[1:*]/k0,sGW*spec3[1:*,it+itd3],col=55,li=2,th=th2*2
;
;oplot,k[1:*]/k0,spec1b[1:*,it]
;oplot,k[1:*]/k0,spec2b[1:*,it+itd2],col=122,li=li2,th=th2
;oplot,k[1:*]/k0,spec3b[1:*,it+itd3],col=55,li=li2,th=th2
xyouts,xx/k0,6e-9,'!8t!6 = '+str(t1[it],fo=fo),siz=siz
;
;yr=[1e-7,2e-2]
it=40 & itd2=0
!y.title='!7X!6!dM!n(!8k!6)/!8k!6  and  !7X!6!dGW!n(!8k!6)/!8k!6'
print,t1[it],t2[it+itd2];,t3[it]
plot_oo,k[1:*]/k0,sGW*spec1[1:*,it],yr=yr
;oplot,k[1:*]/k0,sGW*spec2[1:*,it+itd2],col=122,li=li2,th=th2
;oplot,k[1:*]/k0,sGW*spec2[1:*,it+itd2]+sGW*spec3[1:*,it+itd2]/t1[it]^2-2*sGW*spec3b[1:*,it+itd2]/t1[it],col=122,li=2,th=th2*2
oplot,k[1:*]/k0,sGW*spec2[1:*,it+itd2],col=122,li=2,th=th2*2
;oplot,k[1:*]/k0,sGW*spec2[1:*,it+itd2]+sGW*spec3[1:*,it+itd2]/t1[it]^2-2*sGW*spec3b[1:*,it+itd2]/t1[it],col=122,li=li2,th=th2
oplot,k[1:*]/k0,sGW*spec3[1:*,it+itd3],col=55,li=2,th=th2*2
;
oplot,k[1:*]/k0,spec1b[1:*,it]
oplot,k[1:*]/k0,spec2b[1:*,it+itd2],col=122,li=li2,th=th2
xyouts,xx/k0,8e-9,'!8t!6 = '+str(t1[it],fo=fo),siz=siz
;
it=390 & itd2=1
!x.title='!8k!6/!8k!6!d*!n'
!y.title='!6'
print,t1[it],t2[it+itd2],t3[it+itd3]
plot_oo,k[1:*]/k0,sGW*spec1[1:*,it],yr=yr
;oplot,k[1:*]/k0,sGW*spec2[1:*,it+itd2],col=122,li=li2,th=th2
;oplot,k[1:*]/k0,sGW*spec2[1:*,it+itd2]+sGW*spec3[1:*,it+itd2]/t1[it]^2-2*sGW*spec3b[1:*,it+itd2]/t1[it],col=122,li=2,th=th2*2
oplot,k[1:*]/k0,sGW*spec2[1:*,it+itd2],col=122,li=2,th=th2*2
;oplot,k[1:*]/k0,sGW*spec2[1:*,it+itd2]+sGW*spec3[1:*,it+itd2]/t1[it]^2-2*sGW*spec3b[1:*,it+itd2]/t1[it],col=122,li=li2,th=th2
oplot,k[1:*]/k0,sGW*spec3[1:*,it+itd3],col=55,li=2,th=th2*2
;
oplot,k[1:*]/k0,spec1b[1:*,it]
oplot,k[1:*]/k0,spec2b[1:*,it+itd2],col=122,li=li2,th=th2
xyouts,xx/k0,8e-9,'!8t!6 = '+str(t1[it],fo=fo),siz=siz
xyouts,1.0,2.3e-6,'!7X!6!dGW!n(!8k!6)/!8k!6',siz=siz*.9
xyouts,0.6,1.6e-3,'!7X!6!dM!n(!8k!6)/!8k!6',siz=siz
;xyouts,2.43,1.5e-8,'!6exact',siz=siz*.8,col=122
;xyouts,3.40,5.0e-9,'!60.12',siz=siz*.6,col=55
xyouts,4.80,4e-8,'!60.05',siz=siz*.6
;
END
