Taup error - How do I integrate the latest Taup test code into my 0.10.2 distribution?

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'

Hi all,

I had a problem with my computer and now I have installed a new version of linux (fedora 21).

Now I have downloaded the osbpy-10.0.2 and I want to run an old program.

When I try to run it the first error is to import read,UTCDateTime (from obspy.core import read,UTCDateTime)
with this final line:
   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 567, in resolve
     raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: mock

What I had to do?

Regards,

Sergio

Hi,

pip install mock

thomas

Le 14/12/2015 12:45, Sergio Tardioli a �crit :

Hi Thomas,

thanks, I have followed your instructions, but do not function…

[root@localhost sysop]# yum install mock
Plugin abilitati:langpacks
Risoluzione dipendenze
–> Esecuzione del controllo di transazione
—> Pacchetto mock.noarch 0:1.2.13-2.fc21 settato per essere installato
–> Elaborazione dipendenza: pigz per il pacchetto: mock-1.2.13-2.fc21.noarch
–> Esecuzione del controllo di transazione
—> Pacchetto pigz.x86_64 0:2.3.3-1.fc21 settato per essere installato
–> Risoluzione delle dipendenze completata

Dipendenze risolte

I said,

“pip” install, not a machine package, the python package… I don’t know if it’s the same…

Thomas

ok, thank again for your patience,

now works

Sergio