TauP Python Interaction

Access The TauP Toolkit from Python.

The latest source is at GitHub, https://github.com/crotwell/taup_python .

Install the latest release of the TauP Toolkit, for example using homebrew:

brew tap crotwell/crotwell
brew trust --formula crotwell/crotwell/taup
brew install taup

Then install the Python package using pip

pip install taup

and then start coding.

import taup

with taup.TauPServer() as taupserver:
   params = taup.TimeQuery()
   params.phase(["P", "S"])
   params.degree(35)
   taupResult = params.calc(taupserver)
   if len(taupResult.arrivals) == 0:
      print(f"No arrivals...")
   else:
      print("Phase  Depth   Dist   Time")
      for a in taupResult.arrivals:
            print(f"{a.phase}      {a.sourcedepth}     {a.distdeg}   {a.time}")

Indices and tables