# ObsPy Tutorial

Note

A one-hour introduction to ObsPy is available at YouTube.

This tutorial does not attempt to be comprehensive and cover every single feature. Instead, it introduces many of ObsPy’s most noteworthy features, and will give you a good idea of the library’s flavor and style.

A pdf version of the Tutorial is available `here`.

There are also IPython notebooks available online with an introduction to Python (with solutions/output), an introduction to ObsPy split up in multiple chapters (again, versions with/without solutions available) and a brief primer on data center access and visualization with ObsPy. There are also nice Jupyter notebooks with an introduction to matplotlib.

## Introduction to ObsPy

- 1. Python Introduction for Seismologists
- 2. UTCDateTime
  - 2.1. Initialization
  - 2.2. Attribute Access
  - 2.3. Handling time differences
  - 2.4. Exercises
- 3. Reading Seismograms
  - 3.1. Accessing Meta Data
  - 3.2. Accessing Waveform Data
  - 3.3. Data Preview
- 4. Waveform Plotting Tutorial
  - 4.1. Basic Plotting
  - 4.2. Customized Plots
  - 4.3. Saving Plot to File
  - 4.4. Plotting multiple Channels
  - 4.5. Creating a One-Day Plot
  - 4.6. Plotting a Record Section
  - 4.7. Plot & Color Options
  - 4.8. Custom Plotting using Matplotlib
- 5. Retrieving Data from Data Centers
  - 5.1. The FDSN Web Services
  - 5.2. ArcLink
  - 5.3. IRIS Web Services
  - 5.4. Earthworm Wave Server
  - 5.5. NERIES Web Services
  - 5.6. NEIC
  - 5.7. SeedLink
  - 5.8. Syngine Service
- 6. Filtering Seismograms
- 7. Downsampling Seismograms
- 8. Merging Seismograms
- 9. Beamforming - FK Analysis
- 10. Seismogram Envelopes
- 11. Plotting Spectrograms
- 12. Trigger/Picker Tutorial
  - 12.1. Reading Waveform Data
  - 12.2. Available Methods
  - 12.3. Trigger Examples
  - 12.4. Network Coincidence Trigger Example
  - 12.5. Advanced Network Coincidence Trigger Example with Similarity Detection
  - 12.6. Picker Examples
  - 12.7. Advanced Example
- 13. Poles and Zeros, Frequency Response
- 14. Seismometer Correction/Simulation
  - 14.1. Calculating response from filter stages using evalresp..
  - 14.2. Using a PAZ dictionary
- 15. Clone an Existing Dataless SEED File
- 16. Export Seismograms to MATLAB
- 17. Export Seismograms to ASCII
  - 17.1. Built-in Formats
  - 17.2. Custom Format
- 18. Anything to MiniSEED
- 19. Beachball Plot
- 20. Basemap Plots
  - 20.1. Basemap Plot with Custom Projection Setup
  - 20.2. Basemap Plot of a Local Area with Beachballs
  - 20.3. Basemap Plot of the Globe with Beachballs
- 21. Interfacing R from Python
- 22. Coordinate Conversions
- 23. Hierarchical Clustering
- 24. Visualizing Probabilistic Power Spectral Densities
- 25. Array Response Function
- 26. Continuous Wavelet Transform
  - 26.1. Using ObsPy
  - 26.2. Using MLPY
- 27. Time Frequency Misfit
  - 27.1. Plot the Time Frequency Representation
  - 27.2. Plot the Time Frequency Misfits
  - 27.3. Plot the Time Frequency Goodness-Of-Fit
  - 27.4. Multi Component Data
  - 27.5. Local normalization
- 28. Visualize Data Availability of Local Waveform Archive
- 29. Travel Time and Ray Path Plotting
  - 29.1. Travel Time Plot
  - 29.2. Cartesian Ray Paths
  - 29.3. Spherical Ray Paths
  - 29.4. Ray Paths for Multiple Distances
- 30. Cross Correlation Pick Correction
- 31. Handling custom defined tags in QuakeML and the ObsPy Catalog/Event framework
- 32. Handling custom defined tags in StationXML with the Obspy Inventory
- 33. Creating a StationXML file from Scratch
- 34. Connecting to a SeedLink Server
  - 34.1. The create_client function
  - 34.2. Advanced usage: subclassing the client

## Advanced Exercise

In the advanced exercise we show how ObsPy can be used to develop an automated processing workflow. We start out with very simple tasks and then automate the routine step by step. For all exercises solutions are provided.

- Advanced Exercise

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