In [8]:
import splitwavepy as sw
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import gridspec
When a shear wave travels through an anisotropic material it splits its energy into two orthogonally polarised quasi-shear waves.
These waves travel at different speeds causing them to split.
This process is parameterised in terms of the polarisation of the fast wave ($\phi$) and the delay time between the fast and slow wave arrivals ($\delta t$).
In [25]:
# Generate a starting wavelet
a = sw.Pair(delta=0.1, geom='ray')
a.plot()
In [26]:
# Rotate to fast/slow directions
a.rotateto(126)
a.plot()
In [27]:
# Apply lag
a.lag(3.0)
a.plot()
In [28]:
# Rotate back to polarisation
a.rotateto(0)
a.plot()
In [29]:
def grid_pm(pair):
lags = np.linspace(0,5,15, endpoint=False)
degs = np.linspace(90,-90,15, endpoint=False)
# fig, axw = plt.subplots()
# axw.set_xlim([0,5])
# axw.set_ylim([-90,90])
fig = plt.figure(figsize=(12, 12))
# plt.subplot(111)
gs = gridspec.GridSpec(15, 15)
ii = -1
for ang in degs:
for lag in lags:
ii = ii + 1
ax = plt.subplot(gs[ii])
# ensure trace1 at zero angle
copy = pair.copy()
copy.unsplit(ang, lag)
copy._ppm(ax, cmplabels=['',''])
plt.show()
grid_pm(a)
In [64]:
ta = sw.TransM(a, lags=(5,), pol=0)
ta.plot(vals = ta.lam2, title='Transverse Minimisation Method')
In [31]:
ea = sw.EigenM(a, lags=(5,))
ea.plot(vals=ea.lam2,title='Eigenvalue Method')
In [32]:
ca = sw.CrossM(a, lags=(5,))
ca.plot()
In [59]:
# Generate a starting wavelet
b = sw.Pair(delta=0.1, geom='ray', noise=0.04, split=(126,3.0), pol=0)
b.plot()
In [60]:
grid_pm(b)
In [61]:
tb = sw.TransM(b, lags=(5,), pol=0)
tb.plot(vals = tb.lam2, title='Transverse Minimisation Method')
In [62]:
eb = sw.EigenM(b, lags=(5,))
eb.plot(vals = eb.lam2, title='Eigenvalue Method')
In [63]:
cb = sw.CrossM(b, lags=(5,))
cb.plot(title='Cross Correlation Method')
In [84]:
a.plot()
In [106]:
def grid_pm(pair):
lags = np.linspace(0,5,15, endpoint=False)
degs = np.linspace(-90,90,15, endpoint=False)
fig = plt.figure(figsize=(12, 12))
ax = plt.gca()
ax.set_xlim([0,5])
ax.set_ylim([-90,90])
gs = gridspec.GridSpec(15, 15)
ii = -1
for ang in degs:
for lag in lags:
ii = ii + 1
ax = plt.subplot(gs[ii])
# ensure trace1 at zero angle
copy = pair.copy()
copy.unsplit(ang, lag)
copy._ppm(ax, cmplabels=['',''])
plt.show()
In [58]:
lags
Out[58]:
In [62]:
a.plot()
In [65]:
b = a.copy()
x = b.x
y = b.y
t = b.t()
In [68]:
plt.plot(t,x,t,y)
plt.show()
In [69]:
x2,y2 = sw.core.rotate(x, y, 30)
plt.plot(t,x2,t,y2)
plt.show()
In [74]:
x3, y3 = sw.core.unsplit(x, y, 30, 20)
plt.plot(y3,x3)
plt.show()
In [72]:
y.size
Out[72]:
In [105]:
fig, ax = plt.subplots()
ax.set_xlim([0,5])
plt.show()
In [ ]: