Skip to content

Commit

Permalink
fix 1D raytracing +3D time difference correction in rf2depth #93
Browse files Browse the repository at this point in the history
  • Loading branch information
xumi1993 committed Nov 26, 2024
1 parent 7525d42 commit 51164b8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
15 changes: 14 additions & 1 deletion seispy/ccppara.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self):
self.stalist = 'sta.lst'
self.peakfile = 'good_410_660.dat'
self.adaptive= False
self.velmod = ''
self.velmod = 'iasp91'
self.stack_sta_list = ''
self.domperiod = 5
self.shape = 'circle'
Expand Down Expand Up @@ -59,6 +59,19 @@ def shape(self, value):
else:
self._shape = value.lower()

@property
def velmod(self):
return self._velmod

@velmod.setter
def velmod(self, value):
if not isinstance(value, str):
raise TypeError('ccppara.velmod must be str type')
elif value == "":
self._velmod = 'iasp91'
else:
self._velmod = value


def ccppara(cfg_file):
""" Read configure file for CCP stacking
Expand Down
14 changes: 9 additions & 5 deletions seispy/rf2depth_makedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ def makedata(self, psphase=1):
if self.ismod1d:
if self.modfolder1d is not None:
velmod = _load_mod(self.modfolder1d, _sta.station)

else:
velmod = self.cpara.velmod

Expand All @@ -169,12 +168,17 @@ def makedata(self, psphase=1):
else:
### 3d model interp
if self.raytracing3d:
pplat_s, pplon_s, pplat_p, pplon_p, newtpds = psrf_3D_raytracing(stadatar, self.cpara.depth_axis, self.mod3d, srayp=self.srayp, sphere=sphere)
pplat_s, pplon_s, pplat_p, pplon_p, newtpds = psrf_3D_raytracing(
stadatar, self.cpara.depth_axis, self.mod3d, srayp=self.srayp, sphere=sphere
)
else:
pplat_s, pplon_s, pplat_p, pplon_p, raylength_s, raylength_p, tps = psrf_1D_raytracing(
stadatar, self.cpara.depth_axis, srayp=self.srayp, sphere=sphere, phase=psphase)
newtpds = psrf_3D_migration(pplat_s, pplon_s, pplat_p, pplon_p, raylength_s, raylength_p,
tps, self.cpara.depth_axis, self.mod3d)
stadatar, self.cpara.depth_axis, velmod=self.cpara.velmod, srayp=self.srayp, sphere=sphere, phase=psphase
)
newtpds = psrf_3D_migration(
pplat_s, pplon_s, pplat_p, pplon_p, raylength_s, raylength_p,
tps, self.cpara.depth_axis, self.mod3d
)
if stadatar.prime_phase == 'P':
piercelat, piercelon = pplat_s, pplon_s
else:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
long_description = fh.read()


VERSION = "1.3.8"
VERSION = "1.3.9"
setup(name='python-seispy',
version=VERSION,
author='Mijian Xu',
Expand Down

0 comments on commit 51164b8

Please sign in to comment.