# obspy.io.xseed - (X)SEED and RESP support for ObsPy

XML-SEED was introduced by Tsuboi, Tromp and Komatitsch (2004), it is a XML representation of Dataless SEED. This module contains converters from Dataless SEED to XML-SEED and vice versa as well as a converter from Dataless SEED to RESP files. The `xseed` module is tested against the complete ORFEUS Dataless SEED archive, the IRIS (US) Dataless SEED archive and against ArcLink response requests.

All files can be converted to ObsPy’s internal inventory objects at which point they can be written out to any format ObsPy supports. In the case of RESP files these are potentially incomplete as RESP files lack vital information like geographical coordinates.

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

## Allocate a Parser object and read/write

    >>> from obspy.io.xseed import Parser
    >>> sp = Parser("/path/to/dataless.seed.BW_FURT")
    >>> sp.write_xseed("dataless.seed.BW_RJOB.xml")

The lines above will convert Dataless SEED, e.g.:

    000001V 010009402.3121970,001,00:00:00.0000~2038,001,00:00:00.0000~
    2009,037,04:32:41.0000~BayernNetz~~0110032002RJOB 000003RJOB 000008
    ...

to the XML-SEED representation, e.g.:

    <?xml version='1.0' encoding='utf-8'?>
    <xseed version="1.0">
      <volume_index_control_header>
        <volume_identifier blockette="010">
          <version_of_format>2.4</version_of_format>
          <logical_record_length>12</logical_record_length>
          <beginning_time>1970-01-01T00:00:00</beginning_time>
          <end_time>2038-01-01T00:00:00</end_time>
          <volume_time>2009-02-06T04:32:41</volume_time>
          <originating_organization>BayernNetz</originating_organization>
    ...

A response file can be written in a similar manner, just replace `write_xseed()` by `write_resp()`:

    >>> sp.write_resp(folder="BW_FURT", zipped=False)

## The Parser Object

SEED files as well as its derived format XML-SEED will be parsed in a `Parser` structure.

SEED volumes have four different volume types:

- Volume Index Control Headers
- Abbreviation Dictionary Control Headers
- Station Control Headers
- Time Span Control Headers (currently not supported by ObsPy. Some dummy headers will be written in case they are needed by SEED/XSEED conventions.)

After parsing a SEED or XML-SEED file the Blockette objects for each volume will be stored in the attributes``Parser.volume``, `Parser.abbreviations` and `Parser.stations`. Each item is a list of all related Blockettes and `Parser.stations` is a list of stations which contains all related Blockettes.

## Classes & Functions

`parser.Parser` | Class parsing dataless and full SEED, X-SEED, and RESP files.

## Modules

`core` | Integration with ObsPy’s core classes.
`fields` | Helper module containing xseed fields.
`parser` | Main module containing XML-SEED, dataless SEED and RESP parser.
`utils` | Various additional utilities for ObsPy xseed.

## Scripts

`scripts.dataless2resp` | A command-line program that converts Dataless SEED into RESP files.
`scripts.dataless2xseed` | A command-line program that converts Dataless SEED into XML-SEED files.
`scripts.xseed2dataless` | A command-line program that converts XML-SEED into Dataless SEED files.

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