mirror of
https://github.com/wassname/simpegSeis.git
synced 2026-09-09 11:34:31 +08:00
test commit
This commit is contained in:
+11677
-9303
File diff suppressed because one or more lines are too long
+32
-9
@@ -5,7 +5,7 @@ def clipsign (value, clip):
|
||||
clipthese = abs(value) > clip
|
||||
return value * ~clipthese + np.sign(value)*clip*clipthese
|
||||
|
||||
def wiggle (traces,skipt=1,scale=1.,lwidth=.1,offsets=None,redvel=0.,tshift=0.,sampr=1.,clip=10.,color='black',fill=True,line=True):
|
||||
def wiggle (traces, skipt=1,scale=1.,lwidth=.1,offsets=None,redvel=0., manthifts=None, tshift=0.,sampr=1.,clip=10., dx=1., color='black',fill=True,line=True, ax=None):
|
||||
|
||||
ns = traces.shape[1]
|
||||
ntr = traces.shape[0]
|
||||
@@ -14,6 +14,8 @@ def wiggle (traces,skipt=1,scale=1.,lwidth=.1,offsets=None,redvel=0.,tshift=0.,s
|
||||
|
||||
if (offsets is not None):
|
||||
shifts = timereduce(offsets, redvel, tshift)
|
||||
elif (manthifts is not None):
|
||||
shifts = manthifts
|
||||
else:
|
||||
shifts = np.zeros((ntr,))
|
||||
|
||||
@@ -22,11 +24,32 @@ def wiggle (traces,skipt=1,scale=1.,lwidth=.1,offsets=None,redvel=0.,tshift=0.,s
|
||||
trace[0] = 0
|
||||
trace[-1] = 0
|
||||
|
||||
if (line):
|
||||
plt.plot(i + clipsign(trace / scale, clip), t - shifts[i], color=color, linewidth=lwidth)
|
||||
if (fill):
|
||||
for j in range(ns):
|
||||
if (trace[j] < 0):
|
||||
trace[j] = 0
|
||||
plt.fill(i + clipsign(trace / scale, clip), t - shifts[i], color=color, linewidth=0)
|
||||
plt.grid(True)
|
||||
if ax == None:
|
||||
if (line):
|
||||
plt.plot(i*dx + clipsign(trace / scale, clip), t - shifts[i], color=color, linewidth=lwidth)
|
||||
if (fill):
|
||||
for j in range(ns):
|
||||
if (trace[j] < 0):
|
||||
trace[j] = 0
|
||||
plt.fill(i*dx + clipsign(trace / scale, clip), t - shifts[i], color=color, linewidth=0)
|
||||
else:
|
||||
if (line):
|
||||
ax.plot(i*dx + clipsign(trace / scale, clip), t - shifts[i], color=color, linewidth=lwidth)
|
||||
if (fill):
|
||||
for j in range(ns):
|
||||
if (trace[j] < 0):
|
||||
trace[j] = 0
|
||||
ax.fill(i*dx + clipsign(trace / scale, clip), t - shifts[i], color=color, linewidth=0)
|
||||
|
||||
def PrimaryWave(x, velocity, tinterp):
|
||||
return tinterp + 1./velocity*x
|
||||
|
||||
def ReflectedWave(x, velocity, tinterp):
|
||||
time = np.sqrt(x**2/velocity**2+tinterp**2)
|
||||
return time
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user