;$Id: pko.pro,v 1.4 2021/06/16 21:09:06 brandenb Exp $
if !d.name eq 'PS' then begin
  device,xsize=18,ysize=12,yoffset=3
  !p.charthick=3 & !p.thick=3 & !x.thick=3 & !y.thick=3
end
;
cwd,run
print,' $mv idl.ps ~/tex/tina/rospec/fig/pko_'+run+'.ps'
;
!p.charsize=1.7
!x.margin=[7.8,.8]
!y.margin=[3.2,.5]
;
@parameters
!p.multi=[0,1,2]
!x.title='!8k!6'
!y.title='!7x!6'
restore,'ko.sav'
;
contour,alog(abs(ko_last>ko_min)),k,om_last,/fill,nlev=40
oplot,k,k,col=255
oplot,k,k/sqrt(3.),col=199,li=4
;
print,'domk=20 !(in parameters.pro), so that om_last[domk] ~ k[1]'
nk=n_elements(k)
iom=domk*indgen(nk)
ko_diag=fltarr(nk)
nom_last_max=n_elements(om_last)-1
help,k,om_last,iom
for ik=0,nk-1 do begin
  ;print,k[ik],om_last[iom[ik]<(nom_last_max-1)]
  ko_diag[ik]=ko_last[ik,iom[ik]<(nom_last_max-1)]
endfor
;
fit_ko=5e-2 & exp_ko=3
fit_ko=1e-1 & exp_ko=2
yr_ko=[1e-12,1e-5]
!y.title='!8P!6(!8k,!7x!6)'
plot_oo,k[1:*],abs(ko_diag[1:*]),yr=yr_ko
xx=[200.,12200.] & oplot,xx,fit_ko/xx^exp_ko,li=3
;print,fit_ko,exp_ko,fit_ko/xx^exp_ko
END
