def simulateddata(sdat, rdat, slo, sd, ss, par): # single reflector par['kxref'] = 50 par['lxref'] = par['nximg'] - par['kxref'] par['kzref'] = par['nzimg'] - par['nzpad'] / par['jzimg'] - 10 Flow( 'ref', None, ''' spike nsp=1 mag=1 n1=%(nximg)d d1=%(dximg)g o1=%(oximg)g k1=%(kxref)d l1=%(lxref)d n2=%(nzimg)d d2=%(dzimg)g o2=%(ozimg)g k2=%(kzref)d | smooth rect1=25 repeat=3 | spray axis=2 n=1 o=0 d=1 | put label1=x label2=y label3=z ''' % par) Plot('ref', 'window | transp | smooth rect1=3 |' + fdmod.cgrey('pclip=100', par)) Result('ref', ['ref', ss], 'Overlay') # source wavelet par['frq'] = 5 par['kt'] = 50 Flow( 'wvl', None, ''' spike nsp=1 mag=1 n1=%(nt)d d1=%(dt)g o1=0 k1=%(kt)d | ricker1 frequency=%(frq)g | scale axis=123 | fft1 | window squeeze=n n1=%(nw)d min1=%(ow)g ''' % par) # source data on the surface for iexp in range(par['ns']): etag = "-e%03d" % iexp xsou = par['os'] + (par['fs'] + iexp * par['js']) * par['ds'] isou = (xsou - par['oximg']) / par['dximg'] Flow( 'spk' + etag, 'wvl', ''' pad beg2=%d n2out=%d | put label1=w label2=x label3=y o2=%g d2=%g | transp memsize=250 plane=12 | transp memsize=250 plane=23 ''' % ( isou, par['nximg'], par['oximg'], par['dximg'], )) Flow('spk', map(lambda x: 'spk-e%03d' % x, range(par['ns'])), 'cat space=n axis=4 ${SOURCES[1:%d]}' % par['ns']) # datumed source data zomig.Cdtone3(sdat, 'spk', sd, par) Result(sdat, fdmod.fgrey('', par)) # datumed receiver data spmig.modelPW3(rdat, slo, sdat, 'ref', par) Result(rdat, fdmod.fgrey('', par))
def simulateddata(sdat,rdat,slo,sd,ss,par): # single reflector par['kxref']=50 par['lxref']=par['nximg']-par['kxref'] par['kzref']=par['nzimg']-par['nzpad']/par['jzimg']-10 Flow('ref',None, ''' spike nsp=1 mag=1 n1=%(nximg)d d1=%(dximg)g o1=%(oximg)g k1=%(kxref)d l1=%(lxref)d n2=%(nzimg)d d2=%(dzimg)g o2=%(ozimg)g k2=%(kzref)d | smooth rect1=25 repeat=3 | spray axis=2 n=1 o=0 d=1 | put label1=x label2=y label3=z ''' % par ) Plot('ref','window | transp | smooth rect1=3 |' + fdmod.cgrey('pclip=100',par)) Result('ref',['ref',ss],'Overlay') # source wavelet par['frq']=5 par['kt']=50 Flow('wvl',None, ''' spike nsp=1 mag=1 n1=%(nt)d d1=%(dt)g o1=0 k1=%(kt)d | ricker1 frequency=%(frq)g | scale axis=123 | fft1 | window squeeze=n n1=%(nw)d min1=%(ow)g ''' % par) # source data on the surface for iexp in range(par['ns']): etag = "-e%03d" % iexp xsou = par['os'] + (par['fs'] + iexp * par['js']) * par['ds'] isou = (xsou-par['oximg'])/par['dximg'] Flow('spk'+etag,'wvl', ''' pad beg2=%d n2out=%d | put label1=w label2=x label3=y o2=%g d2=%g | transp memsize=250 plane=12 | transp memsize=250 plane=23 ''' % (isou, par['nximg'], par['oximg'], par['dximg'],) ) Flow('spk', map(lambda x: 'spk-e%03d' % x,range(par['ns'])), 'cat space=n axis=4 ${SOURCES[1:%d]}'%par['ns']) # datumed source data zomig.Cdtone3(sdat,'spk',sd,par) Result(sdat,fdmod.fgrey('',par)) # datumed receiver data spmig.modelPW3(rdat,slo,sdat,'ref',par) Result(rdat,fdmod.fgrey('',par))
def test(par): # ------------------------------------------------------------ # source coordinate fdmod.point('ss',par['xsou'],par['zsou'],par) Plot('ss',fdmod.ssplot('',par)) Result('vel',['vel','ss'],'Overlay') Result('ref',['ref','ss'],'Overlay') Result('img',['img','ss'],'Overlay') # slowness Flow('slo','vel', ''' transp | math "output=1/input" | spray axis=2 n=1 | put label2=y ''' % par ) Result('slo','window | transp |' + fdmod.cgrey('allpos=y bias=0.065',par)) # migration wavelet Flow('wvl',None, ''' spike nsp=1 mag=1 n1=%(nt)d d1=%(dt)g o1=0 k1=1 n2=1 d2=%(dx)g o2=%(xsou)g | scale axis=123 | put label1=t label2=x label3=y ''' % par) # modeling wavelet (time domain) Flow('wav',None, ''' spike nsp=1 mag=1 n1=%(nt)d d1=%(dt)g o1=0 k1=%(kt)d n2=1 d2=%(dx)g o2=%(xsou)g | ricker1 frequency=%(frq)g | scale axis=123 | put label1=t label2=x label3=y ''' % par) Result('wav','window n1=200 |' + fdmod.waveplot('',par)) # modeling wavelet (frequency domain) Flow('sou','wav', ''' fft1 | window squeeze=n n1=%(nw)d min1=%(ow)g | pad beg2=%(xpad)d n2out=%(nx)d | put label1=w label2=x label3=y | transp memsize=250 plane=12 | transp memsize=250 plane=23 ''' % par) # global slowness perturnation Flow('ds',None, ''' spike nsp=1 mag=0.00005 n1=%(nz)d d1=%(dz)g o1=%(oz)g n2=%(nx)d d2=%(dx)g o2=%(ox)g | put label1=z label2=x label3=y | smooth rect1=1 rect2=1 | transp plane=12 | transp plane=23 | rtoc ''' % par) Plot('ds','window | real | transp |'+ fdmod.cgrey('pclip=99.9',par)) # ------------------------------------------------------------ # zero-offset # ------------------------------------------------------------ # data zomig.model3('Zmod','slo','img',par) Flow('Zdat','Zmod', ''' transp plane=23 | transp plane=12 | pad beg1=%(begw)d n1out=%(padw)d | fft1 inv=y | put o1=0 label1=t label2=x ''' % par) Result('Zdat',fdmod.dgrey('screenratio=0.5 screenht=7',par)) # wavefield zomig.Awftwo3('woz','Zmod','slo',par) # migration zomig.image3('Zimg','slo','Zmod',par) Plot( 'Zimg','window | transp |' + fdmod.cgrey('',par)) Result('Zimg','Zimg','Overlay') # WEMVA zero-offset zomig.s2i( 'ds' ,'ZFds','woz','slo',par) # forward F(ds) zomig.i2s('ZFds','ZAFds','woz','slo',par) # adjoint A(F(ds)) Result( 'ZFds','window | real | transp |'+ fdmod.cgrey('',par)) Result('ZAFds','window | real | transp |'+ fdmod.cgrey('pclip=98',par)) # ------------------------------------------------------------ # shot-record # ------------------------------------------------------------ # data spmig.modelPW3('Smod','slo','sou','ref',par) Flow('Sdat','Smod', ''' transp plane=23 | transp plane=12 | pad beg1=%(begw)d n1out=%(padw)d | fft1 inv=y | window f1=%(kt)d | pad n1out=%(nt)d | put o1=0 o2=%(xoff)g o3=%(xsou)g ''' % par) Result('Sdat', fdmod.dgrey('min2=%g max2=%g label2="Offset" screenratio=0.5 screenht=7' %(par['xoff'],-par['xoff']),par)) # wavefields spmig.wflds ('dos','dor','wvl','Sdat',par) zomig.Cwfone3('wos','dos','slo',par) # source zomig.Awfone3('wor','dor','slo',par) # receiver # migration spmig.imagePW3('Simg','cig','slo','dos','dor',par) Plot( 'Simg','window | transp |'+ fdmod.cgrey('',par)) Result('Simg','Simg ss','Overlay') # WEMVA shot-record spmig.s2i( 'ds', 'SFds','wos','wor','slo',par) # forward F(ds) spmig.i2s('SFds','SAFds','wos','wor','slo',par) # adjoint A(F(ds)) Result( 'SFds','window | real | transp |'+ fdmod.cgrey('',par)) Result('SAFds','window | real | transp |'+ fdmod.cgrey('pclip=98',par)) # ------------------------------------------------------------ for ispk in range(par['nspk']): i = par['ospk'] + ispk tag = str(i) par['xx']=par['nx']/2+i*par['jspk'] par['xs']=par['xx'] # x start par['xe']=par['xx'] # x end par['zs']=par['nz']/2 # z start par['ze']=par['nz']/2 # z end # slowness perturbation Flow('ds'+tag,None, ''' spike nsp=1 mag=1 n1=%(nz)d d1=%(dz)g o1=%(oz)g k1=%(zs)d l1=%(ze)d n2=%(nx)d d2=%(dx)g o2=%(ox)g k2=%(xs)d l2=%(xe)d | put label1=z label2=x label3=y | smooth rect1=6 rect2=2 repeat=3 | scale axis=123 | scale rscale=0.00005 | transp plane=12 | transp plane=23 | rtoc ''' % par) Result('ds'+tag,'window | real | transp |'+ fdmod.cgrey('',par)) # image perturbation Flow('di'+tag,'ZFds msk', ''' window squeeze=n n1=1 f1=%(xx)d | pad beg1=%(xx)d n1out=%(nx)d | put o1=%(ox)g | math m=${SOURCES[1]} output="input*m" ''' %par) Result('di'+tag,'window | real | transp | smooth rect2=3 repeat=3 |'+ fdmod.cgrey('',par)) # WEMVA zero-offset zomig.s2i( 'ds'+tag, 'ZFds'+tag,'woz','slo',par) # forward F(ds) zomig.i2s('ZFds'+tag,'ZAFds'+tag,'woz','slo',par) # adjoint A(F(ds)) zomig.i2s( 'di'+tag, 'ZAdi'+tag,'woz','slo',par) # adjoint A(di) zomig.s2i('ZAdi'+tag,'ZFAdi'+tag,'woz','slo',par) # forward F(A(di)) Result( 'ZFds'+tag,'window | real | transp |'+ fdmod.cgrey('',par)) Result( 'ZAFds'+tag,'window | real | transp |'+ fdmod.cgrey('pclip=99.9',par)) Result( 'ZAdi'+tag,'window | real | transp |'+ fdmod.cgrey('pclip=99.9',par)) Result( 'ZFAdi'+tag,'window | real | transp |'+ fdmod.cgrey('',par)) # WEMVA shot-record spmig.s2i( 'ds'+tag, 'SFds'+tag,'wos','wor','slo',par) # forward F(ds) spmig.i2s('SFds'+tag,'SAFds'+tag,'wos','wor','slo',par) # adjoint A(F(ds)) spmig.i2s( 'di'+tag, 'SAdi'+tag,'wos','wor','slo',par) # adjoint A(di) spmig.s2i('SAdi'+tag,'SFAdi'+tag,'wos','wor','slo',par) # forward F(A(di)) Result( 'SFds'+tag,'window | real | transp |'+ fdmod.cgrey('',par)) Result( 'SAFds'+tag,'window | real | transp |'+ fdmod.cgrey('pclip=99.9',par)) Result( 'SAdi'+tag,'window | real | transp |'+ fdmod.cgrey('pclip=99.9',par)) Result( 'SFAdi'+tag,'window | real | transp |'+ fdmod.cgrey('',par))
def run(par): # ------------------------------------------------------------ fdmod.point('ss1',par['xsou1'],par['oz'],par) fdmod.point('ss2',par['xsou2'],par['oz'],par) Plot('ss1','window |' + fdmod.ssplot('plotcol=5',par)) Plot('ss2','window |' + fdmod.ssplot('plotcol=5',par)) # ------------------------------------------------------------ # velocity Plot( 'vel',fdmod.cgrey('bias=4.8 allpos=y pclip=99 color=j',par)) Result('vel','vel ss1 ss2','Overlay') # slowness Flow('slo','vel', ''' math output=1/input | transp | transp plane=23 | put o2=0 d2=1 label2=y ''') Result('slo','window | transp |' + fdmod.cgrey('allpos=y pclip=95 bias=0.125',par)) # reflectivity Flow('ref','del', ''' transp | transp plane=23 | put o2=0 d2=1 label2=y ''') Result('ref','window | transp |' + fdmod.cgrey('pclip=99',par)) # ------------------------------------------------------------ # wavelet fdmod.wavelet('wav',8,par) Result('wav','window n1=500 |' + fdmod.waveplot('',par)) # ------------------------------------------------------------ for i in ('1','2'): Flow('spk'+i,'wav', ''' pad beg2=%d n2out=%d | put o2=%g d2=%g ''' % ( (par['xsou'+i]-par['ox'])/par['dx'],par['nx'],par['ox'],par['dx']) ) Result('spk'+i,fdmod.dgrey('pclip=100',par)) # ------------------------------------------------------------ for i in ('1','2'): # source wavefield (from time to frequency) zomig.wflds('dds'+i,'spk'+i,par) # wavefield extrapolation MODELING spmig.modelPW3('ddr'+i,'slo','dds'+i,'ref',par) # ------------------------------------------------------------ # shots 1 and 2 Flow('dds0','dds1 dds2','add ${SOURCES[1]}') Flow('ddr0','ddr1 ddr2','add ${SOURCES[1]}') # both shots for i in ('1','2','0'): Result('dds'+i,'window | real | smooth rect1=5 | sfgrey pclip=100') Result('ddr'+i,'window | real | smooth rect1=5 | sfgrey pclip=100') # ------------------------------------------------------------ # available dds[0,1,2], ddr[0,1,2], slo # ------------------------------------------------------------ for i in ('1','2','0'): # recorded data (from frequency to time) Flow('ttr'+i,'ddr'+i, ''' window | transp | pad beg1=%(fw)d n1out=%(kw)d | fft1 inv=y opt=n ''' % par) Result('ttr'+i,fdmod.dgrey('pclip=100 min1=1 max1=6 screenratio=0.5 screenht=7',par)) # wavefield extrapolation MIGRATION spmig.imagePW3('ii'+i,'cc'+i,'slo','dds'+i,'ddr'+i,par) Plot( 'ii'+i,'window min1=%(lox)d max1=%(hix)d | transp |' %par + fdmod.cgrey('pclip=99',par)) Result('ii'+i,['ii'+i,'ss1','ss2'],'Overlay') Flow('ii','ii1 ii2','add ${SOURCES[1]}') Plot('ii','window min1=%(lox)d max1=%(hix)d | transp |' %par + fdmod.cgrey('pclip=100',par)) Result('ii',['ii','ss1','ss2'],'Overlay') # ------------------------------------------------------------ # datuming zomig.Cwfone3('wfs','dds0','slo',par) # source wavefield for one shot zomig.Awfone3('wfr','ddr0','slo',par) # receiver wavefield for two shots # ------------------------------------------------------------ # data in the time domain for k in ('s','r'): Flow('q'+k,'wf'+k, ''' window min1=%(lox)d max1=%(hix)d j1=2 j3=2 | transp plane=23 memsize=500 | transp plane=12 memsize=500 | pad beg1=%(fw)d n1out=%(kw)d | fft1 inv=y opt=n | window max1=%(tcut)g ''' % par) Plot('q'+k,'window j3=10 |' + fdmod.dgrey('gainpanel=a pclip=99',par),view=1) Flow( 'qi','qs qr','add mode=p ${SOURCES[1]}') Plot('qi','window j3=10 |' + fdmod.dgrey('gainpanel=a pclip=100',par),view=1) # SIC Flow('kk',['qs','qr'], ''' sic3d ur=${SOURCES[1]} nbuf=500 verb=y stack=n oanga=%(oanga)g nanga=%(nanga)d danga=%(danga)g oangb=%(oangb)g nangb=%(nangb)d dangb=%(dangb)g nl=%(nl)d dl=%(dl)g sig=%(sig)g ''' % par) Plot('kk','transp plane=23 | stack | transp |' + fdmod.cgrey('pclip=100',par)) Result('kk',['kk','ss1','ss2'],'Overlay')
def run(par): # ------------------------------------------------------------ fdmod.point('ss1', par['xsou1'], par['oz'], par) fdmod.point('ss2', par['xsou2'], par['oz'], par) Plot('ss1', 'window |' + fdmod.ssplot('plotcol=5', par)) Plot('ss2', 'window |' + fdmod.ssplot('plotcol=5', par)) # ------------------------------------------------------------ # velocity Plot('vel', fdmod.cgrey('bias=4.8 allpos=y pclip=99 color=j', par)) Result('vel', 'vel ss1 ss2', 'Overlay') # slowness Flow( 'slo', 'vel', ''' math output=1/input | transp | transp plane=23 | put o2=0 d2=1 label2=y ''') Result( 'slo', 'window | transp |' + fdmod.cgrey('allpos=y pclip=95 bias=0.125', par)) # reflectivity Flow( 'ref', 'del', ''' transp | transp plane=23 | put o2=0 d2=1 label2=y ''') Result('ref', 'window | transp |' + fdmod.cgrey('pclip=99', par)) # ------------------------------------------------------------ # wavelet fdmod.wavelet('wav', 8, par) Result('wav', 'window n1=500 |' + fdmod.waveplot('', par)) # ------------------------------------------------------------ for i in ('1', '2'): Flow( 'spk' + i, 'wav', ''' pad beg2=%d n2out=%d | put o2=%g d2=%g ''' % ((par['xsou' + i] - par['ox']) / par['dx'], par['nx'], par['ox'], par['dx'])) Result('spk' + i, fdmod.dgrey('pclip=100', par)) # ------------------------------------------------------------ for i in ('1', '2'): # source wavefield (from time to frequency) zomig.wflds('dds' + i, 'spk' + i, par) # wavefield extrapolation MODELING spmig.modelPW3('ddr' + i, 'slo', 'dds' + i, 'ref', par) # ------------------------------------------------------------ # shots 1 and 2 Flow('dds0', 'dds1 dds2', 'add ${SOURCES[1]}') Flow('ddr0', 'ddr1 ddr2', 'add ${SOURCES[1]}') # both shots for i in ('1', '2', '0'): Result('dds' + i, 'window | real | smooth rect1=5 | sfgrey pclip=100') Result('ddr' + i, 'window | real | smooth rect1=5 | sfgrey pclip=100') # ------------------------------------------------------------ # available dds[0,1,2], ddr[0,1,2], slo # ------------------------------------------------------------ for i in ('1', '2', '0'): # recorded data (from frequency to time) Flow( 'ttr' + i, 'ddr' + i, ''' window | transp | pad beg1=%(fw)d n1out=%(kw)d | fft1 inv=y opt=n ''' % par) Result( 'ttr' + i, fdmod.dgrey('pclip=100 min1=1 max1=6 screenratio=0.5 screenht=7', par)) # wavefield extrapolation MIGRATION spmig.imagePW3('ii' + i, 'cc' + i, 'slo', 'dds' + i, 'ddr' + i, par) Plot( 'ii' + i, 'window min1=%(lox)d max1=%(hix)d | transp |' % par + fdmod.cgrey('pclip=99', par)) Result('ii' + i, ['ii' + i, 'ss1', 'ss2'], 'Overlay') Flow('ii', 'ii1 ii2', 'add ${SOURCES[1]}') Plot( 'ii', 'window min1=%(lox)d max1=%(hix)d | transp |' % par + fdmod.cgrey('pclip=100', par)) Result('ii', ['ii', 'ss1', 'ss2'], 'Overlay') # ------------------------------------------------------------ # datuming zomig.Cwfone3('wfs', 'dds0', 'slo', par) # source wavefield for one shot zomig.Awfone3('wfr', 'ddr0', 'slo', par) # receiver wavefield for two shots # ------------------------------------------------------------ # data in the time domain for k in ('s', 'r'): Flow( 'q' + k, 'wf' + k, ''' window min1=%(lox)d max1=%(hix)d j1=2 j3=2 | transp plane=23 memsize=500 | transp plane=12 memsize=500 | pad beg1=%(fw)d n1out=%(kw)d | fft1 inv=y opt=n | window max1=%(tcut)g ''' % par) Plot('q' + k, 'window j3=10 |' + fdmod.dgrey('gainpanel=a pclip=99', par), view=1) Flow('qi', 'qs qr', 'add mode=p ${SOURCES[1]}') Plot('qi', 'window j3=10 |' + fdmod.dgrey('gainpanel=a pclip=100', par), view=1) # SIC Flow( 'kk', ['qs', 'qr'], ''' sic3d ur=${SOURCES[1]} nbuf=500 verb=y stack=n oanga=%(oanga)g nanga=%(nanga)d danga=%(danga)g oangb=%(oangb)g nangb=%(nangb)d dangb=%(dangb)g nl=%(nl)d dl=%(dl)g sig=%(sig)g ''' % par) Plot('kk', 'transp plane=23 | stack | transp |' + fdmod.cgrey('pclip=100', par)) Result('kk', ['kk', 'ss1', 'ss2'], 'Overlay')
def test(par): # ------------------------------------------------------------ # source coordinate fdmod.point('ss', par['xsou'], par['zsou'], par) Plot('ss', fdmod.ssplot('', par)) Result('vel', ['vel', 'ss'], 'Overlay') Result('ref', ['ref', 'ss'], 'Overlay') Result('img', ['img', 'ss'], 'Overlay') # slowness Flow( 'slo', 'vel', ''' transp | math "output=1/input" | spray axis=2 n=1 | put label2=y ''' % par) Result('slo', 'window | transp |' + fdmod.cgrey('allpos=y bias=0.065', par)) # migration wavelet Flow( 'wvl', None, ''' spike nsp=1 mag=1 n1=%(nt)d d1=%(dt)g o1=0 k1=1 n2=1 d2=%(dx)g o2=%(xsou)g | scale axis=123 | put label1=t label2=x label3=y ''' % par) # modeling wavelet (time domain) Flow( 'wav', None, ''' spike nsp=1 mag=1 n1=%(nt)d d1=%(dt)g o1=0 k1=%(kt)d n2=1 d2=%(dx)g o2=%(xsou)g | ricker1 frequency=%(frq)g | scale axis=123 | put label1=t label2=x label3=y ''' % par) Result('wav', 'window n1=200 |' + fdmod.waveplot('', par)) # modeling wavelet (frequency domain) Flow( 'sou', 'wav', ''' fft1 | window squeeze=n n1=%(nw)d min1=%(ow)g | pad beg2=%(xpad)d n2out=%(nx)d | put label1=w label2=x label3=y | transp memsize=250 plane=12 | transp memsize=250 plane=23 ''' % par) # global slowness perturnation Flow( 'ds', None, ''' spike nsp=1 mag=0.00005 n1=%(nz)d d1=%(dz)g o1=%(oz)g n2=%(nx)d d2=%(dx)g o2=%(ox)g | put label1=z label2=x label3=y | smooth rect1=1 rect2=1 | transp plane=12 | transp plane=23 | rtoc ''' % par) Plot('ds', 'window | real | transp |' + fdmod.cgrey('pclip=99.9', par)) # ------------------------------------------------------------ # zero-offset # ------------------------------------------------------------ # data zomig.model3('Zmod', 'slo', 'img', par) Flow( 'Zdat', 'Zmod', ''' transp plane=23 | transp plane=12 | pad beg1=%(begw)d n1out=%(padw)d | fft1 inv=y | put o1=0 label1=t label2=x ''' % par) Result('Zdat', fdmod.dgrey('screenratio=0.5 screenht=7', par)) # wavefield zomig.Awftwo3('woz', 'Zmod', 'slo', par) # migration zomig.image3('Zimg', 'slo', 'Zmod', par) Plot('Zimg', 'window | transp |' + fdmod.cgrey('', par)) Result('Zimg', 'Zimg', 'Overlay') # WEMVA zero-offset zomig.s2i('ds', 'ZFds', 'woz', 'slo', par) # forward F(ds) zomig.i2s('ZFds', 'ZAFds', 'woz', 'slo', par) # adjoint A(F(ds)) Result('ZFds', 'window | real | transp |' + fdmod.cgrey('', par)) Result('ZAFds', 'window | real | transp |' + fdmod.cgrey('pclip=98', par)) # ------------------------------------------------------------ # shot-record # ------------------------------------------------------------ # data spmig.modelPW3('Smod', 'slo', 'sou', 'ref', par) Flow( 'Sdat', 'Smod', ''' transp plane=23 | transp plane=12 | pad beg1=%(begw)d n1out=%(padw)d | fft1 inv=y | window f1=%(kt)d | pad n1out=%(nt)d | put o1=0 o2=%(xoff)g o3=%(xsou)g ''' % par) Result( 'Sdat', fdmod.dgrey( 'min2=%g max2=%g label2="Offset" screenratio=0.5 screenht=7' % (par['xoff'], -par['xoff']), par)) # wavefields spmig.wflds('dos', 'dor', 'wvl', 'Sdat', par) zomig.Cwfone3('wos', 'dos', 'slo', par) # source zomig.Awfone3('wor', 'dor', 'slo', par) # receiver # migration spmig.imagePW3('Simg', 'cig', 'slo', 'dos', 'dor', par) Plot('Simg', 'window | transp |' + fdmod.cgrey('', par)) Result('Simg', 'Simg ss', 'Overlay') # WEMVA shot-record spmig.s2i('ds', 'SFds', 'wos', 'wor', 'slo', par) # forward F(ds) spmig.i2s('SFds', 'SAFds', 'wos', 'wor', 'slo', par) # adjoint A(F(ds)) Result('SFds', 'window | real | transp |' + fdmod.cgrey('', par)) Result('SAFds', 'window | real | transp |' + fdmod.cgrey('pclip=98', par)) # ------------------------------------------------------------ for ispk in range(par['nspk']): i = par['ospk'] + ispk tag = str(i) par['xx'] = par['nx'] / 2 + i * par['jspk'] par['xs'] = par['xx'] # x start par['xe'] = par['xx'] # x end par['zs'] = par['nz'] / 2 # z start par['ze'] = par['nz'] / 2 # z end # slowness perturbation Flow( 'ds' + tag, None, ''' spike nsp=1 mag=1 n1=%(nz)d d1=%(dz)g o1=%(oz)g k1=%(zs)d l1=%(ze)d n2=%(nx)d d2=%(dx)g o2=%(ox)g k2=%(xs)d l2=%(xe)d | put label1=z label2=x label3=y | smooth rect1=6 rect2=2 repeat=3 | scale axis=123 | scale rscale=0.00005 | transp plane=12 | transp plane=23 | rtoc ''' % par) Result('ds' + tag, 'window | real | transp |' + fdmod.cgrey('', par)) # image perturbation Flow( 'di' + tag, 'ZFds msk', ''' window squeeze=n n1=1 f1=%(xx)d | pad beg1=%(xx)d n1out=%(nx)d | put o1=%(ox)g | math m=${SOURCES[1]} output="input*m" ''' % par) Result( 'di' + tag, 'window | real | transp | smooth rect2=3 repeat=3 |' + fdmod.cgrey('', par)) # WEMVA zero-offset zomig.s2i('ds' + tag, 'ZFds' + tag, 'woz', 'slo', par) # forward F(ds) zomig.i2s('ZFds' + tag, 'ZAFds' + tag, 'woz', 'slo', par) # adjoint A(F(ds)) zomig.i2s('di' + tag, 'ZAdi' + tag, 'woz', 'slo', par) # adjoint A(di) zomig.s2i('ZAdi' + tag, 'ZFAdi' + tag, 'woz', 'slo', par) # forward F(A(di)) Result('ZFds' + tag, 'window | real | transp |' + fdmod.cgrey('', par)) Result('ZAFds' + tag, 'window | real | transp |' + fdmod.cgrey('pclip=99.9', par)) Result('ZAdi' + tag, 'window | real | transp |' + fdmod.cgrey('pclip=99.9', par)) Result('ZFAdi' + tag, 'window | real | transp |' + fdmod.cgrey('', par)) # WEMVA shot-record spmig.s2i('ds' + tag, 'SFds' + tag, 'wos', 'wor', 'slo', par) # forward F(ds) spmig.i2s('SFds' + tag, 'SAFds' + tag, 'wos', 'wor', 'slo', par) # adjoint A(F(ds)) spmig.i2s('di' + tag, 'SAdi' + tag, 'wos', 'wor', 'slo', par) # adjoint A(di) spmig.s2i('SAdi' + tag, 'SFAdi' + tag, 'wos', 'wor', 'slo', par) # forward F(A(di)) Result('SFds' + tag, 'window | real | transp |' + fdmod.cgrey('', par)) Result('SAFds' + tag, 'window | real | transp |' + fdmod.cgrey('pclip=99.9', par)) Result('SAdi' + tag, 'window | real | transp |' + fdmod.cgrey('pclip=99.9', par)) Result('SFAdi' + tag, 'window | real | transp |' + fdmod.cgrey('', par))