This documentation is not for the latest stable Salvus version.
# initialize notebook
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import obspy
import salvus.namespace as sn
plt.rcParams["figure.figsize"] = (10, 8)
def get_marmousi():
nx, ny = 2301, 751
dx, dy = 4.0, 4.0
rho = np.empty((ny, nx))
st = obspy.read("data/marmousi_density.segy.gz")
for _i, tr in enumerate(st):
rho[_i, :] = tr.data
vp = np.empty((ny, nx))
st = obspy.read("data/marmousi_velocity.segy.gz")
for _i, tr in enumerate(st):
vp[_i, :] = tr.data
x = np.arange(nx) * dx
y = np.arange(ny) * dy
return x, y, vp, rho
x, y, vp, rho = get_marmousi()
fig, axes = plt.subplots(2, 1)
axes[0].imshow(vp)
axes[1].imshow(rho)
plt.show()