Exemplo n.º 1
0
def forward(dsl, dim, swfl, rwfl, slo, ss, par):

    for iexp in range(par['ns']):
        etag = "-e%03d" % iexp

        Flow(
            dim + etag, [dsl, swfl + etag, rwfl + etag, slo], '''
             rtoc |
             ../Code/srmvatau.x
             adj=n nht=%g oht=%g dht=%g %s
             swf=${SOURCES[1]}
             rwf=${SOURCES[2]}
             slo=${SOURCES[3]} |
             real
             ''' % (par['nht'], par['oht'], par['dht'], spmig.param(par)))

    Flow(dim + '-all', map(lambda x: dim + '-e%03d' % x, range(par['ns'])),
         'cat space=n axis=2 ${SOURCES[1:%d]}' % par['ns'])
    Flow(dim, dim + '-all', 'stack | spray axis=2 n=1 o=0 d=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))
Exemplo n.º 2
0
def adjoint(bsl, dim, swfl, rwfl, slo, ss, par):

    for iexp in range(par['ns']):
        etag = "-e%03d" % iexp

        Flow(
            bsl + etag, [dim, swfl + etag, rwfl + etag, slo], '''
             rtoc |
             ../Code/srmvatau.x
             adj=y nht=%g oht=%g dht=%g %s
             swf=${SOURCES[1]}
             rwf=${SOURCES[2]}
             slo=${SOURCES[3]} |
             real
             ''' % (par['nht'], par['oht'], par['dht'], spmig.param(par)))

    Flow(bsl + '-all', map(lambda x: bsl + '-e%03d' % x, range(par['ns'])),
         'cat space=n axis=2 ${SOURCES[1:%d]}' % par['ns'])
    Flow(bsl, bsl + '-all', 'stack | spray axis=2 n=1 o=0 d=1')

    # plot complete slowness backprojection
    Plot(bsl, 'window | transp |' + fdmod.cgrey('color=e pclip=97', par))
    Result(bsl, [bsl, ss], 'Overlay')

    # clip slowness perturbation
    Flow(bsl + '-byt', bsl + '-all', 'byte gainpanel=a pclip=97')

    for iexp in range(par['ns']):
        etag = "-e%03d" % iexp

        # plot partial slowness backprojection
        Plot(
            bsl + etag, bsl + '-byt', 'window n2=1 f2=%d | transp |' % iexp +
            fdmod.cgrey('color=e', par))
        Result(bsl + etag, [bsl + etag, ss + etag], 'Overlay')
Exemplo n.º 3
0
def adjoint(bsl,dim,swfl,rwfl,slo,ss,par):

    for iexp in range(par['ns']):
        etag = "-e%03d" % iexp

        Flow(bsl+etag,
             [dim,swfl+etag,rwfl+etag,slo],
             '''
             rtoc |
             ../Code/srmvatau.x
             adj=y nht=%g oht=%g dht=%g %s
             swf=${SOURCES[1]}
             rwf=${SOURCES[2]}
             slo=${SOURCES[3]} |
             real
             ''' % (par['nht'],par['oht'],par['dht'],spmig.param(par)))

    Flow(bsl+'-all',
         map(lambda x: bsl+'-e%03d'  % x,range(par['ns'])),
         'cat space=n axis=2 ${SOURCES[1:%d]}'%par['ns'])
    Flow(bsl,bsl+'-all','stack | spray axis=2 n=1 o=0 d=1')

    # plot complete slowness backprojection
    Plot(bsl,
         'window | transp |' + fdmod.cgrey('color=e pclip=97',par))
    Result(bsl,[bsl,ss],'Overlay')

    # clip slowness perturbation
    Flow(bsl+'-byt',
         bsl+'-all','byte gainpanel=a pclip=97')

    for iexp in range(par['ns']):
        etag = "-e%03d" % iexp
        
        # plot partial slowness backprojection
        Plot(bsl+etag,bsl+'-byt',
             'window n2=1 f2=%d | transp |' % iexp + fdmod.cgrey('color=e',par))
        Result(bsl+etag,[bsl+etag,ss+etag],'Overlay')
Exemplo n.º 4
0
def forward(dsl,dim,swfl,rwfl,slo,ss,par):

    for iexp in range(par['ns']):
        etag = "-e%03d" % iexp
        
        Flow(dim+etag,
             [dsl,swfl+etag,rwfl+etag,slo],
             '''
             rtoc |
             ../Code/srmvatau.x
             adj=n nht=%g oht=%g dht=%g %s
             swf=${SOURCES[1]}
             rwf=${SOURCES[2]}
             slo=${SOURCES[3]} |
             real
             ''' % (par['nht'],par['oht'],par['dht'],spmig.param(par)))

    Flow(dim+'-all',
         map(lambda x: dim+'-e%03d'  % x,range(par['ns'])),
         'cat space=n axis=2 ${SOURCES[1:%d]}'%par['ns'])
    Flow(dim,dim+'-all','stack | spray axis=2 n=1 o=0 d=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))
Exemplo n.º 5
0
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))
Exemplo n.º 6
0
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))