import parametro import auxfunctionsmodule as aux import fortransubroutines as fortran start_time = time.time() StackImage = np.zeros( (parametro.Nz, parametro.Nx)) # variable responsible for storing the migrated images # Loads the source position Fx, Fz = np.loadtxt('posicoes_fonte.dat', dtype='int', unpack=True) N_shot = np.size(Fx) # Generate binary with final image fortran.savefinalimage(parametro.Nz,\ parametro.Nx,\ parametro.N_shot,\ parametro.caminho_migracao,\ parametro.nome_prin) # plot Stack image generated in fortran filename_imagem = "../Imagem/" '%s' % (parametro.nome_prin) + "_FinalImage.bin" StackImage = aux.readbinaryfile(parametro.Nz, parametro.Nx, filename_imagem) aux.plotmodel(StackImage, 'gray') pl.show() elapsed_time_python = time.time() - start_time print("Tempo de processamento python = ", elapsed_time_python, "s")
import numpy as np import multiprocessing as mp # Modules created import parametro import auxfunctionsmodule as aux import fortransubroutines as fortran # This variable will tell fortran that # we want to do the modelling of the seismograms regTTM = 0 start_time = time.time() # Velocity Model used C = aux.readbinaryfile(parametro.Nz, parametro.Nx, parametro.modelocamadadeagua) aux.plotmodel(C, 'jet') # Define the source's samples lixo, fonte = np.loadtxt('wavelet_ricker.dat', unpack=True) Nfonte = np.size(fonte) # Loads the source position Fx, Fz = np.loadtxt('posicoes_fonte.dat', dtype='int', unpack=True) # This part of the script is responsable for the homogeneous seismogram creation print("Modelagem com modelo Homogeneo para remover onda direta") # Case 1: Only one shot if parametro.N_shot == 1: print("Fx =", Fx, "Fz =", Fz, "shot", parametro.N_shot)
import numpy as np import multiprocessing as mp # Modules created import parametro import auxfunctionsmodule as aux import fortransubroutines as fortran # This variable will tell fortran that # we want to do the modelling of the seismograms regTTM = 0 start_time = time.time() # Velocity Model used C = aux.readbinaryfile(parametro.Nz,parametro.Nx,parametro.modeloreal) aux.plotmodel(C,'jet') # Creates the seismic source fortran.wavelet(1,parametro.dt,1,parametro.f_corte) # Shows the seismic pulse aux.plotgraphics(2,'wavelet_ricker.dat', 'k') #pl.show() # Define the source's samples lixo, fonte = np.loadtxt('wavelet_ricker.dat', unpack = True) # Creates the damping layer function func_amort = aux.amort(parametro.fat,parametro.nat) aux.plotgraphics(1,'f_amort.dat','k')
import numpy as np import multiprocessing as mp # Modules created import parametro import auxfunctionsmodule as aux import fortransubroutines as fortran # This variable will tell fortran tha we want to do the modelling of the transit time matrix regTTM = 1 start_time = time.time() # Velocity Model used C = aux.readbinaryfile(parametro.Nz, parametro.Nx, parametro.modelosuavizado) aux.plotmodel(C, 'jet') # Create the seismic source #parametro.f_corte = 20 fortran.wavelet(1, parametro.dt, 1, parametro.f_corte) # Shows the seismic pulse aux.plotgraphics(2, 'wavelet_ricker.dat', 'k') #pl.show() # Define the source's samples lixo, fonte = np.loadtxt('wavelet_ricker.dat', unpack=True)