Example #1
0
    def generate_adjoint_traces(self, s, d, h):
        """ Generates adjoint traces from observed and synthetic traces
        """

        for i in range(h.nr):
            s[:,i] = self.call_adjoint(s[:,i], d[:,i], h.nt, h.dt)

        # bandpass once more
        if PAR.BANDPASS:
            if PAR.FREQLO and PAR.FREQHI:
                s = sbandpass(s, h, PAR.FREQLO, PAR.FREQHI, 'reverse')

            elif PAR.FREQHI:
                s = shighpass(s, h, PAR.FREQLO, 'reverse')

            elif PAR.FREQHI:
                s = slowpass(s, h, PAR.FREQHI, 'reverse')

            else:
                raise ParameterError(PAR, 'BANDPASS')

        # normalize traces
        if PAR.NORMALIZE:
            for ir in range(h.nr):
                w = np.linalg.norm(d[:,ir], ord=2)
                if w > 0: 
                    s[:,ir] /= w

        return s
Example #2
0
    def process_traces(self, s, h):
        """ Performs data processing operations on traces
        """
        # filter data
        if PAR.BANDPASS:
            s = sbandpass(s, h, PAR.FREQLO, PAR.FREQHI)

        if PAR.HIGHPASS:
            s = shighpass(s, h, PAR.FREQLO)

        if PAR.HIGHPASS:
            s = slowpass(s, h, PAR.FREQHI)

        # mute direct arrival
        if PAR.MUTE == 1:
            vel = PAR.MUTESLOPE
            off = PAR.MUTECONST
            s = smute(s, h, vel, off, constant_spacing=False)

        elif PAR.MUTE == 2:
            import system
            vel = PAR.MUTESLOPE * (PAR.NREC + 1) / (PAR.XMAX - PAR.XMIN)
            off = PAR.MUTECONST
            src = system.getnode()
            s = smute(s, h, vel, off, src, constant_spacing=True)

        return s
Example #3
0
    def generate_adjoint_traces(self, s, d, h):
        """ Generates adjoint traces from observed and synthetic traces
        """

        for i in range(h.nr):
            s[:, i] = self.call_adjoint(s[:, i], d[:, i], h.nt, h.dt)

        # bandpass once more
        if PAR.BANDPASS:
            if PAR.FREQLO and PAR.FREQHI:
                s = sbandpass(s, h, PAR.FREQLO, PAR.FREQHI, 'reverse')

            elif PAR.FREQHI:
                s = shighpass(s, h, PAR.FREQLO, 'reverse')

            elif PAR.FREQHI:
                s = slowpass(s, h, PAR.FREQHI, 'reverse')

            else:
                raise ParameterError(PAR, 'BANDPASS')

        # normalize traces
        if PAR.NORMALIZE:
            for ir in range(h.nr):
                w = np.linalg.norm(d[:, ir], ord=2)
                if w > 0:
                    s[:, ir] /= w

        return s
Example #4
0
    def process_traces(self, s, h):
        """ Performs data processing operations on traces
        """
        # filter data
        if PAR.FREQLO and PAR.FREQHI:
            s = sbandpass(s, h, PAR.FREQLO, PAR.FREQHI)

        return s
Example #5
0
    def process_traces(self, s, h):
        """ Performs data processing operations on traces
        """
        # filter data
        if PAR.BANDPASS:
            if PAR.FREQLO and PAR.FREQHI:
                s = sbandpass(s, h, PAR.FREQLO, PAR.FREQHI)

            elif PAR.FREQHI:
                s = shighpass(s, h, PAR.FREQLO)

            elif PAR.FREQHI:
                s = slowpass(s, h, PAR.FREQHI)

            else:
                raise ParameterError(PAR, 'BANDPASS')

        # mute direct arrival
        if PAR.MUTE:
            vel = PAR.MUTESLOPE
            off = PAR.MUTECONST
            s = smute(s, h, vel, off, constant_spacing=False)

        return s
Example #6
0
    def process_traces(self, s, h):
        """ Performs data processing operations on traces
        """
        # filter data
        if PAR.BANDPASS:
            if PAR.FREQLO and PAR.FREQHI:
                s = sbandpass(s, h, PAR.FREQLO, PAR.FREQHI)

            elif PAR.FREQHI:
                s = shighpass(s, h, PAR.FREQLO)

            elif PAR.FREQHI:
                s = slowpass(s, h, PAR.FREQHI)

            else:
                raise ParameterError(PAR, 'BANDPASS')

        # mute direct arrival
        if PAR.MUTE:
            vel = PAR.MUTESLOPE
            off = PAR.MUTECONST
            s = smute(s, h, vel, off, constant_spacing=False)

        return s