;$Id: pspecm_scl5_comp2_single.pro,v 1.5 2021/06/29 04:57:41 brandenb Exp $
if !d.name eq 'PS' then begin
  ;device,xsize=18,ysize=8,yoffset=3
  device,xsize=18,ysize=16,yoffset=3
  device,xsize=18,ysize=8,yoffset=3
  !p.charthick=2 & !p.thick=2 & !x.thick=2 & !y.thick=2
end
;
dir1='M1152e_exp6k4_M4b'
dir2='M1152e_exp6k4'
dir3='M1152e_exp6k4_k60b'
yr_pspecm_scl3=[1d-16,4d-10]
yr_pspechm_scl3=[2d-24,1.4d-20]
;
siz=1.3 & !p.charsize=1.7
siz=.8 & !p.charsize=1.
!x.margin=[7.9,0.5]
!y.margin=[3.2,2.2]
!p.multi=0
fac_h=1.263e-18
fac2=2.
half='!s!u 1!n!r!s-!r!d 2!n'
specm='/specm.sav'
label=''
;
;  determine normalization
;
default,maglabel,'mag'
default,green_lines,0
default,plot_polarization,1
ytickf='logticks_exp'
yr=yr_pspecm_scl3
;
Hstar=2.066d10
a0=1.2545d15
freq=Hstar/(2.*!pi*a0)
H0=3.24d-18
rhocrit_fac=3./(8.*!pi)
fac=(Hstar/H0)^2/rhocrit_fac*(1./a0)^4
facGW=1./(16.*!pi)
xr=[5e-5,1.6e-1]
circ_sym,0.7,1
mixed=0.
;
;  1st panel
;
!p.title='!6Primordial Gravitational Waves (GW)'
!p.title='!6'
!x.title='!6frequency !8f!6 [Hz]'
!y.title='!6!8h!6!s!d0!n!r!u2!n!7X!6!dGW!n(!8f!6) = GW energy / rad energy'
!y.title='!6!8h!6!s!d0!n!r!u2!n!7X!6!dGW!n(!8f!6)'
;
restore,'../'+dir1+specm
grav_tot=grav1m+grah1m/tm^2+mixed
OmegaGW=facGW*fac*k*grav_tot
plot_oo,freq*k,OmegaGW,xr=xr,yr=yr,ytickf=ytickf,/nodata
oplot,freq*k,OmegaGW,col=122
;
restore,'../'+dir3+specm
grav_tot=grav1m+grah1m/tm^2+mixed
OmegaGW=facGW*fac*k*grav_tot
oplot,freq*k,OmegaGW,col=55
;
xyouts,4.0e-2,2.0e-15,'!6case1:',siz=siz,col=122
xyouts,1.6e-2,1.2e-15,'!6100 bubbles/horizon',siz=.7*siz,col=122
;xyouts,3e-2,1.3e-15,'!6ini2',siz=siz,col=122
xyouts,2e-3,5.3e-16,'!6case2:',siz=siz,col=55
xyouts,1e-3,3.3e-16,'!610 bubbles/horizon',siz=.7*siz,col=55
;
xx=[3e-4,2e-3] & oplot,li=3,xx,2.0e-8*xx
xx=[7e-3,4e-2] & oplot,li=3,xx,7e-18/xx^(8./3.)
xyouts,2.0e-4,3*6.0e-12,'!9A!8f!6, not !9A!8f!6!u3!n,',siz=siz
xyouts,1.8e-4,3*3.0e-12,'!6as prev thought',siz=siz*.6
xyouts,1.2e-2,6.1e-14,'!9A!8f!6!u-8/3!n',siz=siz
xyouts,1.0e-2,2.9e-14,'!6related to',siz=siz*.7
xyouts,1.0e-2,1.8e-14,"!6Kolmogorov's",siz=siz*.7
xyouts,1.0e-2,1.1e-14,"!6-5/3 spectrum",siz=siz*.7
;
;  Caprini+16, Cornish, Maggiore00 points
;
loadct,6
dir='~/tex/roper/PencilGW/data/'
file=dir+'Cornish.rtf'
c1=rtable(file,2,head=1)
;oplot,10^c1[0,*],((10^c1[1,*]/fac_h)*10^c1[0,*])^2,li=4,col=122
;
file=dir+'Cornish20Yrs.dat'
c2=rtable(file,2,head=1)
;oplot,10^c2[0,*],((10^c2[1,*]/fac_h)*10^c2[0,*])^2,li=3,col=122
;
;file=dir+'Maggiore.rtf'
;m1=rtable(file,2,head=1)
;
;file=dir+'Caprini-C3.rtf'
;a3=rtable(file,2,head=1)
;oplot,10^a3[0,*],10^a3[1,*],li=2,col=122
;
;file=dir+'Caprini-C1.rtf'
;a1=rtable(file,2,head=1)
;oplot,10^a1[0,*],10^a1[1,*],li=1,col=122
;
file=dir+'Robson_Cornish.rtf'
n1=rtable(file,2,head=1)
oplot,10^n1[0,*],((10^n1[1,*]/fac_h)*10^n1[0,*])^2,li=3,col=122,thick=thick4
;
;xyouts,5.0e-2,1.3e-11,'!6(i)',siz=siz,col=122
xyouts,1.0e-2,4.2e-11,'!6  LISA!climit',siz=siz,col=122
;xyouts,9e-3,3.4e-10,'!6(iii)',siz=siz,col=122
;xyouts,4e-3,3.8e-10,'!6(iv)',siz=siz,col=122
;
loadct,5
;
print,'$mv idl.ps ~/tex/yutong/plan/Project_Description/fig/pspecm_scl5_comp2_single.ps'
print,'$mv idl.ps ~/tex/roper/GW/fig/pspecm_scl5_comp2_single.ps'
print,'$mv idl.ps ~/tex/tina/Proposals/NASA-LPS-2020/trunk/pspecm_scl5_comp2_single.ps'
print,'$mv idl.ps ~/GitHub/Tina/ATP2021-GWs/pspecm_scl5_comp2_single.ps'
print,'$convert idl.ps /D/Print/pspecm_scl5_comp2_single.png'
END
