from rsf.proj import *
v0 = 2
gz = 0.6
gx = 0.15
min2=0.5
max2=6.5
Flow('vel',None,
'''
math n1=101 n2=351 d1=0.02 d2=0.02 output="%g+%g*x1+%g*x2"
label1=Depth unit1=km label2=Position unit2=km label=Velocity unit=km/s
''' % (v0,gz,gx))
Plot('vel',
'''
window n2=301 f2=25 |
grey color=j scalebar=y allpos=y barreverse=y
title=Model minval=1.6 maxval=8.5 clip=8.5
labelsz=10 titlesz=12 titlefat=6 labelfat=6
screenratio=0.65 screenht=9
''')
Flow('v2','vel','math output="input^2" ')
Plot('v2',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="True w(x,z)"
labelsz=15 titlesz=16 titlefat=8 labelfat=6 allpos=y
minval=4 maxval=18 bias=4 clip=14
screenratio=0.75 screenht=9 allpos=y barlabel="v\^2\_" barunit="km\^2/s\^2"
''' % (min2,max2))
Plot('cvel','ax0',
'''
window n2=301 f2=25 |
contour nc=1 c0=3 scalebar=y plotcol=7 plotfat=8
wantaxis=n wanttitle=n screenratio=0.65 screenht=9
''')
Plot('velo','vel cvel','Overlay')
Flow('ax0','vel',
'''
math output="x2+(sqrt((%g+%g*x2)*(%g+%g*x2)+%g*x1*%g*x1)-(%g+%g*x2))/%g" |
put label=Position unit=km
''' % (v0,gx,v0,gx,gx,gx,v0,gx,gx))
Plot('ax0',
'''
window n2=301 f2=25 |
grey color=j scalebar=y allpos=y
title="Analytical x\_0\^" screenratio=0.75 screenht=9
labelsz=15 titlesz=16 titlefat=8 labelfat=6
''')
Plot('cax0','ax0',
'''
window n2=301 f2=25 |
contour nc=80 scalebar=y plotcol=7 plotfat=7
wantaxis=n wanttitle=n screenratio=0.75 screenht=9
''')
Plot('x0','ax0 cax0','Overlay')
Flow('at0','vel',
'''
math output="acosh(((%g*%g+%g*%g)*(sqrt((%g+%g*x2)*(%g+%g*x2)+%g*x1*%g*x1)+%g*x1)
-input*%g*%g)/(input*%g*%g))/sqrt(%g*%g+%g*%g)" | cut n1=1 |
put label=Time unit=s
''' % (gx,gx,gz,gz,v0,gx,v0,gx,gx,gx,gz,gz,gz,gx,gx,gz,gz,gx,gx))
Plot('at0',
'''
window n2=301 f2=25 |
grey color=j scalebar=y allpos=y min=0 max=0.85 clip=0.85
title="Analytical t\_0\^" screenratio=0.75 screenht=9
labelsz=15 titlesz=16 titlefat=8 labelfat=6
''')
Plot('cat0','at0',
'''
window n2=301 f2=25 |
contour nc=45 scalebar=y plotcol=7 plotfat=7
wantaxis=n wanttitle=n screenratio=0.75 screenht=9
''')
Plot('t0','at0 cat0','Overlay')
Flow('dix',None,
'''
math n1=251 n2=351 d1=0.004 d2=0.02 output="(%g+%g*x2)*sqrt(%g*%g+%g*%g)/
(sqrt(%g*%g+%g*%g)*(cosh(sqrt(%g*%g+%g*%g)*x1))-%g*sinh(sqrt(%g*%g+%g*%g)*x1))"
label1=Time unit1=s label2=Position unit2=km label=Velocity unit=km/s
''' % (v0,gx,gz,gz,gx,gx,gz,gz,gx,gx,gz,gz,gx,gx,gz,gz,gz,gx,gx))
Plot('dix',
'''
window n2=301 f2=25 | math output="input^2"|
grey color=j scalebar=y allpos=y
title="v\^2\_\_d\^(x\_0\^,t\_0\^)" allpos=y minval=4 maxval=18 bias=4 clip=14
labelsz=10 titlesz=12 titlefat=6 labelfat=6 barlabel="v\^2" barunit="km^2/s\^2"
screenratio=0.65 screenht=9
''')
Plot('cdix','dix',
'''
window n2=301 f2=25 |
math output=1 | rays2 a0=180 nr=1 dt=0.01 nt=557 yshot=3 |
graph transp=y yreverse=y scalebar=y plotcol=7 plotfat=8
wantaxis=n wanttitle=n min1=0 max1=2 min2=0.5 max2=6.5
screenratio=0.75 screenht=9
''')
Plot('odix','dix cdix','Overlay')
Result('analy','x0 t0','OverUnderAniso')
Result('vgrad','velo odix','OverUnderAniso')
Flow('dixdepth','dix',
'''
time2depth velocity=$SOURCE intime=y twoway=n nz=101 dz=0.02 |
put label1=Depth unit1=km
''')
Plot('dixdepth',
'''
window n2=301 f2=25 |
grey color=j scalebar=y allpos=y barreverse=y
title="Dix Velocity Converted to Depth" minval=4 maxval=18 bias=4 clip=14
labelsz=10 titlesz=12 titlefat=6 labelfat=6
screenratio=0.65 screenht=9
''')
Result('model-grad','v2 x0 t0','OverUnderAniso')
Flow('vz','dixdepth','window n2=1 f2=175| spray axis=2 n=351 o=0 d=0.02')
Flow('ax0z','vel',
'''
math output="x2" |
put label=Position unit=km
''')
Flow('at0z','vel',
'''
math output="(1/%g)*log(x1*%g/(%g+%g*3.5) + 1)" |
put label=Time unit=s
''' % (gz,gz,v0,gx) )
Flow('dv2dt0','dix','math output="input^2" | smoothder')
Flow('dv2dx0','dix','math output="input^2" | transp | smoothder | transp')
Flow('beta','dv2dt0 dix',
'''
time2depth velocity=${SOURCES[1]} intime=y twoway=n nz=101 dz=0.02 |
put label1=Depth unit1=km
''')
Flow('alpha','dv2dx0 dix',
'''
time2depth velocity=${SOURCES[1]} intime=y twoway=n nz=101 dz=0.02 |
put label1=Depth unit1=km
''')
Plot('alpha',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="dw\_d\^/dx\_0" pclip=100
labelsz=15 titlesz=16 titlefat=8 labelfat=6 minval=0.6 maxval=1.7 clip=1.1 bias=0.6
screenratio=0.75 screenht=9 allpos=y barlabel="dw\_d\^/dx\_0\^" barunit="km/s\^2"
''' % (min2,max2))
Plot('beta',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="dw\_d\^/dt\_0" pclip=100
labelsz=15 titlesz=16 titlefat=8 labelfat=6 minval=4.8 maxval=20 clip=15.2 bias=4.8
screenratio=0.75 screenht=9 allpos=y barlabel="dw\_d\^/dt\_0\^" barunit="km\^2/s\^3"
''' % (min2,max2))
Flow('refdix','dixdepth','math output="input^2" ')
Flow('refvz','vz','math output="input^2" ')
Plot('refdix',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Ref w\_dr\^(x,z)"
labelsz=15 titlesz=16 titlefat=8 labelfat=6 allpos=y
minval=4 maxval=18 bias=4 clip=14
screenratio=0.75 screenht=9 allpos=y barlabel="v\^2\_" barunit="km\^2/s\^2"
''' % (min2,max2))
Plot('refvz',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Ref w\_r\^(z)"
labelsz=15 titlesz=16 titlefat=8 labelfat=6 allpos=y
minval=4 maxval=18 bias=4 clip=14
screenratio=0.75 screenht=9 allpos=y barlabel="v\^2" barunit="km\^2/s\^2"
''' % (min2,max2))
Result('input-grad','refdix alpha beta','OverUnderAniso')
for i in ['refdix','refvz','alpha','beta']:
Flow(i+'_remap',i,'window')
Flow('depth dx0 dt0 dv','refdix_remap refvz_remap alpha_remap beta_remap',
'''
time2depthweak zsubsample=10 nsmooth=30
velocity=$SOURCE refvelocity=${SOURCES[1]} dvdx0=${SOURCES[2]} dvdt0=${SOURCES[3]}
outdx0=${TARGETS[1]} outdt0=${TARGETS[2]} outdv=${TARGETS[3]}
''')
Flow('dt0true','at0 at0z','math est=${SOURCES[1]} output="input-est" ')
Plot('dt0true',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Analytical \F10 D\F3 t\_0"
labelsz=15 titlesz=16 titlefat=8 labelfat=6 minval=-0.1 maxval=0.1 clip=0.2
screenratio=0.75 screenht=9 barlabel="Time (s)" barunit=
''' % (min2,max2))
Plot('dt0',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Estimated \F10 D\F3 t\_0"
labelsz=15 titlesz=16 titlefat=8 labelfat=6 minval=-0.1 maxval=0.1 clip=0.2
screenratio=0.75 screenht=9 barlabel="Time (s)" barunit=
''' % (min2,max2))
Result('dt0compare','dt0true dt0','OverUnderAniso')
Flow('dt0err','dt0true dt0','math est=${SOURCES[1]} output="input-est"')
Plot('dt0err',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Error from estimated \F10 D\F3 t\_0"
labelsz=15 titlesz=16 titlefat=8 labelfat=6
minval=-0.1 maxval=0.1 clip=0.2
screenratio=0.75 screenht=9 barlabel="Time (s)" barunit=
''' % (min2,max2))
Flow('dx0true','ax0 ax0z','math est=${SOURCES[1]} output="input-est" ')
Plot('dx0true ',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Analytical \F10 D\F3 x\_0"
labelsz=15 titlesz=16 titlefat=8 labelfat=6 minval=0 maxval=0.1 clip=0.1 allpos=y
screenratio=0.75 screenht=9 barlabel="Position (km)" barunit=
''' % (min2,max2))
Plot('dx0',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Estimated \F10 D\F3 x\_0"
labelsz=15 titlesz=16 titlefat=8 labelfat=6 minval=0 maxval=0.1 clip=0.1 allpos=y
screenratio=0.75 screenht=9 barlabel="Position (km)" barunit=
''' % (min2,max2))
Result('dx0compare','dx0true dx0','OverUnderAniso')
Flow('dx0err','dx0true dx0','math est=${SOURCES[1]} output="input-est"')
Plot('dx0err',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Error from estimated \F10 D\F3 x\_0"
labelsz=15 titlesz=16 titlefat=8 labelfat=6 allpos=y minval=0 maxval=0.1 clip=0.1
screenratio=0.75 screenht=9 barlabel="Position (km)" barunit=
''' % (min2,max2))
Flow('dv2true','vel refvz','math est=${SOURCES[1]} output="input^2-est" ')
Plot('dv2true ',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Analytical \F10 D\F3 w"
labelsz=15 titlesz=16 titlefat=8 labelfat=6
minval=-3.5 maxval=3.5 clip=7 bias=-3.5 allpos=y
screenratio=0.75 screenht=9 barlabel="v\^2" barunit="km\^2\_/s\^2"
''' % (min2,max2))
Plot('dv',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Estimated \F10 D\F3 w "
labelsz=15 titlesz=16 titlefat=8 labelfat=6
minval=-3.5 maxval=3.5 clip=7 bias=-3.5 allpos=y
screenratio=0.75 screenht=9 barlabel="v\^2" barunit="km\^2\_/s\^2"
''' % (min2,max2))
Result('dv2compare','dv2true dv','OverUnderAniso')
Flow('dv2err','dv2true dv','math est=${SOURCES[1]} output="(input-est)"')
Plot('dv2err',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Error from estimated \F10 D\F3 w"
labelsz=15 titlesz=16 titlefat=8 labelfat=6 allpos=y
minval=-3.5 maxval=3.5 clip=7 bias=-3.5 allpos=y
screenratio=0.75 screenht=9 barlabel="v\^2" barunit="km\^2\_/s\^2"
''' % (min2,max2))
Result('truecompare','dt0true dx0true dv2true','OverUnderAniso')
Result('estcompare-grad','dt0 dx0 dv','OverUnderAniso')
Result('errcompare-grad','dt0err dx0err dv2err','OverUnderAniso')
Flow('errvdix','vel dixdepth','math est=${SOURCES[1]} output="sqrt(abs(input^2-est^2))" ')
Flow('errvest','vel refvz dv','math b=${SOURCES[1]} c=${SOURCES[2]} output="sqrt(abs(input^2-(b+c)))" ')
Plot('errvdix',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Velocity error from conventional Dix inversion"
labelsz=15 titlesz=16 titlefat=8 labelfat=6 allpos=y minval=0 maxval=1 clip=1 bias=0
screenratio=0.75 screenht=9 barlabel="v" barunit="km/s"
''' % (min2,max2))
Plot('errvest',
'''
window min2=%g max2=%g |
grey color=j scalebar=y title="Velocity error from the proposed method"
labelsz=15 titlesz=16 titlefat=8 labelfat=6 allpos=y minval=0 maxval=1 clip=1
screenratio=0.75 screenht=9 barlabel="v" barunit="km/s"
''' % (min2,max2))
Result('errvcompare','errvdix errvest','OverUnderAniso')
End() |