Closed krober10nd closed 2 years ago
Here's how to get the velocity model grid, in case you're wondering. h5
format is a good choice for doing the io.
import h5py
import numpy as np
# import matplotlib.pyplot as plt
# filename = "overthrust_2D_initial_model.h5"
filename = "overthrust_3D_true_model.h5"
with h5py.File(filename, "r") as f:
# List all groups
print("Keys: %s" % f.keys())
a_group_key = list(f.keys())[2]
# Get the data
data = list(f[a_group_key])
data = np.array(data)
# convert to m/s
data = (1 / (data ** (1 / 2))) * 1000.0
# print(data)
print(data.shape)
print(np.amin(data))
print(np.amax(data))
you may want to reduce the size of the problem initially as in its full extent there's a 128 million grid points :]