# Time axis
t0 = 0.
tn = 500.
dt_shot = 4.
dt = 0.64  #model.critical_dt*.8
nt = int(tn / dt + 1)
time = np.linspace(tstart, tn, nt)

#########################################################################################

rec_coords = np.concatenate(
    (xrec.reshape(-1, 1), yrec.reshape(-1, 1), zrec.reshape(-1, 1)), axis=1)
print('Number of receivers: ', rec_coords.shape[0])

# Source coordinates
src_coordinates = np.array([xsrc, ysrc, zsrc])
src = RickerSource(name='src', grid=model.grid, f0=0.02, time=time, npoint=1)
src.coordinates.data[0, 0] = src_coordinates[0]
src.coordinates.data[0, 1] = src_coordinates[1]
src.coordinates.data[0, 2] = src_coordinates[2]

#########################################################################################

# Data and RTM
d_obs, u0, summary1 = forward(model, src.coordinates.data, rec_coords,
                              src.data)

# Save shot
filename = rootpath + '/overthrust/data/overthrust_3D_data_source_' + str(idx)
save_rec(d_obs, src_coordinates, filename, nt)
Ejemplo n.º 2
0
dt_shot = 4.
nt = tn / dt_shot + 1
dt = 0.64  #model.critical_dt*.8
time = TimeAxis(start=t0, step=dt, stop=tn)

#########################################################################################

# Receiver coordinate
rec_coords = np.concatenate(
    (xrec.reshape(-1, 1), yrec.reshape(-1, 1), zrec.reshape(-1, 1)), axis=1)

# Source coordinates
src_coordinates = np.array([xsrc, ysrc, zsrc])
src = RickerSource(name='src',
                   grid=model.grid,
                   f0=0.02,
                   time_range=time,
                   npoint=1)
src.coordinates.data[0, :] = src_coordinates[:]

# Read Wavelet
wavelet = np.load('../data/wavelet/wavelet_3D.npy')
src.data[:] = wavelet[0:len(src.data)]

#########################################################################################

# # Devito operator
tti = TTIPropagators(model, space_order=8)
#
# # Data
# d_obs= tti.born(src, rec_coords)[0]
Ejemplo n.º 3
0
                   dm=dm,
                   vp=v0,
                   rho=rho0,
                   space_order=8,
                   dt=model.critical_dt)

# Time axis
t0 = 0.
tn = 1000.
dt = model.critical_dt
nt = int(1 + (tn - t0) / dt)
time_axis = np.linspace(t0, tn, nt)

# Source
f1 = 0.010  # kHz
src = RickerSource(name='src', grid=model.grid, f0=f1, time=time_axis)
src.coordinates.data[0, :] = np.array(model.domain_size) * 0.5
src.coordinates.data[0, -1] = 20.

# Receiver for observed data
nrec = shape[0]
rec_t = Receiver(name='rec_t', grid=model.grid, npoint=nrec, ntime=nt)
rec_t.coordinates.data[:, 0] = np.linspace(0., (shape[0] - 1) * spacing[0],
                                           num=nrec)
rec_t.coordinates.data[:, 1] = 20.

# Interface (Level 1)
d_obs = forward_rec(model,
                    src.coordinates.data,
                    src.data,
                    rec_t.coordinates.data,
#########################################################################################

# Time axis
t0 = 0.
tn = 2000.
dt_shot = 4.
nt = int(tn / dt_shot + 1)
dt = 0.64  #model.critical_dt*.9
time = TimeAxis(start=t0, step=dt, stop=tn)

#########################################################################################

# Coordinates
src = RickerSource(name='src',
                   grid=model.grid,
                   f0=.015,
                   time_range=time,
                   npoint=1)
src.coordinates.data[0, 0] = xsrc
src.coordinates.data[0, 1] = zsrc

nrec = len(xrec)
rec_coords = np.empty((nrec, 2))
rec_coords[:, 0] = xrec
rec_coords[:, 1] = zrec

#########################################################################################

# Devito operator
tti = TTIPropagators(model, space_order=so)