AttributeError: 'TauModel' object has no attribute 'ray_param'
has bit my code. I can get around it by specifying a subset of phases.
However there is interim Taup code released to the github. However I
have not yet figured out how to integrate it into an operational Obspy
for this computer! What do I need to do in order to move the release
from the code on Github into something I can test here on my windows
system? Finding documentation on how to use the test code has been
elusive. It has eluded me, anyway. I'm trying to use TauP as a tool
for helping us form arrival time windows for data extraction from our
local stations, among other things. It was running on my computer at
the office (with older code) but crashes on the laptop with this above
error.
I have added it to my github, and downloaded the repository. Anyone
have a cheat sheet on how I can bring this code up to running status
on the computer and test it? I have the 0.10.2 distribution running
under Anaconda.
-Dan Burk, Michigan State University.
---------------------------------------------------------------------------AttributeError
Traceback (most recent call
last)<ipython-input-27-db63761c1f4f> in <module>() 2 stlon =
-84.390 # NE8K station coordinates 3 ----> 4 events =
get_arrivals(stlat,stlon) 5 # Each events item contains the
origina quake information plus distance from quake, 6 #
forecasted first arrival, and forecasted last arrival
<ipython-input-26-c8687e1ebaf4> in get_arrivals(stlat, stlon) 23
event[i].append(result['distance']) 24 ---> 25
arrivals = model.get_travel_times(source_depth_in_km=depth,distance_in_degree=result['distance'])#,\
26 # phase_list =
['P','PcP','PP','PKiKP','S','SS','ScS','SKiKS']) 27 #
Add 1st expected arrival to the event
C:\Anaconda\lib\site-packages\obspy-0.10.2-py2.7-win-amd64.egg\obspy\taup\tau.pyc
in get_travel_times(self, source_depth_in_km, distance_in_degree,
phase_list) 340 tt = TauP_Time(self.model, phase_list,
source_depth_in_km, 341
distance_in_degree)--> 342 tt.run() 343 return
Arrivals(sorted(tt.arrivals, key=lambda x: x.time), 344
model=self.model)
C:\Anaconda\lib\site-packages\obspy-0.10.2-py2.7-win-amd64.egg\obspy\taup\taup_time.pyc
in run(self) 35 arrival times will be in self.arrivals.
36 """---> 37 self.depth_correct(self.depth) 38
self.calculate(self.degrees) 39
C:\Anaconda\lib\site-packages\obspy-0.10.2-py2.7-win-amd64.egg\obspy\taup\taup_time.pyc
in depth_correct(self, depth) 47
self.depth_corrected_model = self.model.depth_correct(depth) 48
self.arrivals = ---> 49 self.recalc_phases()
50 self.source_depth = depth 51
C:\Anaconda\lib\site-packages\obspy-0.10.2-py2.7-win-amd64.egg\obspy\taup\taup_time.pyc
in recalc_phases(self) 70 try: 71
seismic_phase = SeismicPhase(temp_phase_name,---> 72
self.depth_corrected_model)
73 new_phases.append(seismic_phase) 74
except TauModelError:
C:\Anaconda\lib\site-packages\obspy-0.10.2-py2.7-win-amd64.egg\obspy\taup\seismic_phase.pyc
in __init__(self, name, tMod) 108 self.puristName =
self.create_purist_name(tMod) 109 self.parse_name(tMod)-->
110 self.sum_branches(tMod) 111 112 def
create_purist_name(self, tMod):
C:\Anaconda\lib\site-packages\obspy-0.10.2-py2.7-win-amd64.egg\obspy\taup\seismic_phase.pyc
in sum_branches(self, tMod) 616 and
self.minRayParamIndex == len(tMod.ray_params) - 1: 617
# All ray parameters are valid so just copy:--> 618
self.ray_param = tMod.ray_param.copy() 619 elif
self.maxRayParamIndex == self.minRayParamIndex: 620 #
if "Sdiff" in self.name or "Pdiff" in self.name:
AttributeError: 'TauModel' object has no attribute 'ray_param'