# obspy.clients.iris.client.Client.traveltime

`Client.``traveltime`(model='iasp91', phases=['p', 's', 'P', 'S', 'Pn', 'Sn', 'PcP', 'ScS', 'Pdiff', 'Sdiff', 'PKP', 'SKS', 'PKiKP', 'SKiKS', 'PKIKP', 'SKIKS'], evdepth=0.0, distdeg=None, distkm=None, evloc=None, staloc=None, noheader=False, traveltimeonly=False, rayparamonly=False, mintimeonly=False, filename=None)

  Low-level interface for traveltime Web service of IRIS (http://service.iris.edu/irisws/traveltime/) - release 1.1.1 (2012-05-15).

  This method will calculates travel-times for seismic phases using a 1-D spherical earth model.

  - Parameters: | model (str, optional) Name of 1-D earth velocity model to be used. Available models include: `'iasp91'` (default) - by Int’l Assoc of Seismology and Physics of the Earth’s Interior `'prem'` - Preliminary Reference Earth Model `'ak135'` phases (list of str, optional) Comma separated list of phases. The default is as follows:
        ['p','s','P','S','Pn','Sn','PcP','ScS','Pdiff','Sdiff',
         'PKP','SKS','PKiKP','SKiKS','PKIKP','SKIKS']
  Invalid phases will be ignored. Valid arbitrary phases can be made up e.g. sSKJKP. See TauP documentation for more information. evdepth (float, optional) The depth of the event, in kilometers. Default is `0` km.

  Geographical Parameters - required

  The travel time web service requires a great-circle distance between an event and station be specified. There are three methods of specifying this distance:

  - Specify a great-circle distance in degrees, using `distdeg`
  - Specify a great-circle distance in kilometers, using `distkm`
  - Specify an event location and one or more station locations, using `evloc` and `staloc`

  Parameters: | evtlon Great-circle distance from source to station, in decimal degrees. Multiple distances may be specified as a list. distkm (float or list of float, optional) Distance between the source and station, in kilometers. Multiple distances may be specified as a list. evloc (tuple of two floats, optional) The Event location (lat,lon) using decimal degrees. staloc (tuple of two floats or list of tuples, optional) Station locations for which the phases will be listed. The general format is (lat,lon). Specify multiple station locations with a list, e.g. `[(lat1,lon1),(lat2,lon2),...,(latn,lonn)]`.

  Output Parameters

  Parameters: | noheader (bool, optional) Specifying noheader will strip the header from the resulting table. Defaults to `False`. traveltimeonly (bool, optional) Returns a space-separated list of travel times, in seconds. Defaults to `False`. Note Travel times are produced in ascending order regardless of the order in which the phases are specified rayparamonly (bool, optional) Returns a space-separated list of ray parameters, in sec/deg.. Defaults to `False`. mintimeonly (bool, optional) Returns only the first arrival of each phase for each distance. Defaults to `False`. filename (str, optional) Name of a output file. If this parameter is given nothing will be returned. Default is `None`.
  Return type: | str or `None`
  Returns: | ASCII travel time table if no `filename` is given.

  Example

      >>> from obspy.clients.iris import Client
      >>> client = Client()
      >>> result = client.traveltime(evloc=(-36.122,-72.898),
      ...     staloc=[(-33.45,-70.67),(47.61,-122.33),(35.69,139.69)],
      ...     evdepth=22.9)
      >>> print(result.decode())
      Model: iasp91
      Distance   Depth   Phase   Travel    Ray Param  Takeoff  Incident ...
        (deg)     (km)   Name    Time (s)  p (s/deg)   (deg)    (deg)   ...
      ------------------------------------------------------------------...
          3.24    22.9   P         49.39    13.750     53.77    45.82   ...
          3.24    22.9   Pn        49.40    13.754     53.80    45.84   ...

### Thank you!

We would like to thank our contributors, whose efforts make this software what it is. These people have helped by writing code and documentation, and by testing. They have created and maintained this product, its associated libraries and applications, our build tools and our web sites.

#### Contributors

- Ackerley, Nick
- Allgeyer, Sebastien
- Ammon, Charles J.
- Antunes, Emanuel
- Arnarsson, Ólafur St.
- Bank, Markus
- Barsch, Robert
- Behr, Yannik
- Bernardi, Fabrizio
- Bernauer, Felix
- Bes de Berc, Maxime
- Beyreuther, Moritz
- Boltz, Shawn
- Bonaimé, Sébastien
- Carothers, Lloyd
- Chamberlain, Calum
- Chambers, Derrick
- Chen, Zhao
- Clark, Adam
- Danecek, Peter
- Egdorf, Sven
- Engels, Fabian
- Ermert, Laura
- Eulenfeld, Tom

- Fabbri, Tommaso
- Falco, Nicholas
- Fee, Jeremy
- Grellier, Clément
- Grunberg, Marc
- Hammer, Conny
- Heimann, Sebastian
- Heiniger, Lukas
- Hope, Gaute
- Igel, Heiner
- Inza, Adolfo
- Isken, Marius
- Ketchum, David
- Koymans, Mathijs
- Kremers, Simon
- Kress, Victor
- Krieger, Lars
- Krischer, Lion
- Kula, Damian
- Käufl, Paul
- Köhler, Andreas
- Lecocq, Thomas
- Leeman, John
- Legovini, Paride

- Lesage, Philippe
- Li, Yulin
- Lomax, Anthony
- Lopes, Rui L.
- MacCarthy, Jonathan
- Maggi, Alessia
- Martin, Henri
- Medlin, Andrew
- Megies, Tobias
- Meschede, Matthias
- Michelini, Alberto
- Miller, Nathaniel C.
- Morgenstern, Bernhard
- Nof, Ran Novitsky
- Panning, Mark P.
- Parker, Tom
- Pestourie, Romain
- Rapagnani, Giovanni
- Reyes, Celso
- Ringler, Adam
- Rothenhäusler, Nicolas
- Russo, Emiliano
- Sales de Andrade, Elliott

- Satriano, Claudio
- Saul, Joachim
- Scheingraber, Chris
- Schneider, Simon
- Sippl, Christian
- Snoke, Arthur
- Stange, Stefan
- Stähler, Simon C.
- Sullivan, Benjamin
- Tian, Dongdong
- Trabant, Chad
- Trani, Luca
- Uieda, Leonardo
- Walker, Andrew
- Walther, Marcus
- Wassermann, Joachim
- Williams, Mark C.
- Winkelman, Andrew
- Zaccarelli, Riccardo
- Zad, Seyed Kasra Hosseini
- Zhu, Lijun
- van Driel, Martin
- van Wijk, Kasper

#### Funds

ObsPy was partially funded by the

- German Science Foundation (DFG) via grant DFG IG 16/9-1
- German Ministry for Education and Research (BMBF), GEOTECHNOLOGIEN grant 03G0646H.
- NERA project (Network of European Research Infrastructures for Earthquake Risk Assessment and Mitigation) under the European Community's Seventh Framework Programme (FP7/2007-2013) grant agreement n° 262330
- Leibniz Institute for Applied Geophysics (LIAG)
- VERCE EU-FP7 project (no. 283543)