Skip to content

Commit

Permalink
0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
JintaoLee-Roger committed Feb 5, 2024
1 parent 2dd60a7 commit e259523
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 185 deletions.
166 changes: 0 additions & 166 deletions docs/sg_execution_times.rst

This file was deleted.

2 changes: 1 addition & 1 deletion examples/1D/0-plot_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import numpy as np
import cigvis

root = '/Users/lijintao/work/mygit/pyseisview/data/'
root = '../../data/'
sxp = root + 'seis_h360x600x400.dat'
ni, nx, nt = 400, 600, 360

Expand Down
2 changes: 1 addition & 1 deletion examples/1D/1-plot_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import cigvis
import matplotlib.pyplot as plt

root = '/Users/lijintao/work/mygit/pyseisview/data/'
root = '../../data/'
sxp = root + 'seis_h360x600x400.dat'
ni, nx, nt = 400, 600, 360

Expand Down
2 changes: 1 addition & 1 deletion examples/1D/2-plot_multi_traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import cigvis
import matplotlib.pyplot as plt

root = '/Users/lijintao/work/mygit/pyseisview/data/'
root = '../../data/'
sxp = root + 'seis_h360x600x400.dat'
ni, nx, nt = 400, 600, 360

Expand Down
2 changes: 1 addition & 1 deletion examples/2D/08-plot2d_disc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import numpy as np
import cigvis

root = '/Users/lijintao/work/mygit/pyseisview/data/'
root = '../../data/'
sxp = root + 'seis_h360x600x400.dat'
lxp = root + 'label_h360x600x400.dat'
ni, nx, nt = 400, 600, 360
Expand Down
2 changes: 1 addition & 1 deletion examples/2D/09-plot2d_disc_cbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from cigvis import colormap
import matplotlib.pyplot as plt

root = '/Users/lijintao/work/mygit/pyseisview/data/'
root = '../../data/'
sxp = root + 'seis_h360x600x400.dat'
lxp = root + 'label_h360x600x400.dat'
ni, nx, nt = 400, 600, 360
Expand Down
2 changes: 1 addition & 1 deletion examples/more_demos/011-disc_cbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def show_discrete_cbar(d):


if __name__ == '__main__':
root = '/Users/lijintao/work/mygit/pyseisview/data/'
root = '../../data/'
lxp = root + 'label_h360x600x400.dat'
ni, nx, nt = 400, 600, 360

Expand Down
2 changes: 1 addition & 1 deletion examples/more_demos/020-overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def show(bg, fg):


if __name__ == '__main__':
root = '/Users/lijintao/work/mygit/pyseisview/data/'
root = '../../data/'
sxp = root + 'seis_h360x600x400.dat'
lxp = root + 'label_h360x600x400.dat'
ni, nx, nt = 400, 600, 360
Expand Down
1 change: 0 additions & 1 deletion examples/more_demos/061-well_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def show(sx, points, values, null_value):
v2 = v.copy()
v2[v2 < -900] = v[v!=-999.25].min()
logs1 = np.concatenate([points, v2[:, np.newaxis]], axis=1)
print(v2.min(), v2.max())
nodes0 = cigvis.create_slices(sx)
nodes0 += cigvis.create_Line_logs(
logs1[:, :4],
Expand Down
18 changes: 8 additions & 10 deletions examples/more_demos/070-f3.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def load_wellLog(p):
x = [259, 619, 339, 141]
y = [33, 545, 704, 84]
z = np.arange(0, 0.2 * npoints, 0.2)
v = np.fromfile(p, '>f4').reshape(nlog, npoints)
v = np.fromfile(p, np.float32).reshape(nlog, npoints)
v = 0.5 * np.log(v)

nodes = []
Expand All @@ -45,36 +45,34 @@ def load_wellLog(p):

if __name__ == '__main__':

root = '/Users/lijintao/Downloads/F3/f3d/data/'
root = '/Users/lijintao/Downloads/data/F3/'
seisp = root + 'seis.dat'
saltp = root + 'salt.dat'
hz1p = root + 'hz1.dat'
hz2p = root + 'hz2.dat'
hz2p = root + 'hz.dat'
uncp = root + 'unc.dat'
unc1p = root + 'unc1.dat'
unc2p = root + 'unc2.dat'
ni, nx, nt = 591, 951, 362
shape = (ni, nx, nt)

# seismic slices
seis = np.memmap(seisp, '>f4', 'c', shape=shape)
seis = np.memmap(seisp, np.float32, 'c', shape=shape)
nodes = cigvis.create_slices(seis,
pos=[ni - 2, 25, nt - 2],
cmap='gray',
clim=[-2.0, 1.5])

# salt (geologic body)
salt = np.memmap(saltp, '>f4', 'c', shape=shape)
salt = np.memmap(saltp, np.float32, 'c', shape=shape)
nodes += cigvis.create_bodys(salt, 0.0, 0.0, color='cyan')

# hrizon (surface)
hz2 = np.fromfile(hz2p, '>f4').reshape(ni, nx)
hz2 = np.fromfile(hz2p, np.float32).reshape(ni, nx)
nodes += cigvis.create_surfaces([hz2], color='yellow')

# displacement field of unconformity (volume)
unc = np.fromfile(uncp, '>f4').reshape(shape).astype(np.float32)
unc = np.fromfile(uncp, np.float32).reshape(shape).astype(np.float32)
# unconformity (surface)
unc2 = np.fromfile(unc2p, '>f4').reshape(ni, nx).astype(np.float32)
unc2 = np.fromfile(unc2p, np.float32).reshape(ni, nx).astype(np.float32)
nodes += cigvis.create_surfaces([unc2], volume=unc, value_type='amp')

# well logs
Expand Down
2 changes: 1 addition & 1 deletion examples/more_demos/071-f3.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def load_wellLog(p):

nodes += load_wellLog(root + 'logs.dat')

# nodes += cigvis.create_fault_skin(root + 'skins/')
nodes += cigvis.create_fault_skin(root + 'skins/')

cigvis.plot3D(nodes,
azimuth=-65.0,
Expand Down

0 comments on commit e259523

Please sign in to comment.