def deltaimage(dim, cig, drv, slo, ss, par): # CIG envelope Flow( cig + '-env', cig, ''' window | transp plane=12 | transp plane=23 | envelope | smooth rect1=50 rect2=50 repeat=1 | scale axis=123 | clip clip=0.75 ''') # pick tau Flow( cig + '-pck', cig + '-env', ''' pick rect1=%(npck1)d rect2=%(npck2)d rect3=1 vel0=0.0 | scale rscale=%(scpck)g | transp plane=13 ''' % par) Result(cig + '-pck', 'window | transp |' + fdmod.cgrey('color=j', par)) # plot picked tau on CIG Flow(cig + '-sbt', cig, 'byte gainpanel=a pclip=90') for ipos in range(0, par['nximg'], 10): ptag = "-x%03d" % ipos Plot( cig + '-pck' + ptag, cig + '-pck', 'window n1=1 f1=%d |' % ipos + tauplot(6, 4, 'screenratio=3', par)) Plot(cig + ptag, cig + '-sbt', 'window n1=1 f1=%d |' % ipos + adcig.tgrey('screenratio=3', par)) Result(cig + ptag, [cig + ptag, cig + '-pck' + ptag], 'Overlay') # velocity for tau spreading Flow( cig + '-vel', slo, ''' window squeeze=n min1=%(oximg)g n1=%(nximg)d j1=%(jximg)d | math output="1/input" ''' % par) # tau spreading Flow( cig + '-tau', [drv, cig + '-pck', cig + '-vel'], ''' ../Code/tauspread.x fit=${SOURCES[1]} vel=${SOURCES[2]} zmin=2.5 ''') # delta image Flow(dim, [drv, cig + '-tau'], 'add mode=p ${SOURCES[1]}') # plot complete image perturbation Plot(dim, 'window n4=1 min4=0 | transp |' + fdmod.cgrey('pclip=97', par)) Result(dim, [dim, ss], 'Overlay') # plot DIM tiles Result( dim + '-tile', dim, ''' window j1=%(jcig)d f1=%(fcig)d | transp plane=12 | transp plane=23 | put n2=%(nxtile)d o2=%(oxtile)g d2=%(dxtile)g n3=1 | ''' % par + fdmod.cgrey('wantaxis2=n pclip=97', par))
def deltaimage(dim,cig,drv,slo,ss,par): # CIG envelope Flow(cig+'-env', cig, ''' window | transp plane=12 | transp plane=23 | envelope | smooth rect1=50 rect2=50 repeat=1 | scale axis=123 | clip clip=0.75 ''') # pick tau Flow(cig+'-pck', cig+'-env', ''' pick rect1=%(npck1)d rect2=%(npck2)d rect3=1 vel0=0.0 | scale rscale=%(scpck)g | transp plane=13 ''' % par) Result(cig+'-pck', 'window | transp |' + fdmod.cgrey('color=j',par)) # plot picked tau on CIG Flow(cig+'-sbt', cig,'byte gainpanel=a pclip=90') for ipos in range(0,par['nximg'],10): ptag = "-x%03d" % ipos Plot(cig+'-pck'+ptag, cig+'-pck', 'window n1=1 f1=%d |' % ipos + tauplot(6,4,'screenratio=3',par) ) Plot(cig+ptag, cig+'-sbt', 'window n1=1 f1=%d |' % ipos + adcig.tgrey('screenratio=3',par)) Result(cig+ptag,[cig+ptag,cig+'-pck'+ptag],'Overlay') # velocity for tau spreading Flow(cig+'-vel', slo, ''' window squeeze=n min1=%(oximg)g n1=%(nximg)d j1=%(jximg)d | math output="1/input" ''' % par) # tau spreading Flow(cig+'-tau',[drv,cig+'-pck',cig+'-vel'], ''' ../Code/tauspread.x fit=${SOURCES[1]} vel=${SOURCES[2]} zmin=2.5 ''') # delta image Flow(dim,[drv,cig+'-tau'],'add mode=p ${SOURCES[1]}') # plot complete image perturbation Plot(dim, 'window n4=1 min4=0 | transp |' + fdmod.cgrey('pclip=97',par)) Result(dim,[dim,ss],'Overlay') # plot DIM tiles Result(dim+'-tile', dim, ''' window j1=%(jcig)d f1=%(fcig)d | transp plane=12 | transp plane=23 | put n2=%(nxtile)d o2=%(oxtile)g d2=%(dxtile)g n3=1 | ''' % par + fdmod.cgrey('wantaxis2=n pclip=97',par))
def migration(img, cig, drv, sdat, rdat, swfl, rwfl, slo, ss, par): for iexp in range(par['ns']): etag = "-e%03d" % iexp # select datumed data for individual shots Flow(sdat + etag, sdat, 'window n4=1 f4=%d squeeze=n' % iexp) Flow(rdat + etag, rdat, 'window n4=1 f4=%d squeeze=n' % iexp) # window frequency slices for MVA Flow(sdat + etag + '-win', sdat + etag, 'window squeeze=n n3=%(nwmva)d f3=%(fwmva)d j3=%(jwmva)d' % par) Flow(rdat + etag + '-win', rdat + etag, 'window squeeze=n n3=%(nwmva)d f3=%(fwmva)d j3=%(jwmva)d' % par) # wavefields for individual shots zomig.Cwfone3(swfl + etag, sdat + etag + '-win', slo, par) # source zomig.Awfone3(rwfl + etag, rdat + etag + '-win', slo, par) # receiver # migrate Flow([img + etag, cig + etag, drv + etag], [sdat + etag, rdat + etag, slo], ''' ../Code/srmig3.x %s rwf=${SOURCES[1]} slo=${SOURCES[2]} cig=${TARGETS[1]} drv=${TARGETS[2]} ''' % spmig.param(par)) # concatenate images and CIGs for k in ([img, drv, cig]): Flow(k + '-all', map(lambda x: k + '-e%03d' % x, range(par['ns'])), 'cat space=n axis=2 ${SOURCES[1:%d]}' % par['ns']) Flow(k, k + '-all', 'stack | spray axis=2 n=1 o=0 d=1') # plot complete images Plot(img, 'window | transp |' + fdmod.cgrey('pclip=97', par)) Result(img, [img, ss], 'Overlay') for k in ([drv, cig]): # plot complete CIGs Result( k, 'window n1=1 f1=%d |' % (par['nximg'] / 4) + adcig.tgrey('', par)) # plot CIG tiles Result( k + '-tile', k, ''' window j1=%(jcig)d f1=%(fcig)d | transp plane=12 | transp plane=23 | put n2=%(nxtile)d o2=%(oxtile)g d2=%(dxtile)g n3=1 | ''' % par + fdmod.cgrey('wantaxis2=n pclip=97', par)) # clip image Flow(img + '-byt', img + '-all', 'byte gainpanel=a pclip=97') # clip CIGs Flow(cig + '-byt', cig + '-all', 'byte gainpanel=a pclip=97') for iexp in range(par['ns']): etag = "-e%03d" % iexp # plot partial images Plot(img + etag, img + '-byt', 'window n2=1 f2=%d | transp |' % iexp + fdmod.cgrey('', par)) Result(img + etag, [img + etag, ss + etag], 'Overlay') # plot partial CIGs Result( cig + etag, cig + '-byt', 'window n1=1 f1=%d n2=1 f2=%d |' % (par['nximg'] / 4, iexp) + adcig.tgrey('', par))
def migration(img,cig,drv,sdat,rdat,swfl,rwfl,slo,ss,par): for iexp in range(par['ns']): etag = "-e%03d" % iexp # select datumed data for individual shots Flow(sdat+etag,sdat,'window n4=1 f4=%d squeeze=n' %iexp) Flow(rdat+etag,rdat,'window n4=1 f4=%d squeeze=n' %iexp) # window frequency slices for MVA Flow(sdat+etag+'-win', sdat+etag,'window squeeze=n n3=%(nwmva)d f3=%(fwmva)d j3=%(jwmva)d' % par) Flow(rdat+etag+'-win', rdat+etag,'window squeeze=n n3=%(nwmva)d f3=%(fwmva)d j3=%(jwmva)d' % par) # wavefields for individual shots zomig.Cwfone3(swfl+etag,sdat+etag+'-win',slo,par) # source zomig.Awfone3(rwfl+etag,rdat+etag+'-win',slo,par) # receiver # migrate Flow([img+etag,cig+etag,drv+etag], [sdat+etag,rdat+etag,slo], ''' ../Code/srmig3.x %s rwf=${SOURCES[1]} slo=${SOURCES[2]} cig=${TARGETS[1]} drv=${TARGETS[2]} ''' % spmig.param(par)) # concatenate images and CIGs for k in ([img,drv,cig]): Flow(k+'-all', map(lambda x: k+'-e%03d' % x,range(par['ns'])), 'cat space=n axis=2 ${SOURCES[1:%d]}'%par['ns']) Flow(k,k+'-all','stack | spray axis=2 n=1 o=0 d=1') # plot complete images Plot( img,'window | transp |'+ fdmod.cgrey('pclip=97',par)) Result(img,[img,ss],'Overlay') for k in ([drv,cig]): # plot complete CIGs Result(k,'window n1=1 f1=%d |' % (par['nximg']/4) + adcig.tgrey('',par)) # plot CIG tiles Result(k+'-tile', k, ''' window j1=%(jcig)d f1=%(fcig)d | transp plane=12 | transp plane=23 | put n2=%(nxtile)d o2=%(oxtile)g d2=%(dxtile)g n3=1 | ''' % par + fdmod.cgrey('wantaxis2=n pclip=97',par)) # clip image Flow(img+'-byt', img+'-all','byte gainpanel=a pclip=97') # clip CIGs Flow(cig+'-byt', cig+'-all','byte gainpanel=a pclip=97') for iexp in range(par['ns']): etag = "-e%03d" % iexp # plot partial images Plot(img+etag,img+'-byt', 'window n2=1 f2=%d | transp |' % iexp + fdmod.cgrey('',par)) Result(img+etag,[img+etag,ss+etag],'Overlay') # plot partial CIGs Result(cig+etag, cig+'-byt', 'window n1=1 f1=%d n2=1 f2=%d |' % (par['nximg']/4,iexp) + adcig.tgrey('',par))