Skip to content

Commit

Permalink
debug rf2depth: invalid value encountered in sqrt #84
Browse files Browse the repository at this point in the history
  • Loading branch information
xumi1993 committed Apr 26, 2024
1 parent b9081cd commit ad716ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions seispy/core/pertmod.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class Mod3DPerturbation:
def __init__(self, modpath, YAxisRange, velmod='iasp91'):
dep_mod = DepModel(YAxisRange, velmod=velmod)
self.model = np.load(modpath)
new1dvp = interp1d(dep_mod.depthsraw, dep_mod.vpraw)(self.model['dep'])
new1dvs = interp1d(dep_mod.depthsraw, dep_mod.vsraw)(self.model['dep'])
new1dvp = interp1d(dep_mod.depths, dep_mod.vp)(self.model['dep'])
new1dvs = interp1d(dep_mod.depths, dep_mod.vs)(self.model['dep'])
new1dvp, _, _ = np.meshgrid(new1dvp, self.model['lat'], self.model['lon'], indexing='ij')
new1dvs, _, _ = np.meshgrid(new1dvs, self.model['lat'], self.model['lon'], indexing='ij')
self.dvp = (self.model['vp'] - new1dvp) / new1dvp
Expand Down

0 comments on commit ad716ae

Please sign in to comment.