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)[source]

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   ...