Closed sphcn closed 8 years ago
@sphcn Sorry, I saw your issue only right now. The warning is no problem. The vertical slowness is calculated for all depth. A root of 0 corresponds to the turning point of the ray. Depths with negative root cannot be reached.
The turning point depends on slowness:
import matplotlib.pyplot as plt
import numpy as np
from rf.simple_model import load_model
model = load_model()
slow = np.linspace(0, 0.3, 100)
turnp = []
turns = []
for s in slow:
qp, qs = model._calc_vertical_slowness(s)
znan = model.z[np.isnan(qp)]
turnp.append(znan[0] if len(znan) > 0 else model.z[-1])
znan = model.z[np.isnan(qs)]
turns.append(znan[0] if len(znan) > 0 else model.z[-1])
plt.plot(111.2*slow, turnp, 111.2*slow, turns)
plt.xlabel(u'slowness (s/°)')
plt.ylabel(u'turning point P / S waves (m)')
plt.show()
......../home/sph/seismo/rf/rf/simple_model.py:83: RuntimeWarning: invalid value encountered in sqrt qp = np.sqrt(self.vp ** (-2) - slowness ** 2)
It happened when I test moveout in test_simple_modle.py. How can I fix this warning? What is the limit of slowness? Appreciate your job very much!