# obspy.clients.syngine - IRIS Syngine client for ObsPy

This module offers methods to download from the IRIS syngine service (https://ds.iris.edu/ds/products/syngine/). The service is able to generate fully three dimensional synthetics through various 1D Earth models with arbitrary source-receiver geometries and source mechanisms.

copyright: | The ObsPy Development Team (devs@obspy.org)
license: | GNU Lesser General Public License, Version 3 (https://www.gnu.org/copyleft/lesser.html)

## Basic Usage

First initialize a client object.

    >>> from obspy.clients.syngine import Client
    >>> client = Client()

Then request some data.

    >>> st = client.get_waveforms(model="ak135f_5s", network="IU", station="ANMO",
    ...                           eventid="GCMT:C201002270634A")
    >>> print(st)
    3 Trace(s) in Stream:
    IU.ANMO.SE.MXZ | 2010-02-27T06:35:14... - ... | 4.0 Hz, 15520 samples
    IU.ANMO.SE.MXN | 2010-02-27T06:35:14... - ... | 4.0 Hz, 15520 samples
    IU.ANMO.SE.MXE | 2010-02-27T06:35:14... - ... | 4.0 Hz, 15520 samples
    >>> st.plot()

(Source code, png, hires.png)

The available parameters are explained in detail in the `get_waveforms()` method and on the Syngine website.

The queries are quite flexible. The following uses a station name wildcard and only requests data around the P arrival. Please be a bit careful as one can potentially download a lot of data with a single request.

    >>> st = client.get_waveforms(model="ak135f_5s", network="IU", station="AN*",
    ...                           eventid="GCMT:C201002270634A",
    ...                           starttime="P-10", endtime="P+20")
    >>> st.plot()

(Source code, png, hires.png)

## Bulk Requests

It is also possible to send requests for multiple user-defined stations. See the `get_waveforms_bulk()` method for details. This example specifies a bunch of receiver coordinates and requests seismograms for all of these.

    >>> bulk = [{"latitude": 10.1, "longitude": 12.2, "stationcode": "AA"},
    ...         {"latitude": 14.5, "longitude": 10.0, "stationcode": "BB"}]
    >>> st = client.get_waveforms_bulk(
    ...     model="ak135f_5s", eventid="GCMT:C201002270634A",
    ...     bulk=bulk, starttime="P-10", endtime="P+20")
    >>> print(st)
    6 Trace(s) in Stream:
    XX.AA.SE.MXZ | 2010-02-27T06:48:11... - ... | 4.0 Hz, 120 samples
    XX.AA.SE.MXN | 2010-02-27T06:48:11... - ... | 4.0 Hz, 120 samples
    XX.AA.SE.MXE | 2010-02-27T06:48:11... - ... | 4.0 Hz, 120 samples
    XX.BB.SE.MXZ | 2010-02-27T06:48:15... - ... | 4.0 Hz, 120 samples
    XX.BB.SE.MXN | 2010-02-27T06:48:15... - ... | 4.0 Hz, 120 samples
    XX.BB.SE.MXE | 2010-02-27T06:48:15... - ... | 4.0 Hz, 120 samples

## Other Useful Methods

Use the `get_available_models()` method for a list of all available methods including some meta-information.

    >>> client.get_available_models()
    {'ak135f_1s': {'components': 'vertical only',
      'default_components': 'Z',
      'default_dt': '0.05',
      'description': 'ak135 with density & Q of Montagner & Kennet(1996)',
      'length': 1815.00690721715,
      'max_event_depth': 750000,
      'max_period': '~100',
      'max_sampling_period': '0.255383',
      'min_period': 1.04999995231628},
     'ak135f_2s': ...
     ...
     }

The `get_model_info()` method should be used to retrieve information about a specific model.

    >>> from obspy.clients.syngine import Client
    >>> c = Client()
    >>> db_info = c.get_model_info(model_name="ak135f_5s")
    >>> print(db_info.period)
    5.125

## Classes & Functions

`client.Client` | Client for the IRIS Syngine service.

## Modules

`client` | ObsPy client for the IRIS Syngine service.

### 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)