A python packages for geophysical data processing modeling, inversion and interpretation. Please check here: for official website and package.
Teknik Geofisika, Universitas Pertamina Jl. Teuku Nyak Arief, Simprug, South Jakarta, DKI Jakarta, Indonesia, 12220. email: metkom.up@gmail.com
pip3 install -r requirements.txt
pip install PyOSGPUP
or
pip3 install PyOSGPUP
User manual for this package avalaible in Bahasa (download). Short example:
1. Create wavelet
importnumpyasnpimportPyOSGPUP.waveletaswavimportmatplotlib.pyplotaspltt=np.arange(-0.4/2, (0.4/2) +0.004, 0.004)
# frequencyfgR=np.array([10]) # 1 freqfgO=np.array([5, 10, 15, 20]) # 4 fredfgK=np.array([5, 10]) # 2 fredgR=wav.getRicker(fgR, t)
gO=wav.getOrmsby(fgO, t)
gK=wav.getKlauder(fgK, t)
plt.figure()
plt.plot(t, gR, linewidth=2, color="blue")
plt.plot(t, gO, linewidth=2, color="red")
plt.plot(t, gK, linewidth=2, color="green")
plt.title('Wavelet')
plt.xlabel('time [ms]')
plt.ylabel('amplitude')
plt.legend(['Ricker', 'Ormsby', 'Kaluder'])
plt.show()
2. Read data segy
Please put shotgather.sgy file in your directory code.
importPyOSGPUP.segypyassegypyfilename='shotgather.sgy'# Set verbose levelsegypy.verbose=1SH=segypy.getSegyHeader(filename)
# Read Segy File
[Data, SH, STH] =segypy.readSegy(filename)
# Plot Segy filwescale=1e-9# wiggle plotsegypy.wiggle(Data, SH, 1e-9)
# image plotsegypy.image(Data, SH, scale)
3. Create synthetic seismogram
fromPyOSGPUP.synthe_seismoimportplotLogsInteract, plotTimeDepth, plotSeismogramimportmatplotlib.pyplotasplt# Synthetic Seismogramd= [0., 50., 100.] # Position of top of each layer (m)v= [500., 1000., 1500.] # Velocity of each layer (m/s)rho= [2000., 2300., 2500.] # Density of each layer (kg/m^3)wavtyp='RICKER'# Wavelet typewavf=50.# Wavelet FrequencyusingT=False# Use Transmission Coefficients?plotLogsInteract(d[1], d[2], rho[0], rho[1], rho[2], v[0], v[1], v[2])
plt.show()
plotTimeDepth(d, v)
plt.show()
plotSeismogram(d, rho, v, 50., wavA=1., noise=0., usingT=True, wavtyp='RICKER')
plt.show()


If you find this project useful for your research, please use the following BibTeX entry.