Exemple #1
0
theta = read_h5_model('../data/models/theta_with_salt.h5')
phi = read_h5_model('../data/models/phi_with_salt.h5')
m0 = read_h5_model('../data/models/migration_velocity.h5')
dm = read_h5_model('../data/models/perturbation.h5')
delta[delta >= epsilon] = .5 * epsilon[delta >= epsilon]

shape = (801, 801, 267)
origin_full = (0.0, 0.0, 0.0)
spacing = (12.5, 12.5, 12.5)
so = 8

# Read coordinates
file_idx = '../data/geometry/source_indices.npy'
file_src = '../data/geometry/src_coordinates.h5'
file_rec = '../data/geometry/rec_coordinates.h5'
xsrc_full, ysrc_full, zsrc_full = read_coordinates(file_src)
xrec_full, yrec_full, zrec_full = read_coordinates(file_rec)
idx = np.load(file_idx)[shot_no]
xsrc = xsrc_full[idx]
ysrc = ysrc_full[idx]
zsrc = zsrc_full[idx]

buffersize = 500  # in m
maxoffset = 13987.5  # in m


def limit_receiver_grid(xsrc, ysrc, xrec, yrec, zrec, maxoffset):

    xmin = np.max([xsrc - maxoffset, 12.5])
    xmax = np.min([xsrc + maxoffset, 9987.5])
    ymin = np.max([ysrc - maxoffset, 12.5])
                                       epsilon]  # fix thomsen parameters

# Read geometry
source_indices = np.load(rootpath + '/overthrust/geometry/source_indices.npy',
                         allow_pickle=True)
idx = source_indices[run_id]
print('Process source no. ', idx, ' out of ', batchsize)

shape_full = (801, 801, 267)
origin_full = (0.0, 0.0, 0.0)
spacing = (12.5, 12.5, 12.5)

# Read coordinates and source index
file_src = rootpath + '/overthrust/geometry/src_coordinates.h5'
file_rec = rootpath + '/overthrust/geometry/rec_coordinates.h5'
xsrc, ysrc, zsrc = read_coordinates(file_src)
xrec, yrec, zrec = read_coordinates(file_rec)
xsrc = xsrc[idx]
ysrc = ysrc[idx]
zsrc = zsrc[idx]
print('Source location: ', xsrc, ', ', ysrc, ', ', zsrc)

# Limit receiver grid
buffersize = 500  # in m
maxoffset = 3787.5  # x/y direction in m
xrec, yrec, zrec = limit_receiver_grid(xsrc, ysrc, xrec, yrec, zrec, maxoffset)

# Restrict models to receiver grid
print('Original shape: ', shape_full, ' and origin: ', origin_full)
m0, shape, origin = restrict_model_to_receiver_grid(xsrc,
                                                    xrec,
Exemple #3
0
m0 = read_h5_model('../data/models/migration_velocity_2D.h5')
dm = read_h5_model('../data/models/perturbation_2D.h5')

# Set dm to zero in water
dm[:, 0:29] = 0.

shape_full = (801, 267)
origin_full = (0.0, 0.0)
spacing = (12.5, 12.5)
so = 12

# Read source coordinates
shot_no = 0
file_idx = '../data/geometry/source_indices.npy'
file_src = '../data/geometry/src_coordinates.h5'
xsrc_full, ysrc_full, zsrc_full = read_coordinates(file_src)
idx = np.load(file_idx, allow_pickle=True)[shot_no]

xsrc = 7000.
zsrc = 300 - 12.5

# Receivers coordinates
nrec = 799
xrec_full = np.array(np.linspace(12.5, 9987.5, nrec))
zrec_full = np.array(np.linspace(6., 6., nrec))

# Limit receiver grid
buffersize = 500  # in m
maxoffset = 3787.5  # in m
xrec, zrec = limit_receiver_grid(xsrc, xrec_full, zrec_full, maxoffset)