geonote吧 关注:4贴子:9
  • 3回复贴,共1

用Madagascar 进行基于克希霍夫的正演和偏移

只看楼主收藏回复

from rsf.proj import *
nz = 200
nx = 600
dz = 10
dx = 10
nt = 1000
dt = 0.004
s0 = 0
ds = dx*3;
ns = 190;
nh = 1200
dh = dx
h0 = -nh/2*dh
freq = 25
#vel for travel time calculation
Flow('vel',None,'math n1=200 o1=0 d1=10 n2=600 d2=10 o2=0 d3=10 o3=0 n3=1 output=2000');
Result('vel','vel','grey color=j scalebar=y')
#source
Flow('ys',None,'math n1=%d o1=0 d1=%g output=x1' % (ns,ds))
Flow('zs','ys','math output=0.0001')
Flow('xs','ys','math output=0')
Flow('sht','zs ys xs','cat axis=2 ${SOURCES[1]} ${SOURCES[2]} | transp')
#receiver
Flow('yr',None,'math n1=%d o1=0 d1=%g output=x1' % (600,dx))
Flow('zr','yr','math output=0.0001')
Flow('xr','yr','math output=0')
Flow('rcv','zr yr xr','cat axis=2 ${SOURCES[1]} ${SOURCES[2]} | transp')
#travle time
# traveltime
Flow('time0s tdl0s tds0s','vel sht',
'''
eikods shotfile=${SOURCES[1]} tdl1=${TARGETS[1]} tds1=${TARGETS[2]} b1=2 b2=2 |
put n3=%d o3=0 d3=%f d4=10 o4=0 n4=1
''' % (ns,ds))
Flow('time0r tdl0r tds0r','vel rcv',
'''
eikods shotfile=${SOURCES[1]} tdl1=${TARGETS[1]} tds1=${TARGETS[2]} b1=2 b2=2 |
put n3=%d o3=0 d3=%f d4=10 o4=0 n4=1
''' % (600,dx))
def velplot(title,label1='Depth',unit1='m'):
return '''
grey color=j allpos=y title="%s" scalebar=y
barlabel=Velocity barunit=m/s
label1="%s" unit1="%s" label2=Lateral unit2=m
barreverse=y pclip=100
''' % (title,label1,unit1)
def graph(transp,o2,d2,n2,col,fat,extra=''):
return '''
graph transp=%d yreverse=y pad=n min2=%g max2=%g
plotcol=%d plotfat=%d wantaxis=n wanttitle=n %s
''' % (transp,o2,o2+(n2-1)*d2,col,fat,extra)
def wiggle(title):
return '''
wiggle transp=y yreverse=y poly=y xpos=${SOURCES[1]}
title="%s" label2=Half-Offset unit2=kft zplot=0.5
wherexlabel=t wheretitle=b
'''% title
#reflectivity
#it is nx by nref matrix
#nref number of reflector
in_data='ref_200_600.bin'
Flow('refl',None,'echo in=%s data_format=float n1=%d n2=%d o1=0 d1=%f o2=0 d2=%f label1=depth label2=distance'%(in_data,600,200,dz,dx))
Result('refl','refl',velplot('reflectivity'))
#reflector model
#it is nx by nref matrix
in_data2='modl_200_600.bin'
Flow('modl',None,'echo in=%s data_format=float n1=%d n2=%d o1=0 d1=%f o2=0 d2=%f label1=depth label2=distance'%(in_data2,600,200,dz,dx))
Result('modl','modl','grey scalebar=y color=j pclip=100')
# const background velocity Kirchoff modeling with refl and model
Flow('shots','modl refl',
'''
kirmod nt=%d dt=%f freq=%f refl=${SOURCES[1]}
ns=%d s0=%f ds=%f
nh=%d h0=%f dh=%f
vel=2000 type=c verb=y
''' %(nt,dt,freq,ns,s0,ds,nh,h0,dh))
Result('shots','shots','grey')
# migration
Flow('dmig0','shots time0s tds0s time0r tds0r',
'''
kirmigsr aperture=45 cmp=n cig=y
stable=${SOURCES[1]} sderiv=${SOURCES[2]}
rtable=${SOURCES[3]} rderiv=${SOURCES[4]}
''')
Result('dmig0','dmig0','grey')
End()


IP属地:美国1楼2016-07-03 22:12回复
    你好楼主,想问一下你的这个程序是什么语言的?


    2楼2018-01-08 19:02
    回复
      2026-09-17 16:58:24
      广告
      不感兴趣
      开通SVIP免广告
      樓主会安装Madagascar 吗?


      来自iPhone客户端3楼2020-04-24 19:08
      回复
        楼主这个程序是做偏移的嘛


        IP属地:北京来自iPhone客户端4楼2022-12-03 17:02
        回复