# obspy.clients.nrl - Nominal Response Library client for ObsPy

This module contains a client to access the Nominal Response Library (NRL) hosted by IRIS (http://ds.iris.edu/NRL/).

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

The first step is to initialize a NRL client object. A client object can be initialized either with the base URL of a NRL hosted on a web server or with a local directory path to a downloaded and unpacked NRL zip file. The default is to access the always up-to-date NRL database hosted at IRIS.

    >>> from obspy.clients.nrl import NRL
    >>> nrl = NRL()

The sensor and datalogger tree structure can be interactively explored in an interactive Python shell:

    >>> print(nrl)
    NRL library at http://ds.iris.edu/NRL/
      Sensors: 24 manufacturers
        'CEA-DASE', 'CME', 'Chaparral Physics', 'Eentec', 'GEObit',
        'GEOsig', 'Generic', 'Geo Space/OYO', 'Geodevice', 'Geotech',
        'Guralp', 'Hyperion', 'IESE', 'Kinemetrics', 'LaHusen', 'Lennartz'
        'Metrozet', 'Nanometrics', 'REF TEK', 'Sercel/Mark Products',
        'Silicon Audio', 'SolGeo', 'Sprengnether (now Eentec)',
        'Streckeisen'
      Dataloggers: 15 manufacturers
        'Agecodagis', 'DAQ Systems (NetDAS)', 'Earth Data', 'Eentec',
        'Generic', 'GeoBIT', 'Geodevice', 'Geotech', 'Guralp',
        'Kinemetrics', 'Nanometrics', 'Omnirecs', 'Quanterra', 'REF TEK',
        'SolGeo'
    >>> print(nrl.sensors)
    Select the sensor manufacturer (24 items):
      'CEA-DASE', 'CME', 'Chaparral Physics', 'Eentec', 'GEObit', 'GEOsig'
      'Generic', 'Geo Space/OYO', 'Geodevice', 'Geotech', 'Guralp',
      'Hyperion', 'IESE', 'Kinemetrics', 'LaHusen', 'Lennartz', 'Metrozet'
      'Nanometrics', 'REF TEK', 'Sercel/Mark Products', 'Silicon Audio'
      'SolGeo', 'Sprengnether (now Eentec)', 'Streckeisen'
    >>> print(nrl.sensors['Streckeisen'])
    Select the Streckeisen sensor model (5 items):
      'STS-1', 'STS-2', 'STS-2.5', 'STS-3', 'STS-5A'
    >>> print(nrl.sensors['Streckeisen']['STS-1'])
    Select the corner period mode for this STS-1 (2 items):
      '20 seconds', '360 seconds'
    >>> print(nrl.sensors['Streckeisen']['STS-1']['360 seconds'])
    (u'STS-1, 360 s mode, 2400 V/m/s',
     u'http://ds.iris.edu/NRL/sensors/streckeisen/RESP.XX.NS088..BHZ.STS1.360.2400')  # NOQA

Response objects can be extracted by providing the datalogger and sensor keys:

    >>> response = nrl.get_response(
    ...     sensor_keys=['Streckeisen', 'STS-1', '360 seconds'],
    ...     datalogger_keys=['REF TEK', 'RT 130 & 130-SMA', '1', '200'])
    >>> print(response)
    Channel Response
        From M/S (Velocity in Meters per Second) to COUNTS (Digital Counts)
        Overall Sensitivity: 1.50991e+09 defined at 0.020 Hz
        10 stages:
            Stage 1: PolesZerosResponseStage from M/S to V, gain: 2400
            Stage 2: ResponseStage from V to V, gain: 1
            Stage 3: CoefficientsTypeResponseStage from V to COUNTS, gain: 629129
            Stage 4: CoefficientsTypeResponseStage from COUNTS to COUNTS, gain: 1
            Stage 5: CoefficientsTypeResponseStage from COUNTS to COUNTS, gain: 1
            Stage 6: CoefficientsTypeResponseStage from COUNTS to COUNTS, gain: 1
            Stage 7: CoefficientsTypeResponseStage from COUNTS to COUNTS, gain: 1
            Stage 8: CoefficientsTypeResponseStage from COUNTS to COUNTS, gain: 1
            Stage 9: CoefficientsTypeResponseStage from COUNTS to COUNTS, gain: 1
            Stage 10: CoefficientsTypeResponseStage from COUNTS to COUNTS, gain: 1

## Classes & Functions

`client.NRL` | NRL client base class for accessing the Nominal Response Library.

## Modules

`client` | Client for accessing the Nominal Response Library (http://ds.iris.edu/NRL/).

## Scripts

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