def imixt(ss,wav,rr,n,par): pari = iparam(par) # model and geometry common('wav','vsm','den',ss,rr,'qq',par) random('gg',par) randomvel('vsm','vrn','gg',0.30,ss,rr,'qq',par) # FDmodeling modeling('wav', 'vrn','den', ss,rr,'qq', 'dat','wfl',par) Flow('rev', 'dat', 'reverse which=2 opt=i verb=y | pad end2=%(tpad)d' % pari) i = n-1 j = int(pow(2,i)) l = "%01d" %i Flow(rr+l,rr,'window j2=%d' %j) Plot(rr+l,fdmod.rrplot('plotfat=12',par)) Result('vsm'+l,['vsm',ss,rr+l,'qq'],'Overlay') Flow('rev'+l,'rev','window j1=%d' %j) # FDmigration migration('rev'+l, 'vsm','den', rr+l,rr,'qq', 'uuu'+l,'wig'+l, 'cic'+l,'iic'+l,pari)
def imixt(ss, wav, rr, n, par): pari = iparam(par) # model and geometry common('wav', 'vsm', 'den', ss, rr, 'qq', par) random('gg', par) randomvel('vsm', 'vrn', 'gg', 0.30, ss, rr, 'qq', par) # FDmodeling modeling('wav', 'vrn', 'den', ss, rr, 'qq', 'dat', 'wfl', par) Flow('rev', 'dat', 'reverse which=2 opt=i verb=y | pad end2=%(tpad)d' % pari) i = n - 1 j = int(pow(2, i)) l = "%01d" % i Flow(rr + l, rr, 'window j2=%d' % j) Plot(rr + l, fdmod.rrplot('plotfat=12', par)) Result('vsm' + l, ['vsm', ss, rr + l, 'qq'], 'Overlay') Flow('rev' + l, 'rev', 'window j1=%d' % j) # FDmigration migration('rev' + l, 'vsm', 'den', rr + l, rr, 'qq', 'uuu' + l, 'wig' + l, 'cic' + l, 'iic' + l, pari)
def isparse(ss, wav, rr, n, par): pari = iparam(par) # model and geometry common('wav', 'vsm', 'den', ss, rr, 'qq', par) # ------------------------------------------------------------ # FDmodeling modeling('wav', 'vsm', 'den', ss, rr, 'qq', 'dat', 'wfl', par) Flow('rev', 'dat', 'reverse which=2 opt=i verb=y | pad end2=%(tpad)d' % pari) # ------------------------------------------------------------ for i in range(n): j = int(pow(2, i)) l = "%01d" % i Flow(rr + l, rr, 'window j2=%d' % j) Plot(rr + l, fdmod.rrplot('plotfat=12', par)) Result('vsm' + l, ['vsm', ss, rr + l, 'qq'], 'Overlay') for f in range(0, par['nt'] / par['jsnap'], 2): tag = "-%02d" % f Result('wfl' + l + tag, ['wflom-' + tag, ss, rr + l, 'qq'], 'Overlay') Flow('rev' + l, 'rev', 'window j1=%d' % j) # FDmigration migration('rev' + l, 'vsm', 'den', rr + l, rr, 'qq', 'uuu' + l, 'wig' + l, 'cic' + l, 'iic' + l, pari)
def geometry(ss,rr,qq,par): # source coordinates Plot(ss,fdmod.ssplot('',par)) Plot('win'+ss,ss,winss('',par)) # receiver coordinates Plot(rr,fdmod.rrplot('plotfat=12',par)) # image coordinates fdmod.makebox(qq,par['zminq'],par['zmaxq'],par['xminq'],par['xmaxq'],par) Plot(qq,fdmod.bbplot('plotcol=1',par))
def windowreceivers(rr,groups,keys,par): for group,gpars in groups.items(): nwin = gpars['nr'] owin = gpars['or'] dwin = gpars['dr'] Flow('rr-'+group,gpars['group'],'window n2=%d f2=%d j2=%d squeeze=n' % (nwin,owin,dwin)) Plot('rr-'+group,fdmod.rrplot('plotcol=%d plotfat=10' % gpars['color'],par)) Flow(rr,['rr-'+group for group in keys], 'cat axis=2 ${SOURCES[1:%d]}' % len(groups)) Plot(rr,['rr-'+group for group in keys],'Overlay')
def geometry(ss, rr, qq, par): # source coordinates Plot(ss, fdmod.ssplot('', par)) Plot('win' + ss, ss, winss('', par)) # receiver coordinates Plot(rr, fdmod.rrplot('plotfat=12', par)) # image coordinates fdmod.makebox(qq, par['zminq'], par['zmaxq'], par['xminq'], par['xmaxq'], par) Plot(qq, fdmod.bbplot('plotcol=1', par))
def sampling(vo, rm, dat, rec, ico, cic, iic, par): for k in range(0, 3): ktag = "-s%01d" % k knum = pow(2, k + 1) Flow(rec + ktag, rec, 'window j2=%d' % (knum)) Plot(rec + ktag, 'window |' + fdmod.rrplot('', par)) Flow(dat + ktag, dat, 'window j1=%d' % (knum)) Result( dat + ktag, 'window j2=5 | transp |' + fdmod.dgrey( 'pclip=99 screenratio=1.5 min1=%(mintplot)g' % par, par)) pimage(cic + ktag, iic + ktag, dat + ktag, vo, rm, rec + ktag, ico, par)
def sampling(vo,rm, dat,rec,ico, cic,iic, par): for k in range(0,3): ktag = "-s%01d" % k knum = pow(2,k+1) Flow(rec+ktag,rec,'window j2=%d' % (knum)) Plot(rec+ktag,'window |' + fdmod.rrplot('',par)) Flow(dat+ktag,dat,'window j1=%d' % (knum)) Result(dat+ktag, 'window j2=5 | transp |' + fdmod.dgrey('pclip=99 screenratio=1.5 min1=%(mintplot)g'%par, par)) pimage(cic+ktag,iic+ktag,dat+ktag,vo,rm,rec+ktag,ico,par)
def isparse(ss,wav,rr,n,par): pari = iparam(par) # model and geometry common('wav','vsm','den',ss,rr,'qq',par) # ------------------------------------------------------------ # FDmodeling modeling('wav', 'vsm','den', ss,rr,'qq', 'dat','wfl',par) Flow('rev', 'dat', 'reverse which=2 opt=i verb=y | pad end2=%(tpad)d' % pari) # ------------------------------------------------------------ for i in range(n): j = int(pow(2,i)) l = "%01d" %i Flow(rr+l,rr,'window j2=%d' %j) Plot(rr+l,fdmod.rrplot('plotfat=12',par)) Result('vsm'+l,['vsm',ss,rr+l,'qq'],'Overlay') for f in range(0,par['nt']/par['jsnap'],2): tag = "-%02d"%f Result('wfl'+l+tag,['wflom-'+tag,ss,rr+l,'qq'],'Overlay') Flow('rev'+l,'rev','window j1=%d' %j) # FDmigration migration('rev'+l, 'vsm','den', rr+l,rr,'qq', 'uuu'+l,'wig'+l, 'cic'+l,'iic'+l,pari)
def receivers(rr, par): fdmod.horizontal(rr, par['oz'] + par['lo'], par) Plot(rr, 'window |' + fdmod.rrplot('', par))
def wdfic(cii, uxx, uyy, wxx, wyy, dat, vel, den, rec, ico, par): # ------------------------------------------------------------ par['jrec'] = 5 par['nrec'] = 320 par['orec'] = 0 par['jrec'] = 10 par['nrec'] = 160 receivers = range(par['orec'], par['orec'] + par['nrec'] * par['jrec'], par['jrec']) # ------------------------------------------------------------ for k in receivers: ktag = "-%04d" % k # source coordinates Flow(rec + ktag, rec, 'window n2=1 f2=%g' % k) Plot(rec + ktag, 'window |' + fdmod.rrplot('', par)) # velocity (overlay) Plot(vel + ktag, [vel, rec + ktag, ico], 'Overlay') allvxx = map(lambda x: vel + '-%04d' % x, receivers) Plot('allvxx', allvxx, 'Movie') # ------------------------------------------------------------ iwindow = ' ' + \ ''' nqz=%(nqz)d oqz=%(oqz)g nqx=%(nqx)d oqx=%(oqx)g jsnap=%(jdata)d jdata=%(jdata)d ''' % par + ' ' # ------------------------------------------------------------ # ------------------------------------------------------------ # image all traces at once # wavefield # z-x-t Flow( uyy, dat + '-' + vel + '-wfl', ''' window n3=%d f3=%g | reverse which=4 opt=i verb=y | put o3=%g label3=t unit3=s ''' % (2 * par['tcut'] + 1, par['nt'] - par['kt'] - par['tcut'], -par['tcut'] * par['dt'])) Result(uyy, 'byte gainpanel=a pclip=100 |' + igrey('', par)) # WDF over y # z-x-t Flow(wyy, uyy, 'wdf verb=y nh1=%(nhz)d nh2=%(nhx)d nh3=%(nht)d' % par) Result(wyy, 'byte gainpanel=a pclip=100 |' + igrey('', par)) # ------------------------------------------------------------ # ------------------------------------------------------------ # image each trace separately for k in receivers: ktag = "-%04d" % k # data trace Flow(dat + ktag, dat, 'window squeeze=n n1=1 f1=%g' % k) Flow(dat + ktag + '-rev', dat + ktag, 'reverse which=2 opt=i verb=y | pad end2=%(tpad)d' % par) fdmod.awefd(dat + ktag + '-bck', dat + ktag + '-wfl', dat + ktag + '-rev', vel, den, rec + ktag, rec + ktag, iwindow, par) # z-x-t Flow( uyy + ktag, dat + ktag + '-wfl', ''' window n3=%d f3=%g | reverse which=4 opt=i verb=y | put o3=%g label3=t unit3=s ''' % (2 * par['tcut'] + 1, par['nt'] - par['kt'] - par['tcut'], -par['tcut'] * par['dt'])) Result(uyy + ktag, 'byte gainpanel=a pclip=100 |' + igrey('', par)) # z*x-.-t Flow(uxx + ktag, uyy + ktag, 'put n1=%d n2=1' % (par['nqz'] * par['nqx'])) # collect traces at the image point for all receiver locations # wavefield # z*x-xs-t Flow(uxx + '-all', map(lambda x: uxx + '-%04d' % x, receivers), 'cat axis=2 space=n ${SOURCES[1:%d]}' % (par['nrec'])) # WDF over x # z*x-xs-t Flow(wxx + '-all', uxx + '-all', ''' wdf verb=y nh1=0 nh2=100 nh3=%(nht)d ''' % par) for k in (uxx, wxx): # all traces around the target # z-x-t Flow( k + '-cub', k + '-all', ''' stack | transp plane=23 | put n1=%d o1=%g d1=%g label1=z unit1='' n2=%d o2=%g d2=%g label2=x unit2='' ''' % (par['nqz'], par['oqz'], par['dqz'], par['nqx'], par['oqx'], par['dqx'])) # one trace at the target # xs-t Flow(k, k + '-all', 'window n1=1 f1=%d | transp' % (par['nqz'] * par['nqx'] / 2)) Result( k, ''' put o2=%g d2=%g | grey title="" pclip=98 labelsz=6 labelfat=2 label1=%s unit1=%s label2=%s unit2=%s screenratio=0.3 screenht=4 %s ''' % (par['ox'] + par['orec'] * par['dx'], par['jrec'] * par['dx'], par['lt'], par['ut'], par['lx'], par['ux'], par['labelattr'])) # z-x Flow(cii, wxx + '-cub', 'window n3=1 f3=%d' % par['tcut']) Plot(cii, fdmod.cgrey('pclip=100', par)) Result(cii, [cii, 'rr'], 'Overlay') Result( 'win' + cii, cii, fdmod.cgrey( 'min1=%g max1=%g min2=%g max2=%g screenratio=%g wantaxis=y' % (par['wzmin'], par['wzmax'], par['wxmin'], par['wxmax'], par['wratio']), par))
def run(par): # experiments fdmod.horizontal('rr', 0, par) Plot('rr', 'window j2=10|' + fdmod.rrplot('', par)) Plot('ss', 'window |' + fdmod.ssplot('', par)) Plot('sx', 'window |' + fdmod.ssplot('plotcol=5', par)) # wavelet fdmod.wavelet('wav_', par['frq'], par) Flow('wav', 'wav_', 'transp') Result('wav', 'window n2=200 |' + fdmod.waveplot('', par)) # velocity Flow( 'vbck', None, ''' math n1=%(nz)d o1=%(oz)g d1=%(dz)g output="2000" | spray axis=2 n=%(nx)d o=%(ox)g d=%(dx)g ''' % par) Flow( 'vprt', None, ''' spike nsp=1 mag=1 n1=%(nz)d o1=%(oz)g d1=%(dz)g k1=%(kz)d l1=%(mz)d n2=%(nx)d o2=%(ox)g d2=%(dx)g k2=%(kx)d l2=%(mx)d | smooth rect1=25 rect2=25 repeat=3 | scale axis=123 | scale rscale=%(vprt)g ''' % par) Flow('velo', 'vbck vprt', 'add ${SOURCES[1]}') Plot('velo', fdmod.cgrey('allpos=y bias=1200 pclip=100 color=g', par)) Result('velo', ['velo', 'ss', 'sx'], 'Overlay') # density Flow('dens', 'velo', 'math output=1') # reflector Plot( 'refl', 'refl velo', ''' depth2time velocity=${SOURCES[1]} dt=%(dt)g nt=%(nt)d | scale rscale=-1 | ricker1 frequency=%(frq)g | time2depth velocity=${SOURCES[1]} dz=%(dz)g nz=%(nz)d | ''' % par + fdmod.cgrey('pclip=100', par)) Result('refl', ['refl', 'ss', 'sx'], 'Overlay') # mask Flow( 'mask', None, ''' spike nsp=1 mag=1 n1=%(nx)d o1=%(ox)g d1=%(dx)g k1=101 l1=900 n2=%(nt)d o2=%(ot)g d2=%(dt)g | smooth rect1=100 | scale axis=123 ''' % par) Result('mask', 'transp |' + fdmod.dgrey('allpos=y pclip=100', par)) # F-D modeling (born) fdmod.lwefd1('do', 'wo', 'dd', 'wd', 'wav', 'velo', 'dens', 'refl', 'ss', 'rr', 'jsnap=100', par) Result( 'do', 'transp | window min1=0.25 |' + fdmod.dgrey('min1=0.25 pclip=100', par)) Result( 'dd', 'transp | window min1=0.25 |' + fdmod.dgrey('min1=0.25 pclip=100', par)) Result('wo', fdmod.wgrey('', par)) Result('wd', fdmod.wgrey('', par)) # source data and wavefield fdmod.awefd1('ds', 'ws', 'wav', 'velo', 'dens', 'sx', 'rr', '', par) Result('ws', 'window j3=20 |' + fdmod.wgrey('', par)) # receiver wavefield Flow('du', 'dd mask', 'add mode=p ${SOURCES[1]} | reverse which=2 opt=i verb=y') fdmod.awefd('dx', 'wx', 'du', 'velo', 'dens', 'rr', 'rr', '', par) Flow('dr', 'dx', 'reverse which=2 opt=i verb=y') Flow('wr', 'wx', 'reverse which=4 opt=i verb=y') Result('wr', 'window j3=20 |' + fdmod.wgrey('', par)) for i in range(0, par['nt'] / 100, 1): fdmod.wframe('wo' + '-' + str(i), 'wo', i, 'pclip=99.9', par) fdmod.wframe('wd' + '-' + str(i), 'wd', i, 'pclip=100', par) for i in range(0, par['nt'] / 100, 1): fdmod.wframe('wx' + '-' + str(i), 'wx', i * 25, 'pclip=99.9', par) # ------------------------------------------------------------ minx = 500 maxx = 1500 minz = par['oz'] + par['nz'] * par['dz'] / 2 numz = par['nz'] / 2 mint = 0.1 numt = 150 maxt = mint + numt * par['dt'] * par['jsnap'] # wavefield for i in ('s', 'r'): Flow( 'u' + i, 'w' + i, ''' window min1=%(zmin)g max1=%(zmax)g min2=%(xmin)g max2=%(xmax)g | scale axis=123 ''' % par) Plot('u' + i, 'window j3=10 |' + fdmod.wgrey('pclip=99', par), view=1) for k in range(0, par['nt'] / par['jsnap'], 25): fdmod.wframe('u' + i + '-' + str(k / 25), 'u' + i, k, 'pclip=99', par) # windowed wavefields Flow( 'p' + i, 'u' + i, ''' window min1=%g n1=%g min2=%g max2=%g min3=%g n3=%g ''' % (minz, numz, minx, maxx, mint, numt)) Flow('q' + i, 'p' + i, 'transp plane=13 memsize=500') Flow('o' + i, 'q' + i, 'transp plane=23 memsize=500') Flow('qi', 'qs qr', 'add mode=p ${SOURCES[1]}') Flow('oi', 'os or', 'add mode=p ${SOURCES[1]}') for i in ('s', 'r', 'i'): Plot('q' + i, 'window j3=10 |' + fdmod.dgrey('gainpanel=a pclip=100', par), view=1) Plot('o' + i, 'window j3=10 | transp |' + fdmod.egrey('gainpanel=a pclip=100', par), view=1) Flow(['q' + i + 'plt', 'q' + i + 'bar'], 'q' + i, 'byte bar=${TARGETS[1]} gainpanel=a pclip=100') for k in range(10): Result( 'q' + i + 'plt' + str(k), ['q' + i + 'plt', 'q' + i + 'bar'], 'window n3=1 f3=%d |' % (10 * k) + fdmod.dgrey( ''' bar=${SOURCES[1]} min1=%g max1=%g min2=%g max2=%g labelsz=8 labelfat=3 screenratio=1.5 ''' % (mint, maxt, minx, maxx), par)) # cut along the reflectors Flow( 'cut', 'refl', ''' window min1=%g n1=%g min2=%g max2=%g | spray axis=3 n=%d o=%g d=%g | transp plane=13 memsize=500 ''' % (minz, numz, minx, maxx, numt, 0.1, par['dt'] * 4)) for i in ('s', 'r'): Flow( 'c' + i, ['q' + i, 'cut'], ''' add mode=p ${SOURCES[1]} | transp plane=23 | stack ''') Result('c' + i, fdmod.dgrey('', par)) Flow('f' + i, 'q' + i, 'window n3=1 min3=300') Result('f' + i, fdmod.dgrey('', par)) # ------------------------------------------------------------ # conventional IC Flow('ii', ['ps', 'pr'], 'ic ur=${SOURCES[1]} version=0 nbuf=500 verb=y') Plot('ii', fdmod.cgrey('pclip=99.9', par)) Result('ii', ['ii', 'ss', 'sx'], 'Overlay')
def rrplot(self,custom,scalar,horizontal=True): self.scale(horizontal) return fdmod.rrplot(custom,self.par)
def run(par): # experiments fdmod.horizontal('rr',0,par) Plot('rr','window j2=10|' + fdmod.rrplot('',par)) Plot('ss','window |' + fdmod.ssplot('',par)) Plot('sx','window |' + fdmod.ssplot('plotcol=5',par)) # wavelet fdmod.wavelet('wav_',par['frq'],par) Flow('wav','wav_','transp') Result('wav','window n2=200 |' + fdmod.waveplot('',par)) # velocity Flow('vbck',None, ''' math n1=%(nz)d o1=%(oz)g d1=%(dz)g output="2000" | spray axis=2 n=%(nx)d o=%(ox)g d=%(dx)g ''' % par) Flow('vprt',None, ''' spike nsp=1 mag=1 n1=%(nz)d o1=%(oz)g d1=%(dz)g k1=%(kz)d l1=%(mz)d n2=%(nx)d o2=%(ox)g d2=%(dx)g k2=%(kx)d l2=%(mx)d | smooth rect1=25 rect2=25 repeat=3 | scale axis=123 | scale rscale=%(vprt)g ''' % par) Flow( 'velo','vbck vprt','add ${SOURCES[1]}') Plot( 'velo',fdmod.cgrey('allpos=y bias=1200 pclip=100 color=g',par)) Result('velo',['velo','ss','sx'],'Overlay') # density Flow('dens','velo','math output=1') # reflector Plot('refl','refl velo', ''' depth2time velocity=${SOURCES[1]} dt=%(dt)g nt=%(nt)d | scale rscale=-1 | ricker1 frequency=%(frq)g | time2depth velocity=${SOURCES[1]} dz=%(dz)g nz=%(nz)d | ''' % par + fdmod.cgrey('pclip=100',par)) Result('refl',['refl','ss','sx'],'Overlay') # mask Flow('mask',None, ''' spike nsp=1 mag=1 n1=%(nx)d o1=%(ox)g d1=%(dx)g k1=101 l1=900 n2=%(nt)d o2=%(ot)g d2=%(dt)g | smooth rect1=100 | scale axis=123 ''' % par) Result('mask','transp |' + fdmod.dgrey('allpos=y pclip=100',par)) # F-D modeling (born) fdmod.lwefd1( 'do','wo', 'dd','wd', 'wav','velo','dens','refl','ss','rr','jsnap=100',par) Result('do','transp | window min1=0.25 |' + fdmod.dgrey('min1=0.25 pclip=100',par)) Result('dd','transp | window min1=0.25 |' + fdmod.dgrey('min1=0.25 pclip=100',par)) Plot('wo',fdmod.wgrey('',par),view=1) Plot('wd',fdmod.wgrey('',par),view=1) # source data and wavefield fdmod.awefd1( 'ds','ws', 'wav','velo','dens','sx','rr','',par) Plot('ws','window j3=20 |' + fdmod.wgrey('',par),view=1) # receiver wavefield Flow('du','dd mask', 'add mode=p ${SOURCES[1]} | reverse which=2 opt=i verb=y') fdmod.awefd( 'dx','wx', 'du','velo','dens','rr','rr','',par) Flow('dr','dx','reverse which=2 opt=i verb=y') Flow('wr','wx','reverse which=4 opt=i verb=y') Plot('wr','window j3=20 |' + fdmod.wgrey('',par),view=1) for i in range(0,par['nt']/100,1): fdmod.wframe('wo'+'-'+str(i),'wo',i,'pclip=99.9',par) fdmod.wframe('wd'+'-'+str(i),'wd',i,'pclip=100',par) for i in range(0,par['nt']/100,1): fdmod.wframe('wx'+'-'+str(i),'wx',i*25,'pclip=99.9',par) # ------------------------------------------------------------ minx=500 maxx=1500 minz=par['oz']+par['nz']*par['dz']/2 numz=par['nz']/2 mint=0.1 numt=150 maxt=mint+numt*par['dt']*par['jsnap'] # wavefield for i in ('s','r'): Flow('u'+i,'w'+i, ''' window min1=%(zmin)g max1=%(zmax)g min2=%(xmin)g max2=%(xmax)g | scale axis=123 ''' % par) Plot('u'+i,'window j3=10 |' + fdmod.wgrey('pclip=99',par),view=1) for k in range(0,par['nt']/par['jsnap'],25): fdmod.wframe('u'+i+'-'+str(k/25),'u'+i,k,'pclip=99',par) # windowed wavefields Flow('p'+i,'u'+i, ''' window min1=%g n1=%g min2=%g max2=%g min3=%g n3=%g ''' % (minz,numz, minx,maxx, mint,numt)) Flow('q'+i,'p'+i,'transp plane=13 memsize=500') Flow('o'+i,'q'+i,'transp plane=23 memsize=500') Flow( 'qi','qs qr','add mode=p ${SOURCES[1]}') Flow( 'oi','os or','add mode=p ${SOURCES[1]}') for i in ('s','r','i'): Plot('q'+i,'window j3=10 |' + fdmod.dgrey('gainpanel=a pclip=100',par),view=1) Plot('o'+i,'window j3=10 | transp |' + fdmod.egrey('gainpanel=a pclip=100',par),view=1) Flow(['q'+i+'plt','q'+i+'bar'],'q'+i, 'byte bar=${TARGETS[1]} gainpanel=a pclip=100') for k in range(10): Result('q'+i+'plt'+str(k),['q'+i+'plt','q'+i+'bar'], 'window n3=1 f3=%d |' % (10*k) + fdmod.dgrey( ''' bar=${SOURCES[1]} min1=%g max1=%g min2=%g max2=%g labelsz=8 labelfat=3 screenratio=1.5 ''' %(mint,maxt,minx,maxx),par)) # cut along the reflectors Flow('cut','refl', ''' window min1=%g n1=%g min2=%g max2=%g | spray axis=3 n=%d o=%g d=%g | transp plane=13 memsize=500 ''' % (minz,numz, minx,maxx, numt,0.1,par['dt']*4) ) for i in ('s','r'): Flow('c'+i,['q'+i,'cut'], ''' add mode=p ${SOURCES[1]} | transp plane=23 | stack ''') Result('c'+i,fdmod.dgrey('',par)) Flow( 'f'+i,'q'+i,'window n3=1 min3=300') Result('f'+i,fdmod.dgrey('',par)) # ------------------------------------------------------------ # conventional IC Flow( 'ii',['ps','pr'],'ic ur=${SOURCES[1]} version=0 nbuf=500 verb=y') Plot( 'ii',fdmod.cgrey('pclip=99.9',par)) Result('ii',['ii','ss','sx'],'Overlay')
def wdfic(cii, uxx,uyy, wxx,wyy, dat,vel,den,rec,ico,par): # ------------------------------------------------------------ par['jrec']=5 par['nrec']=320 par['orec']=0 par['jrec']=10 par['nrec']=160 receivers = range(par['orec'],par['orec']+par['nrec']*par['jrec'],par['jrec']) # ------------------------------------------------------------ for k in receivers: ktag = "-%04d" % k # source coordinates Flow(rec+ktag,rec,'window n2=1 f2=%g' % k ) Plot(rec+ktag, 'window |' + fdmod.rrplot('',par)) # velocity (overlay) Plot(vel+ktag,[vel,rec+ktag,ico],'Overlay') allvxx = map(lambda x: vel+'-%04d' % x,receivers) Plot('allvxx',allvxx,'Movie') # ------------------------------------------------------------ iwindow = ' ' + \ ''' nqz=%(nqz)d oqz=%(oqz)g nqx=%(nqx)d oqx=%(oqx)g jsnap=%(jdata)d jdata=%(jdata)d ''' % par + ' ' # ------------------------------------------------------------ # ------------------------------------------------------------ # image all traces at once # wavefield # z-x-t Flow(uyy, dat+'-'+vel+'-wfl', ''' window n3=%d f3=%g | reverse which=4 opt=i verb=y | put o3=%g label3=t unit3=s ''' % (2*par['tcut']+1, par['nt']-par['kt']-par['tcut'], -par['tcut']*par['dt'])) Result(uyy,'byte gainpanel=a pclip=100 |' + igrey('',par)) # WDF over y # z-x-t Flow(wyy, uyy, 'wdf verb=y nh1=%(nhz)d nh2=%(nhx)d nh3=%(nht)d' % par) Result(wyy,'byte gainpanel=a pclip=100 |' + igrey('',par)) # ------------------------------------------------------------ # ------------------------------------------------------------ # image each trace separately for k in receivers: ktag = "-%04d" % k # data trace Flow(dat+ktag, dat,'window squeeze=n n1=1 f1=%g' % k ) Flow(dat+ktag+'-rev', dat+ktag,'reverse which=2 opt=i verb=y | pad end2=%(tpad)d' % par) fdmod.awefd(dat+ktag+'-bck', dat+ktag+'-wfl', dat+ktag+'-rev', vel,den, rec+ktag,rec+ktag,iwindow,par) # z-x-t Flow(uyy+ktag, dat+ktag+'-wfl', ''' window n3=%d f3=%g | reverse which=4 opt=i verb=y | put o3=%g label3=t unit3=s ''' % (2*par['tcut']+1, par['nt']-par['kt']-par['tcut'], -par['tcut']*par['dt'])) Result(uyy+ktag,'byte gainpanel=a pclip=100 |' + igrey('',par)) # z*x-.-t Flow(uxx+ktag, uyy+ktag, 'put n1=%d n2=1' % (par['nqz']*par['nqx']) ) # collect traces at the image point for all receiver locations # wavefield # z*x-xs-t Flow(uxx+'-all', map(lambda x: uxx+'-%04d' % x,receivers), 'cat axis=2 space=n ${SOURCES[1:%d]}' % (par['nrec'])) # WDF over x # z*x-xs-t Flow(wxx+'-all', uxx+'-all', ''' wdf verb=y nh1=0 nh2=100 nh3=%(nht)d ''' % par) for k in (uxx,wxx): # all traces around the target # z-x-t Flow(k+'-cub', k+'-all', ''' stack | transp plane=23 | put n1=%d o1=%g d1=%g label1=z unit1='' n2=%d o2=%g d2=%g label2=x unit2='' ''' % (par['nqz'],par['oqz'],par['dqz'], par['nqx'],par['oqx'],par['dqx'])) # one trace at the target # xs-t Flow(k, k+'-all', 'window n1=1 f1=%d | transp' % (par['nqz']*par['nqx']/2) ) Result(k, ''' put o2=%g d2=%g | grey title="" pclip=98 labelsz=6 labelfat=2 label1=%s unit1=%s label2=%s unit2=%s screenratio=0.3 screenht=4 %s ''' % (par['ox']+par['orec']*par['dx'], par['jrec']*par['dx'], par['lt'],par['ut'], par['lx'],par['ux'], par['labelattr']) ) # z-x Flow(cii, wxx+'-cub', 'window n3=1 f3=%d' % par['tcut']) Plot(cii,fdmod.cgrey('pclip=100',par)) Result(cii,[cii,'rr'],'Overlay') Result('win'+cii, cii, fdmod.cgrey('min1=%g max1=%g min2=%g max2=%g screenratio=%g wantaxis=y' % (par['wzmin'],par['wzmax'],par['wxmin'],par['wxmax'],par['wratio']),par))
def receivers(rr,par): fdmod.horizontal(rr,par['oz']+par['lo'],par) Plot(rr,'window |' + fdmod.rrplot('',par))