diff --git a/seispy/ccppara.py b/seispy/ccppara.py index ca3d869..b58faa6 100644 --- a/seispy/ccppara.py +++ b/seispy/ccppara.py @@ -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' @@ -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 diff --git a/seispy/rf2depth_makedata.py b/seispy/rf2depth_makedata.py index 209534c..2dde17c 100644 --- a/seispy/rf2depth_makedata.py +++ b/seispy/rf2depth_makedata.py @@ -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 @@ -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: diff --git a/setup.py b/setup.py index 0e91e5b..746c82d 100644 --- a/setup.py +++ b/setup.py @@ -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',