Exemplo n.º 1
0
 def getxz(self):
     model_path = PATH.OUTPUT + '/' + 'model_init'
     try:
         m = solver.load(model_path)
         x = m['x'][0]
         z = m['z'][0]
     except:
         from seisflows.seistools.io import loadbin
         x = loadbin(model_path, 0, 'x')
         z = loadbin(model_path, 0, 'z')
     return x, z
Exemplo n.º 2
0
 def getxz(self):
     model_path = PATH.OUTPUT +'/'+ 'model_init'
     try:
         m = solver.load(model_path)
         x = m['x'][0]
         z = m['z'][0]
     except:
         from seisflows.seistools.io import loadbin
         x = loadbin(model_path, 0, 'x')
         z = loadbin(model_path, 0, 'z')
     return x,z
Exemplo n.º 3
0
    def check_mesh_properties(self, path=None, parameters=None):
        if not hasattr(self, '_mesh_properties'):
            if not path:
                path = PATH.MODEL_INIT

            if not parameters:
                parameters = self.parameters

            nproc = 0
            ngll = []
            while True:
                dummy = loadbin(path, nproc, parameters[0])
                ngll += [len(dummy)]
                nproc += 1
                if not exists('%s/proc%06d_%s.bin' %
                              (path, nproc, parameters[0])):
                    break

            self._mesh_properties = Struct([['nproc', nproc], ['ngll', ngll]])

        return self._mesh_properties
Exemplo n.º 4
0
    def check_mesh_properties(self, path=None, parameters=None):
        if not hasattr(self, '_mesh_properties'):
            if not path:
                path = PATH.MODEL_INIT

            if not parameters:
                parameters = self.parameters

            nproc = 0
            ngll = []
            while True:
                dummy = loadbin(path, nproc, 'reg1_'+parameters[0])
                ngll += [len(dummy)]
                nproc += 1
                if not exists('%s/proc%06d_reg1_%s.bin' % (path, nproc, parameters[0])):
                    break

            self._mesh_properties = Struct([
                ['nproc', nproc],
                ['ngll', ngll]])

        return self._mesh_properties