Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moveout test in test_simple_model.py #1

Closed
sphcn opened this issue Oct 26, 2015 · 1 comment
Closed

moveout test in test_simple_model.py #1

sphcn opened this issue Oct 26, 2015 · 1 comment

Comments

@sphcn
Copy link

sphcn commented Oct 26, 2015

......../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!

@trichter
Copy link
Owner

@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()

turningpoints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants