xumi1993 / seispy

Python module of seismology and receiver functions
https://seispy.xumijian.me
GNU General Public License v3.0
92 stars 29 forks source link

rf2depth: invalid value encountered in sqrt #84

Closed hesamsaeidi closed 4 months ago

hesamsaeidi commented 5 months ago

While running the rf2depth function, the ray parameter values are getting an error. It happens with or without rayparameter file in the config. HERE IS THE ERROR:

rf2depth ccp.cfg 2024-04-16 12:28:09,019 [RF2depth] INFO: the 1th/1 station with 73 events /Users/xxx/anaconda3/envs/seispy/lib/python3.11/site-packages/seispy/core/depmodel.py:355: RuntimeWarning: invalid value encountered in sqrt hor_dis = np.cumsum((self.dz / radius) / np.sqrt((1. / (rayp * 2. (radius / vel) -2)) - 1)) /Users/xxx/anaconda3/envs/seispy/lib/python3.11/site-packages/seispy/core/depmodel.py:275: RuntimeWarning: invalid value encountered in sqrt np.sqrt((radius / self.vp) 2 - raypp * 2))

xumi1993 commented 4 months ago

This is a warning rather than an error. It will not affect your results. I will eliminate it in the next version.