;$Id: pearly.pro,v 1.5 2021/12/19 06:34:43 brandenb Exp $
if !d.name eq 'PS' then begin
  device,xsize=18,ysize=7,yoffset=3
  !p.charthick=2 & !p.thick=2 & !x.thick=2 & !y.thick=2
end
;
cwd,run
!p.charsize=1.1
!x.margin=[8.8,0.5]
!y.margin=[3.2,0.3]
!x.title='!6'
!p.multi=[0,1,3]
si2=1.0
siz=1.3
;
;  For Run B1
;
xr=[10.,102400.]
it= [0  ,  1, 10, 30, 60,100,200,300]
col=[255,255,255, 55,122,155,188,188]
col=[  0,  0,  0, 55, 55,122,122,155]
yr1=[3d-36,2d-28] & yr2=[1d-48,4d-35]
;
;  For Run B10
;
xr=[100.,25600.]
it= [0  ,  1, 10, 30, 60,100,200,300]
col=[255,255,255, 55,122,155,188,188]
col=[  0,  0,  0, 55, 55,122,122,155]
yr1=[3d-36,2d-08] & yr2=[1d-48,4d-05]
;
;  For Run B7
;
if run eq '512_1e2_1e4_4e8_1em4a' then begin
  xr=[100.,25600.]
  it= [0  ,  1, 2, 4, 10, 16]
  col=[  0,  0,  0, 55, 55, 55,122,122,155,155]
  yr1=[3d-36,2d-08] & yr2=[1d-09,4d-04]
  yr1=[3d-36,2d-08] & yr2=[1d-19,4d-5]
endif
;
;  For Run B7
;
if run eq '1024_1e1_1e4_4e8_1em4a' then begin
  xr=[10.,5120.]
  it= [0  ,  1, 2, 4, 10, 16, 50,275,934]
  col=[  0,  0,  0, 55, 55, 55,122,122,155,155]
  yr1=[3d-36,2d-08] & yr2=[1d-14,4d-10]
endif
;
;  For Run B7 (2048^3 with k1=5)
;
if run eq '2048_1e1_1e4_4e8_1em4a' then begin
  xr=[5.,5120.]
  it= [0  ,  1,  4, 10, 20, 50,100,382]
  col=[  0,  0,  0, 55, 55, 55,122,122,155,155]
  yr1=[3d-32,2d-10] & yr2=[1d-14,8d-11]
endif
;
!p.multi=[0,2,1]
!x.title='!8k!6'
!y.title='!8E!6!dGW!n(!8k!6)/!8k!6!u3.9!n'
plot_oo,xr,yr1,/nodata
for i=0,n_elements(it)-1 do begin
  print,t[it[i]] 
  oplot,col=col[i],k[1:*],spec1[1:*,it[i]]/k[1:*]^3.9
endfor
;
!y.title='!8E!6!dGW!n(!8k!6)/!8k!6!u1.2!n'
!y.title='!8E!6!dGW!n(!8k!6) !8k!6!u1.8!n'
!y.title='!8E!6!dGW!n(!8k!6)'
plot_oo,xr,yr2,/nodata
for i=0,n_elements(it)-1 do begin
  print,t[it[i]] 
  ;oplot,col=col[i],k[1:*],grav1[1:*,it[i]]/k[1:*]^1.2
  oplot,col=col[i],k[1:*],grav1[1:*,it[i]];/k[1:*]^1.8
endfor
;
print,"$mv idl.ps ~/tex/GW/lowfreq/fig/pearly.eps"
print,"$mv idl.ps ~/tex/GW/lowfreq/fig/pearly_B7.eps"
print,"$mv idl.ps ~/tex/GW/lowfreq/fig/pearly_"+run+".eps"
END
