def setup(self): """ Lays groundwork for inversion """ # clean scratch directories if PAR.BEGIN == 1: unix.rm(PATH.GLOBAL) unix.mkdir(PATH.GLOBAL) preprocess.setup() postprocess.setup() optimize.setup() system.run('solver', 'setup', hosts='all')
def main(self): """ Migrates seismic data """ # prepare directory structure unix.rm(PATH.GLOBAL) unix.mkdir(PATH.GLOBAL) # set up workflow machinery preprocess.setup() postprocess.setup() # set up solver machinery print 'Preparing solver...' system.run('solver', 'setup', hosts='all') self.prepare_model() # perform migration print 'Generating synthetics...' system.run('solver', 'eval_func', hosts='all', path=PATH.GLOBAL) print 'Backprojecting data...' system.run('solver', 'eval_grad', hosts='all', path=PATH.GLOBAL, export_traces=PAR.SAVETRACES) postprocess.combine_kernels( path=PATH.GLOBAL, parameters=solver.parameters) try: postprocess.combine_kernels( path=PATH.GLOBAL, parameters=['rhop']) except: pass if PAR.SAVETRACES: self.save_traces() if PAR.SAVEKERNELS: self.save_kernels() else: self.save_kernels_sum() print 'Finished\n'
def setup(self): """ Lays groundwork for inversion """ # clean scratch directories if PAR.BEGIN == 1: unix.rm(PATH.SCRATCH) unix.mkdir(PATH.SCRATCH) preprocess.setup() postprocess.setup() optimize.setup() if PATH.DATA: print 'Copying data' else: print 'Generating data' system.run('solver', 'setup', hosts='all')
def setup(self): """ Lays groundwork for inversion """ # clean scratch directories if PAR.BEGIN == 1: unix.rm(PATH.GLOBAL) unix.mkdir(PATH.GLOBAL) preprocess.setup() postprocess.setup() optimize.setup() if PATH.DATA: print('Copying data...') else: print('Generating data...') system.run('solver', 'setup', hosts='all')
def main(self): """ Migrates seismic data """ # prepare directory structure unix.rm(PATH.GLOBAL) unix.mkdir(PATH.GLOBAL) # set up pre- and post-processing preprocess.setup() postprocess.setup() # prepare solver print 'Preparing solver...' system.run('solver', 'setup', hosts='all') self.prepare_model() system.run('solver', 'eval_func', hosts='all', path=PATH.GLOBAL) # backproject data print 'Backprojecting data...' system.run('solver', 'eval_grad', hosts='all', path=PATH.GLOBAL, export_traces=PAR.SAVETRACES) # process gradient postprocess.process_kernels(path=PATH.GLOBAL, tag='gradient') # save results if PAR.SAVEGRADIENT: self.save_gradient() if PAR.SAVETRACES: self.save_traces() if PAR.SAVEKERNELS: self.save_kernels() print 'Finished\n'
def setup(self): """ Lays groundwork for inversion """ # clean scratch directories if PAR.BEGIN == 1: unix.rm(PATH.SCRATCH) unix.mkdir(PATH.SCRATCH) preprocess.setup() postprocess.setup() optimize.setup() isready = self.solver_status() if not isready: if PATH.DATA: print 'Copying data...' else: print 'Generating data...' system.run('solver', 'setup', hosts='all')
def setup(self): """ Lays groundwork for inversion """ # clean scratch directories if PAR.BEGIN == 1: unix.rm(PATH.GLOBAL) unix.mkdir(PATH.GLOBAL) # set up optimization optimize.setup() # set up pre- and post-processing preprocess.setup() postprocess.setup() # set up solver if PAR.BEGIN == 1: system.run('solver', 'setup', hosts='all') return if PATH.LOCAL: system.run('solver', 'setup', hosts='all')