;$Id: rslice_stress_plot_LowFreq.pro,v 1.14 2023/01/27 13:33:16 brandenb Exp $
if !d.name eq 'PS' then begin
  device,xsize=18,ysize=10,yoffset=3
  !p.charthick=1.6 & !p.thick=1.6 & !x.thick=1.6 & !y.thick=1.6
  col0=0
endif else begin
  col0=255
end
;
;  to be run in
;  LowFreq1024sig1_k01_kf10b_rep2
;  LowFreq1024sig0_k01_kf10b2_rep2
;  but first run IDL> .r rslice_stress
;
!p.charsize=.9
;!p.charsize=2.9
!x.margin=[8.6,0.3]
!y.margin=[3.2,0.3]
;
ik=125
ik=5
;
!p.multi=[0,2,2]
;!p.multi=0
circ_sym,.3,1
xr=[5e-0,200.]
xr=[5e-1,130.]
xrl=[0e-1,99.]
col=[122,55,col0,155,122]
li =[  0, 1,   2,  3,  4]
li =[  3, 4,   0,  1,  2]
lct=[1,2,0,0,0]
dot='!s!9!A!A .!n!6!r'
tilde='!9!s!aA!n!r!6'
;
!x.title='!6'
!y.title='!9!!!6'+tilde+'!8T!6(!8k!6,!8t!6)!9!!!6'
plot_oo,tt-1.,(fff1[ik,*]^2+fff2[ik,*]^2)/(6./tt)^2,xr=xr,yr=[1e-8,1e-6],/nodata
for dik=-2,2 do begin
  if lct[dik] eq 1 then loadct,6
  if lct[dik] eq 2 then loadct,5
  oplot,tt-1.,sqrt((tt/6.)^2*(fff1[ik+dik,*]^2+fff2[ik+dik,*]^2)),col=col[dik],li=li[dik]
  print,'ik+dik,col,lct[dik]=',ik+dik,col[dik],lct[dik]
endfor
;
!y.title='!6arg['+tilde+'!8T!6(!8k!6,!8t!6)]'
plot_oi,tt-1.,atan(fff2[ik,*],fff1[ik,*]),xr=xr,yr=[-1.,1.]*!pi,/nodata
;plot,tt,atan(fff2[ik,*],fff1[ik,*]),xr=xrl,yr=[-1.,1.]*!pi,/nodata
for dik=-2,2 do begin
  if lct[dik] eq 1 then loadct,6
  if lct[dik] eq 2 then loadct,5
  oplot,tt-1.,atan(fff2[ik+dik,*],fff1[ik+dik,*]),col=col[dik],li=li[dik],ps=8
endfor
;
;-----------------------------------------------------------------------------
!x.title='!8t!6-1'
!y.title='!9!!!6'+tilde+'!8h!6(!8k!6,!8t!6)!9!!!6'
yr=[7e-8,6e-6]
plot_oo,xr,yr,xr=xr,yr=[7e-8,6e-6],/nodata
for dik=-2,2 do begin
  if lct[dik] eq 1 then loadct,6
  if lct[dik] eq 2 then loadct,5
  ;oplot,tt-1.,deriv(tt,fff3[ik+dik,*])^2+deriv(tt,fff4[ik+dik,*])^2,col=col[dik]
  oplot,tt-1.,sqrt(deriv(tt,fff3[ik+dik,*])^2+deriv(tt,fff4[ik+dik,*])^2),col=col[dik],li=li[dik]
endfor
xyouts,1.52e-1,4.2e-7,'!6.',siz=siz
;
!x.title='!8t!6'
!x.title='!8t!6-1'
!y.title='!6arg['+tilde+'!8h!6(!8k!6,!8t!6)]'
plot_oi,tt-1.,atan(deriv(tt,fff4[ik,*]),deriv(tt,fff3[ik,*])),xr=xr,yr=[-1.,1.]*!pi,/nodata
for dik=-2,2 do begin
  if lct[dik] eq 1 then loadct,6
  if lct[dik] eq 2 then loadct,5
  oplot,tt-1.,(atan(deriv(tt,fff4[ik+dik,*]),deriv(tt,fff3[ik+dik,*]))),col=col[dik],li=li[dik],ps=8
endfor
xyouts,1.80e-1,-.20,'!6.',siz=siz
;
;  inset
;
!y.title='!6'
!p.charsize=.6
;!p.position=[.64,.70,.76,.87]  ;(for nonhelical run)
!p.position=[.64,.78,.76,.95] ;(for helical run)
plot,tt,atan(fff2[ik,*],fff1[ik,*]),xr=xrl,yr=[-1.,1.]*!pi,/nodata,/noerase
for dik=-2,2 do begin
  if lct[dik] eq 1 then loadct,6
  if lct[dik] eq 2 then loadct,5
  ;oplot,tt-1.,atan(fff2[ik+dik,*],fff1[ik+dik,*]),col=col[dik],li=li[dik]
  oplot,tt-1.,atan(fff2[ik+dik,*],fff1[ik+dik,*]),col=col[dik],li=li[dik],ps=8
endfor
;
!p.multi=0
!p.position=0
;print,'$mv idl.ps ~/GitHub/Axel/GWspectra_from_CME/fig/rslice_stress_plot_LowFreq.eps'
;print,'$mv idl.ps ~/GitHub/Axel/GWspectra_from_CME/fig/rslice_stress_plot_LowFreq_nohel.eps'
print,'$mv idl.ps ~/GitHub/Ramkishor/GWspectra_from_mhd_turbulence/fig/rslice_stress_plot_LowFreq.eps'
print,'$mv idl.ps ~/GitHub/Ramkishor/GWspectra_from_mhd_turbulence/fig/rslice_stress_plot_LowFreq_nohel.eps'
<<<<<<< rslice_stress_plot_LowFreq.pro
print,'$mv idl.ps ~/GitHub/Ramkishor/GWspectra_from_mhd_turbulence/fig/rslice_stress_plot_LowFreq_nohel_y.eps'
print,'$mv idl.ps ~/GitHub/Ramkishor/GWspectra_from_mhd_turbulence/fig/rslice_stress_plot_LowFreq_nohel_z.eps'
print,'$mv idl.ps ~/GitHub/Ramkishor/GWspectra_from_mhd_turbulence/fig/rslice_stress_plot_LowFreq_y.eps'
print,'$mv idl.ps ~/GitHub/Ramkishor/GWspectra_from_mhd_turbulence/fig/rslice_stress_plot_LowFreq_z.eps'
=======
print,'$mv idl.ps ~/GitHub/Ramkishor/GWspectra_from_mhd_turbulence/fig/rslice_stress_plot_LowFreq_nohel_y.eps'
>>>>>>> 1.13
END
