[seiscomp, scanloc] Install, add .gitignore

This commit is contained in:
2025-10-09 15:07:02 +02:00
commit 20f5301bb1
2848 changed files with 1315858 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,146 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Addon Modules &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="scdetect" href="addons/sed.html" />
<link rel="prev" title="slmon" href="../apps/slmon.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="addons/sed.html" title="scdetect"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="../apps/slmon.html" title="slmon"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="addon-modules">
<span id="addons"></span><h1>Addon Modules<a class="headerlink" href="#addon-modules" title="Permalink to this heading"></a></h1>
<p>Addon modules make use of the <cite>SeisComP</cite> framework but do not ship with the
<cite>SeisComP</cite> package. Instead they are provided in separate packages. These packages
can be downloaded and deployed or
<a class="reference internal" href="build.html#compiling-source"><span class="std std-ref">compiled from source code</span></a> separately. How these
modules eventually integrate into the default <cite>SeisComP</cite> installation depends on
these addon modules themselves.</p>
<p>The modules are:</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="addons/sed.html">scdetect</a></li>
<li class="toctree-l1"><a class="reference internal" href="addons/sed.html#scrtdd">scrtdd</a></li>
<li class="toctree-l1"><a class="reference internal" href="addons/sed.html#sed-eew">sed-eew</a></li>
</ul>
</div>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="../apps/slmon.html"
title="previous chapter">slmon</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="addons/sed.html"
title="next chapter">scdetect</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/addons.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,171 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>scdetect &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Extensions" href="../../toc/extensions.html" />
<link rel="prev" title="Addon Modules" href="../addons.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="../../toc/extensions.html" title="Extensions"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="../addons.html" title="Addon Modules"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../addons.html" accesskey="U">Addon Modules</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="scdetect">
<span id="addons-sed"></span><h1>scdetect<a class="headerlink" href="#scdetect" title="Permalink to this heading"></a></h1>
<p>Real-time earthquake detection based on waveform cross-correlation by ETHZ/SED.</p>
<ul class="simple">
<li><p>Source code :
<a class="reference external" href="https://github.com/swiss-seismological-service/scdetect">GitHub</a>.</p></li>
<li><p>Documentation: Included within the software package or
<a class="reference external" href="https://scdetect.readthedocs.io/en/stable/">online</a>.</p></li>
</ul>
</section>
<section id="scrtdd">
<h1>scrtdd<a class="headerlink" href="#scrtdd" title="Permalink to this heading"></a></h1>
<p>Real-time double difference event relocation by ETHZ/SED.</p>
<ul class="simple">
<li><p>Source code :
<a class="reference external" href="https://github.com/swiss-seismological-service/scrtdd">GitHub</a>.</p></li>
<li><p>Documentation: Included within the software package or
<a class="reference external" href="https://docs.gempa.de/scrtdd/current/">online</a>.</p></li>
</ul>
</section>
<section id="sed-eew">
<h1>sed-eew<a class="headerlink" href="#sed-eew" title="Permalink to this heading"></a></h1>
<p>Modules for earthquake early warning by ETHZ/SED.</p>
<ul class="simple">
<li><p>Source code :
<a class="reference external" href="https://github.com/SED-EEW/SED-EEW-SeisComP-contributions">GitHub</a>.</p></li>
<li><p>Documentation: Included within the software package or
<a class="reference external" href="https://docs.gempa.de/sed-eew/current/">online</a>.</p></li>
</ul>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">scdetect</a></li>
<li><a class="reference internal" href="#scrtdd">scrtdd</a></li>
<li><a class="reference internal" href="#sed-eew">sed-eew</a></li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="../addons.html"
title="previous chapter">Addon Modules</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="../../toc/extensions.html"
title="next chapter">Extensions</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/addons/sed.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,468 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>seiscomp.client &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Examples" href="sdk-python-examples.html" />
<link rel="prev" title="seiscomp.datamodel" href="api-python.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="sdk-python-examples.html" title="Examples"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="api-python.html" title="seiscomp.datamodel"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="sdk.html" >Software Development Kit</a>
</li>
<li class="nav-item nav-item-2">
<a href="sdk-python.html" >Python</a>
</li>
<li class="nav-item nav-item-3">
<a href="sdk-python-packages.html" accesskey="U">Packages</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="module-seiscomp.client">
<span id="seiscomp-client"></span><span id="api-client-python"></span><h1>seiscomp.client<a class="headerlink" href="#module-seiscomp.client" title="Permalink to this heading"></a></h1>
<p>Modules are meant to be standalone programs doing a particular job. The
seiscomp.client package focuses on three main aspects:</p>
<ul class="simple">
<li><p>Communicate with other modules</p></li>
<li><p>Access station- and event metadata through a database</p></li>
<li><p>Fetch waveform data</p></li>
</ul>
<p>Therefore a client package has been developed combining these concepts in an
easy way with only a couple of API calls. Since <cite>SeisComP</cite> has been developed in
C++ and uses the object oriented paradigm forcefully, modules build on the
Application (C++: <code class="xref py py-class docutils literal notranslate"><span class="pre">Seiscomp::Client::Application</span></code>, Python:
<code class="xref py py-class docutils literal notranslate"><span class="pre">seiscomp.client.Application</span></code>) class. It manages the messaging connection
and waveform sources in a transparent way.</p>
<p>The class <code class="xref py py-class docutils literal notranslate"><span class="pre">Seiscomp::Client::Application</span></code> is the base class for
all <cite>SeisComP</cite> applications. It manages messaging and database
connections, provides access to command line options and configuration
parameters and also handles and interprets notifier messages.</p>
<p>Blocking network operations like reading messages are moved into threads that
are synchronized in a single blocking message queue. This queue allows pushing
elements from different threads and unblocks when a new element is ready to be
popped. If the queue is full (currently 10 elements are allowed) the pushing
threads also block until an element can be pushed again.</p>
<p>This way applications do not have to poll and thus do not burn CPU cycles.</p>
<p>The application class is event driven. It runs the event loop which pops the
message queue and dispatches events with their handlers. Handler methods are
prefixed with <em>handle</em>, e.g. <code class="xref py py-func docutils literal notranslate"><span class="pre">handleMessage()</span></code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>When overriding handlers it is always good practise to call the base
handlers before running custom code.</p>
</div>
<section id="application-class">
<h2>Application class<a class="headerlink" href="#application-class" title="Permalink to this heading"></a></h2>
<p>The application class is part of the seiscomp.client package. It needs to
be imported first.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">seiscomp.client</span>
</pre></div>
</div>
<p>A common strategy to write a module with that class is to derive from it and
run it in a Python main method.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">seiscomp.client</span>
<span class="c1"># Class definition</span>
<span class="k">class</span> <span class="nc">MyApp</span><span class="p">(</span><span class="n">seiscomp</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">):</span>
<span class="n">seiscomp</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">)</span>
<span class="c1"># Main method to call the app</span>
<span class="k">def</span> <span class="nf">main</span><span class="p">(</span><span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">):</span>
<span class="n">app</span> <span class="o">=</span> <span class="n">MyApp</span><span class="p">(</span><span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">)</span>
<span class="k">return</span> <span class="n">app</span><span class="p">()</span>
<span class="c1"># Call the main method if run as script</span>
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="n">main</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">),</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">))</span>
</pre></div>
</div>
<p>An application can be called with the parenthesis operator <code class="xref py py-func docutils literal notranslate"><span class="pre">()</span></code> which
returns the applications result code and serves as input to <code class="xref py py-func docutils literal notranslate"><span class="pre">sys.exit()</span></code>.
Operator() is a wrapper for <code class="xref py py-func docutils literal notranslate"><span class="pre">Application.exec()</span></code>.</p>
<p>The workflow of <code class="xref py py-func docutils literal notranslate"><span class="pre">Application.exec()</span></code> looks as follows:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">exec</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">returnCode</span> <span class="o">=</span> <span class="mi">1</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">init</span><span class="p">()</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">run</span><span class="p">():</span>
<span class="bp">self</span><span class="o">.</span><span class="n">returnCode</span> <span class="o">=</span> <span class="mi">0</span>
<span class="bp">self</span><span class="o">.</span><span class="n">done</span><span class="p">()</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">returnCode</span>
</pre></div>
</div>
<p><code class="xref py py-func docutils literal notranslate"><span class="pre">init()</span></code>, <code class="xref py py-func docutils literal notranslate"><span class="pre">run()</span></code> and <code class="xref py py-func docutils literal notranslate"><span class="pre">done()</span></code> are explained in more detail in
the next sections.</p>
<section id="constructor">
<h3>Constructor<a class="headerlink" href="#constructor" title="Permalink to this heading"></a></h3>
<p>To create an application, derive from the seiscomp.client.Application class
and configure it in the constructor.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="k">class</span> <span class="nc">MyApp</span><span class="p">(</span><span class="n">seiscomp</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="p">):</span>
<span class="linenos"> 2</span> <span class="c1"># MyApp constructor</span>
<span class="linenos"> 3</span> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">):</span>
<span class="linenos"> 4</span> <span class="c1"># IMPORTANT: call the base class constructor</span>
<span class="linenos"> 5</span> <span class="n">seiscomp</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">)</span>
<span class="linenos"> 6</span> <span class="c1"># Default is TRUE</span>
<span class="hll"><span class="linenos"> 7</span> <span class="bp">self</span><span class="o">.</span><span class="n">setMessagingEnabled</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
</span><span class="linenos"> 8</span> <span class="c1"># Default is TRUE, TRUE</span>
<span class="hll"><span class="linenos"> 9</span> <span class="bp">self</span><span class="o">.</span><span class="n">setDatabaseEnabled</span><span class="p">(</span><span class="kc">False</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
</span><span class="linenos">10</span> <span class="c1"># Default is TRUE</span>
<span class="hll"><span class="linenos">11</span> <span class="bp">self</span><span class="o">.</span><span class="n">setDaemonEnabled</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
</span></pre></div>
</div>
<p>As marked in line 4, the call of the constructor of the base class is very
important. It takes the command line parameters and sets up internal
application variables. Without this call the application will either not run
at all or show undefined/unexpected behaviour.</p>
<p>The constructor takes also the initial parameters of the application such as
enabling a messaging connection and enabling database access.</p>
<p>Messaging, database and daemon mode is enabled by default. The daemon mode is
important if the application should be started as service and therefore should
support the option <code class="docutils literal notranslate"><span class="pre">-D,</span> <span class="pre">--daemon</span></code>. Utilities and non daemon applications
should disable that mode.</p>
<p>Example calls to this options are shown in the highlighted lines of the above
code block.</p>
<p>If messaging is enabled, the messaging username is derived from the binary
called (<em>not the class name</em>). If the script is called test.py then the username
selected is <strong>test</strong>. The username can be overridden either in the configuration
file (<a class="reference internal" href="../apps/global.html#global"><span class="std std-ref">Global parameters</span></a>) or using the API.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="bp">self</span><span class="o">.</span><span class="n">setMessagingUsername</span><span class="p">(</span><span class="s2">&quot;test&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>Setting the username to an empty string results in a random username selected
by the messaging server.</p>
<p>All application methods are defined in the C++ header file
<code class="file docutils literal notranslate"><span class="pre">src/trunk/libs/seiscomp/client/application.h</span></code>.</p>
</section>
<section id="init">
<h3>Init<a class="headerlink" href="#init" title="Permalink to this heading"></a></h3>
<p>The workflow of the init function looks like this:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">init</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">initConfiguration</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">initCommandLine</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">createCommandLineDescription</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">parseCommandLine</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">printUsage</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">validateParameters</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">loadPlugins</span>
<span class="n">forkDaemon</span>
<span class="n">initMessaging</span>
<span class="n">initDatabase</span>
<span class="n">loadInventory</span> <span class="ow">or</span> <span class="n">loadStations</span>
<span class="n">loadDBConfigModule</span>
<span class="n">loadCities</span>
</pre></div>
</div>
<p>Methods marked with virtual can be overridden. <code class="xref py py-func docutils literal notranslate"><span class="pre">init()</span></code> itself calls
a lot of handlers that can be customized. Typical handlers are
<code class="xref py py-func docutils literal notranslate"><span class="pre">initConfiguration()</span></code>, <code class="xref py py-func docutils literal notranslate"><span class="pre">createCommandLineDescription()</span></code>
and <code class="xref py py-func docutils literal notranslate"><span class="pre">validateParameters()</span></code>.</p>
<p><code class="xref py py-func docutils literal notranslate"><span class="pre">initConfiguration()</span></code> is used to read parameters of the configuration files
and to populate the internal state. If something fails or if configured values
are out of bounds, False can be returned which causes <code class="xref py py-func docutils literal notranslate"><span class="pre">init()</span></code> to return
False and to exit the application with a non-zero result code.</p>
<p>An example is show below:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">initConfiguration</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">seiscomp</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="o">.</span><span class="n">initConfiguration</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="k">try</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_directory</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">configGetString</span><span class="p">(</span><span class="s2">&quot;directory&quot;</span><span class="p">)</span>
<span class="k">except</span><span class="p">:</span>
<span class="k">pass</span>
<span class="k">return</span> <span class="kc">True</span>
</pre></div>
</div>
<p>This method reads the directory parameter from the configuration file(s) and
sets it internally. If the directory is not given in any of the modules
configuration files, it logs an error and aborts the application by returning
False.</p>
<p><code class="xref py py-func docutils literal notranslate"><span class="pre">createCommandLineDescription()</span></code> is used to add custom command line options.
This is a void function and does not return any value. It is also not necessary
to call the base class method although it does not hurt.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">createCommandLineDescription</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">commandline</span><span class="p">()</span><span class="o">.</span><span class="n">addGroup</span><span class="p">(</span><span class="s2">&quot;Storage&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">commandline</span><span class="p">()</span><span class="o">.</span><span class="n">addStringOption</span><span class="p">(</span><span class="s2">&quot;Storage&quot;</span><span class="p">,</span> <span class="s2">&quot;directory,o&quot;</span><span class="p">,</span> <span class="s2">&quot;Specify the storage directory&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>A new command line option group is added with <code class="xref py py-func docutils literal notranslate"><span class="pre">addGroup()</span></code> and then a new
option is added to this group which is a string option.
Four types can be added
as options: string, int, double and bool: <code class="xref py py-func docutils literal notranslate"><span class="pre">addStringOption()</span></code>, <code class="xref py py-func docutils literal notranslate"><span class="pre">addIntOption()</span></code>,
<code class="xref py py-func docutils literal notranslate"><span class="pre">addDoubleOption()</span></code> and <code class="xref py py-func docutils literal notranslate"><span class="pre">addBoolOption()</span></code>.</p>
<p><code class="xref py py-func docutils literal notranslate"><span class="pre">validateParameters()</span></code> can be used to fetch the values of previously added
command line options and to validate each parameter. If False is returned, the
application is aborted with a non-zero result code.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">validateParameters</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">try</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_directory</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">commandline</span><span class="p">()</span><span class="o">.</span><span class="n">optionString</span><span class="p">(</span><span class="s2">&quot;directory&quot;</span><span class="p">)</span>
<span class="k">except</span><span class="p">:</span>
<span class="k">pass</span>
<span class="c1"># The directory validity is checked to avoid duplicate checks in</span>
<span class="c1"># initConfiguration.</span>
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_directory</span><span class="p">:</span>
<span class="n">seiscomp</span><span class="o">.</span><span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;directory not set&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">exists</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_directory</span><span class="p">):</span>
<span class="n">seiscomp</span><span class="o">.</span><span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span>
<span class="s2">&quot;directory </span><span class="si">{}</span><span class="s2"> does not exist&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_directory</span><span class="p">))</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="k">return</span> <span class="kc">True</span>
</pre></div>
</div>
<p>Custom initialization code after checking all parameters can be placed in the
overridden method <code class="xref py py-func docutils literal notranslate"><span class="pre">init()</span></code>.</p>
<p>But be aware that the process forked already if started as daemon. To run before
the fork, it needs to be put into <code class="xref py py-func docutils literal notranslate"><span class="pre">validateParameters()</span></code>.</p>
</section>
<section id="run">
<h3>Run<a class="headerlink" href="#run" title="Permalink to this heading"></a></h3>
<p>The workflow of the run method looks like this:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">run</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">startMessageThread</span>
<span class="n">messageLoop</span>
<span class="n">readMessage</span>
<span class="n">dispatchMessage</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">handleMessage</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">addObject</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">updateObject</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">removeObject</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">handleReconnect</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">handleDisconnect</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">handleTimeout</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">handleAutoShutdown</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
</pre></div>
</div>
<p>The run method starts the event loop and waits for new events in the queue.
In case of messaging a thread is started that sits and waits for messages
and feeds them to the queue and to the event loop in <code class="xref py py-func docutils literal notranslate"><span class="pre">run()</span></code>. Without
messaging the run loop would do nothing but waiting for SIGTERM or
a timer event enabled with <code class="xref py py-func docutils literal notranslate"><span class="pre">enableTimer()</span></code>. If the event loop is not needed
because no timer and messages are needed, it should be overridden and the
code should be placed there. This will disable the event loop.</p>
<p><code class="xref py py-func docutils literal notranslate"><span class="pre">run()</span></code> is expected to return True on success and False otherwise. If False
is returned the application exists with a non-zero return code. Custom return
codes can always be set with <code class="xref py py-func docutils literal notranslate"><span class="pre">Application.exit()</span></code>.</p>
<p>If the scmaster sends a message to the client it is received in the applications
message thread and pushed to the queue. The event loop pops the message from
the queue and calls <code class="xref py py-func docutils literal notranslate"><span class="pre">handleMessage()</span></code>. The default implementation uses two
settings when handling a messages that can be controlled with
<code class="xref py py-func docutils literal notranslate"><span class="pre">enableInterpretNotifier()</span></code> and <code class="xref py py-func docutils literal notranslate"><span class="pre">enableAutoApplyNotifier()</span></code>.</p>
<p><code class="xref py py-func docutils literal notranslate"><span class="pre">enableInterpretNotifier()</span></code> controls whether the Application queries the
message type and extracts notifier objects. For each notifier it parses the
operation and dispatches the parentID and the object either to
<code class="xref py py-func docutils literal notranslate"><span class="pre">addObject()</span></code>, <code class="xref py py-func docutils literal notranslate"><span class="pre">updateObject()</span></code> or <code class="xref py py-func docutils literal notranslate"><span class="pre">removeObject()</span></code> handler. This
behaviour is enabled by default. If disabled, a clients needs to parse the
messages by itself and implement this method.</p>
<p><code class="xref py py-func docutils literal notranslate"><span class="pre">enableAutoApplyNotifier()</span></code> controls whether incoming notifier objects are
applied automatically to objects in local memory. If the client has already
an object in memory and an update notifier for this object is received, the object
in the notifier is copied to the local object. This behaviour is enabled by default.</p>
</section>
<section id="done">
<h3>Done<a class="headerlink" href="#done" title="Permalink to this heading"></a></h3>
<p>The workflow of the done method looks like this:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">done</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">closeTimer</span>
<span class="n">closeMessaging</span>
<span class="n">closeDatabase</span>
</pre></div>
</div>
<p><code class="xref py py-func docutils literal notranslate"><span class="pre">done()</span></code> is usually not overridden. If custom code and clean up procedures
need to be placed in <code class="xref py py-func docutils literal notranslate"><span class="pre">done()</span></code>, the base class <strong>must</strong> be called. <code class="xref py py-func docutils literal notranslate"><span class="pre">done()</span></code> is a
void function.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">done</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">seiscomp</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="o">.</span><span class="n">done</span><span class="p">()</span>
<span class="c1"># Custom clean ups</span>
<span class="n">closeMyDataFiles</span><span class="p">()</span>
<span class="n">closeCustomConnections</span><span class="p">()</span>
</pre></div>
</div>
</section>
</section>
<section id="streamapplication-class">
<h2>StreamApplication class<a class="headerlink" href="#streamapplication-class" title="Permalink to this heading"></a></h2>
<p>The application class has another occurrence: <code class="xref py py-class docutils literal notranslate"><span class="pre">seiscomp.client.StreamApplication</span></code>.</p>
<p>The class <code class="xref py py-class docutils literal notranslate"><span class="pre">StreamApplication</span></code> extends the <code class="xref py py-class docutils literal notranslate"><span class="pre">Application</span></code>
in terms of record acquisition. It spawns another thread that reads the records
from a configurable source and adds a new handler method
<code class="xref py py-func docutils literal notranslate"><span class="pre">StreamApplication.handleRecord()</span></code> to handle these records.</p>
<p>Its workflow looks like this:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">init</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="o">+</span><span class="n">initRecordStream</span>
<span class="n">run</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="o">+</span><span class="n">startAcquisitionThread</span>
<span class="o">+</span><span class="n">storeRecord</span>
<span class="n">Application</span><span class="o">.</span><span class="n">messageLoop</span>
<span class="n">dispatchMessage</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="o">+</span><span class="n">handleRecord</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="n">done</span> <span class="p">(</span><span class="n">virtual</span><span class="p">)</span>
<span class="o">+</span><span class="n">closeRecordStream</span>
</pre></div>
</div>
<p>Received records can be handled with <code class="xref py py-func docutils literal notranslate"><span class="pre">handleRecord()</span></code>.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">handleRecord</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">rec</span><span class="p">):</span>
<span class="nb">print</span> <span class="n">rec</span><span class="o">.</span><span class="n">streamID</span><span class="p">()</span>
</pre></div>
</div>
<p>The stream subscription should be done in <code class="xref py py-func docutils literal notranslate"><span class="pre">init()</span></code>. <code class="xref py py-func docutils literal notranslate"><span class="pre">recordStream()</span></code>
returns the RecordStream instance which can be used to add stream requests.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">init</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">seiscomp</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">StreamApplication</span><span class="o">.</span><span class="n">init</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="c1"># Subscribe to some streams</span>
<span class="bp">self</span><span class="o">.</span><span class="n">recordStream</span><span class="p">()</span><span class="o">.</span><span class="n">addStream</span><span class="p">(</span><span class="s2">&quot;GE&quot;</span><span class="p">,</span> <span class="s2">&quot;MORC&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="s2">&quot;BHZ&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">True</span>
</pre></div>
</div>
<p>The record stream service is configured either with configuration files
(<a class="reference internal" href="../apps/global.html#confval-recordstream"><code class="xref std std-confval docutils literal notranslate"><span class="pre">recordstream</span></code></a>) or
via command-line options <code class="docutils literal notranslate"><span class="pre">-I`,</span> <span class="pre">``--record-url</span></code>.</p>
<p>The application finishes if the record stream read EOF. Running a <code class="xref py py-class docutils literal notranslate"><span class="pre">StreamApplication</span></code>
with <a class="reference internal" href="../apps/seedlink.html#seedlink"><span class="std std-ref">Seedlink</span></a> would probably never terminate since it is a
real time connection and handles reconnects automatically.</p>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">seiscomp.client</a><ul>
<li><a class="reference internal" href="#application-class">Application class</a><ul>
<li><a class="reference internal" href="#constructor">Constructor</a></li>
<li><a class="reference internal" href="#init">Init</a></li>
<li><a class="reference internal" href="#run">Run</a></li>
<li><a class="reference internal" href="#done">Done</a></li>
</ul>
</li>
<li><a class="reference internal" href="#streamapplication-class">StreamApplication class</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="api-python.html"
title="previous chapter">seiscomp.datamodel</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="sdk-python-examples.html"
title="next chapter">Examples</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/api-python-client.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,255 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Getting the Source Code &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Contributing Documentation" href="contributing-docs.html" />
<link rel="prev" title="Examples" href="sdk-python-examples.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="contributing-docs.html" title="Contributing Documentation"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="sdk-python-examples.html" title="Examples"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="getting-the-source-code">
<span id="build"></span><h1>Getting the Source Code<a class="headerlink" href="#getting-the-source-code" title="Permalink to this heading"></a></h1>
<div class="admonition caution">
<p class="admonition-title">Caution</p>
<p>For production systems only
<a class="reference internal" href="installation.html#installation-packages"><span class="std std-ref">install the officially released packages</span></a>
from <span id="id1">Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH [<a class="reference internal" href="references.html#id257" title="Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH. The SeisComP seismological software package. GFZ Data Services. 2008. URL: https://www.seiscomp.de, doi:10.5880/GFZ.2.4.2020.003.">67</a>]</span>, <span id="id2"><em>gempa GmbH</em> [<a class="reference internal" href="references.html#id122" title="gempa GmbH. The SeisComP development and maintenance company. URL: https://www.gempa.de/.">28</a>]</span> or compile from the corresponding
release tags in this repository.</p>
</div>
<p>The <cite>SeisComP</cite> software collection is distributed among several repositories.
For more information about compilation and build configuration head over to
<span id="id3"><em>SeisComP on GitHub</em> [<a class="reference internal" href="references.html#id258" title="Seiscomp on github. URL: https://github.com/SeisComP.">1</a>]</span>.</p>
<p>For building a complete <cite>SeisComP</cite> distribution checkout all repositories using
the following script:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/bin/bash</span>
<span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span><span class="nv">$#</span><span class="w"> </span>-eq<span class="w"> </span><span class="m">0</span><span class="w"> </span><span class="o">]</span>
<span class="k">then</span>
<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;</span><span class="nv">$0</span><span class="s2"> &lt;target-directory&gt;&quot;</span>
<span class="w"> </span><span class="nb">exit</span><span class="w"> </span><span class="m">1</span>
<span class="k">fi</span>
<span class="nv">target_dir</span><span class="o">=</span><span class="nv">$1</span>
<span class="nv">repo_path</span><span class="o">=</span>https://github.com/SeisComP
<span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;Cloning base repository into </span><span class="nv">$1</span><span class="s2">&quot;</span>
git<span class="w"> </span>clone<span class="w"> </span><span class="nv">$repo_path</span>/seiscomp.git<span class="w"> </span><span class="nv">$1</span>
<span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;Cloning base components&quot;</span>
<span class="nb">cd</span><span class="w"> </span><span class="nv">$1</span>/src/base
git<span class="w"> </span>clone<span class="w"> </span><span class="nv">$repo_path</span>/seedlink.git
git<span class="w"> </span>clone<span class="w"> </span><span class="nv">$repo_path</span>/common.git
git<span class="w"> </span>clone<span class="w"> </span><span class="nv">$repo_path</span>/main.git
git<span class="w"> </span>clone<span class="w"> </span><span class="nv">$repo_path</span>/extras.git
<span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;Cloning external base components&quot;</span>
git<span class="w"> </span>clone<span class="w"> </span><span class="nv">$repo_path</span>/contrib-gns.git
git<span class="w"> </span>clone<span class="w"> </span><span class="nv">$repo_path</span>/contrib-ipgp.git
git<span class="w"> </span>clone<span class="w"> </span>https://github.com/swiss-seismological-service/sed-SeisComP-contributions.git<span class="w"> </span>contrib-sed
<span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;Done&quot;</span>
<span class="nb">cd</span><span class="w"> </span>../../
<span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;If you want to use &#39;mu&#39;, call &#39;mu register --recursive&#39;&quot;</span>
<span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;To initialize the build, run &#39;make&#39;.&quot;</span>
</pre></div>
</div>
</section>
<section id="compiling-scname-from-source-code">
<span id="compiling-source"></span><h1>Compiling <cite>SeisComP</cite> from Source Code<a class="headerlink" href="#compiling-scname-from-source-code" title="Permalink to this heading"></a></h1>
<p>To build from source you will need to clone from one or more repositories as
described in <a class="reference internal" href="#build"><span class="std std-ref">Getting the Source Code</span></a>.</p>
<p>Before building, <strong>install all the dependencies</strong>,
as described below in <a class="reference internal" href="#build-dependencies"><span class="std std-ref">Software dependencies</span></a>.</p>
<p>The easiest way to compile <cite>SeisComP</cite> is to use the <code class="file docutils literal notranslate"><span class="pre">Makefile</span></code> file
provided which creates a build directory inside the source tree.</p>
<p>Perform the following steps:</p>
<ul class="simple">
<li><p>Clone all required repositories (see above)</p></li>
<li><p>Run <code class="file docutils literal notranslate"><span class="pre">make</span></code></p></li>
<li><p>Configure the build</p></li>
<li><p>Press c as long as g appears</p></li>
<li><p>Press g to generate the Makefiles</p></li>
<li><p>Enter the build directory and run <code class="file docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code></p></li>
</ul>
<p>By default all files are installed under <code class="file docutils literal notranslate"><span class="pre">$HOME/seiscomp</span></code>.
This location can be changed with <cite>cmake</cite> or with its front end <cite>ccmake</cite>.</p>
<p>Basically the build directory can live anywhere. The following steps create
a build directory, configure the build and start it:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>mkdir<span class="w"> </span>sc-build
$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>sc-build
$<span class="w"> </span>ccmake<span class="w"> </span>/path/to/sc-src
<span class="c1"># Configure with ccmake</span>
$<span class="w"> </span>make<span class="w"> </span>install
</pre></div>
</div>
<section id="software-dependencies">
<span id="build-dependencies"></span><h2>Software dependencies<a class="headerlink" href="#software-dependencies" title="Permalink to this heading"></a></h2>
<p>For compiling the <cite>SeisComP</cite> sources the following development software packages
are required (Debian/Ubuntu package names):</p>
<ul class="simple">
<li><p>g++</p></li>
<li><p>git</p></li>
<li><p>cmakecmake-gui</p></li>
<li><p>libboost</p></li>
<li><p>libxml2-dev</p></li>
<li><p>flex</p></li>
<li><p>libfl-dev</p></li>
<li><p>libssl-dev</p></li>
<li><p>crypto-dev</p></li>
<li><p>python3-dev (optional)</p></li>
<li><p>python3-numpy (optional, required if Numpy support is enabled which is also the default configuration)</p></li>
<li><p>libqt5-dev (optional)</p></li>
<li><p>qtbase5-dev (optional)</p></li>
<li><p>libmysqlclient-dev (optional)</p></li>
<li><p>libpq-dev (optional)</p></li>
<li><p>libsqlite3-dev (optional)</p></li>
<li><p>ncurses-dev (optional)</p></li>
</ul>
<p>As of <cite>SeisComP</cite> in version 5.0.0 support for Python 2 is dropped and Python 3 has
become the default.
The Python development libraries are required if Python wrappers should be
compiled which is the default configuration. The development files must
match the used Python interpreter of the system.</p>
</section>
<section id="compiling-scname-for-macos">
<h2>Compiling <cite>SeisComP</cite> for MacOS<a class="headerlink" href="#compiling-scname-for-macos" title="Permalink to this heading"></a></h2>
<p>Although <cite>SeisComP</cite> has been developed, compiled and tested on Linux systems,
users have compiled <cite>SeisComP</cite> on MacOS.
The procedures are given online by external sources <span id="id4">[<a class="reference internal" href="references.html#id152" title="Installing SeisComP on MacOS. Gilles' sysadmin &amp; dev blog for Earth Science. URL: https://gilles.ecgs.lu/seiscomp-for-mac-compilation-instructions/.">15</a>]</span>.
Please contact the managers of these sources for any requests.</p>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Getting the Source Code</a></li>
<li><a class="reference internal" href="#compiling-scname-from-source-code">Compiling <cite>SeisComP</cite> from Source Code</a><ul>
<li><a class="reference internal" href="#software-dependencies">Software dependencies</a></li>
<li><a class="reference internal" href="#compiling-scname-for-macos">Compiling <cite>SeisComP</cite> for MacOS</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="sdk-python-examples.html"
title="previous chapter">Examples</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="contributing-docs.html"
title="next chapter">Contributing Documentation</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/build.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,147 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Citation &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="References" href="references.html" />
<link rel="prev" title="License" href="license.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="references.html" title="References"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="license.html" title="License"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="citation">
<span id="id1"></span><h1>Citation<a class="headerlink" href="#citation" title="Permalink to this heading"></a></h1>
<p>Please give appropriate reference to <cite>SeisComP</cite> <span id="id2">[<a class="reference internal" href="references.html#id257" title="Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH. The SeisComP seismological software package. GFZ Data Services. 2008. URL: https://www.seiscomp.de, doi:10.5880/GFZ.2.4.2020.003.">67</a>]</span> when publishing your work.
You may cite the <cite>SeisComP</cite> software as:</p>
<p>Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH (2008).
The SeisComP seismological software package. GFZ Data Services.
doi: <a class="reference external" href="http://dx.doi.org/10.5880/GFZ.2.4.2020.003">10.5880/GFZ.2.4.2020.003</a>.</p>
<p>BibTex:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@Misc</span><span class="p">{</span><span class="n">seiscomp</span><span class="p">,</span>
<span class="n">Title</span> <span class="o">=</span> <span class="p">{{</span><span class="n">The</span> <span class="n">SeisComP</span> <span class="n">seismological</span> <span class="n">software</span> <span class="n">package</span><span class="o">.</span> <span class="n">GFZ</span> <span class="n">Data</span> <span class="n">Services</span><span class="o">.</span><span class="p">}},</span>
<span class="n">Author</span> <span class="o">=</span> <span class="p">{{</span><span class="n">Helmholtz</span><span class="o">-</span><span class="n">Centre</span> <span class="n">Potsdam</span> <span class="o">-</span> <span class="n">GFZ</span> <span class="n">German</span> <span class="n">Research</span> <span class="n">Centre</span> <span class="k">for</span> <span class="n">Geosciences</span> <span class="ow">and</span> <span class="n">gempa</span> <span class="n">GmbH</span><span class="p">}},</span>
<span class="n">Year</span> <span class="o">=</span> <span class="p">{</span><span class="mi">2008</span><span class="p">},</span>
<span class="n">Doi</span> <span class="o">=</span> <span class="p">{</span><span class="mf">10.5880</span><span class="o">/</span><span class="n">GFZ</span><span class="mf">.2.4.2020.003</span><span class="p">},</span>
<span class="n">Url</span> <span class="o">=</span> <span class="p">{</span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="o">.</span><span class="n">seiscomp</span><span class="o">.</span><span class="n">de</span><span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="license.html"
title="previous chapter">License</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="references.html"
title="next chapter">References</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/citation.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,464 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Coding Conventions &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Unit Testing" href="tests.html" />
<link rel="prev" title="Style Guide for Documentation" href="style-guide.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="tests.html" title="Unit Testing"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="style-guide.html" title="Style Guide for Documentation"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="coding-conventions">
<span id="id1"></span><h1>Coding Conventions<a class="headerlink" href="#coding-conventions" title="Permalink to this heading"></a></h1>
<section id="code-style">
<h2>Code Style<a class="headerlink" href="#code-style" title="Permalink to this heading"></a></h2>
<section id="formatting">
<h3>Formatting<a class="headerlink" href="#formatting" title="Permalink to this heading"></a></h3>
<p>For C++ always use tab indentation. In case of line break white spaces have to be
used to fill the space. The recommended tab width is 4 characters.</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="c1">// Tabs are visualized with &#39;&gt;&#39; and spaces with &#39;.&#39;</span>
<span class="kt">int</span><span class="w"> </span><span class="nf">myFunction</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="o">&gt;</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">5</span><span class="p">;</span>
<span class="o">&gt;</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">5</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="o">&gt;</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="n">SEISCOMP_DEBUG</span><span class="p">(</span><span class="s">&quot;A is greater than 5. Its current value is %d&quot;</span><span class="p">,</span>
<span class="o">&gt;</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="p">...............</span><span class="n">a</span><span class="p">);</span>
<span class="o">&gt;</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">a</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>C++ code is (or should be) written with the following code style:</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="cm">/***************************************************************************</span>
<span class="cm"> * Copyright (C) ... *</span>
<span class="cm"> * *</span>
<span class="cm"> * All rights reserved. *</span>
<span class="cm"> * Contact: &lt;contact&gt; *</span>
<span class="cm"> * *</span>
<span class="cm"> * Author: &lt;name&gt; *</span>
<span class="cm"> * Email: &lt;email&gt; *</span>
<span class="cm"> * *</span>
<span class="cm"> * GNU Affero General Public License Usage *</span>
<span class="cm"> * This file may be used under the terms of the GNU Affero *</span>
<span class="cm"> * Public License version 3.0 as published by the Free Software Foundation *</span>
<span class="cm"> * and appearing in the file LICENSE included in the packaging of this *</span>
<span class="cm"> * file. Please review the following information to ensure the GNU Affero *</span>
<span class="cm"> * Public License version 3.0 requirements will be met: *</span>
<span class="cm"> * https://www.gnu.org/licenses/agpl-3.0.html. *</span>
<span class="cm"> * *</span>
<span class="cm"> * Other Usage *</span>
<span class="cm"> * Alternatively, this file may be used in accordance with the terms and *</span>
<span class="cm"> * conditions contained in a signed written agreement between you and *</span>
<span class="cm"> * gempa GmbH. *</span>
<span class="cm"> ***************************************************************************/</span>
<span class="cp">#ifndef NAMESPACE_LIB_FILENAME_H</span>
<span class="cp">#define NAMESPACE_LIB_FILENAME_H</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;math.h&gt;</span>
<span class="k">class</span><span class="w"> </span><span class="nc">Complex</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">public</span><span class="o">:</span>
<span class="w"> </span><span class="n">Complex</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">re</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">im</span><span class="p">)</span>
<span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">_re</span><span class="p">(</span><span class="n">re</span><span class="p">),</span><span class="w"> </span><span class="n">_im</span><span class="p">(</span><span class="n">im</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span>
<span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">modulus</span><span class="p">()</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">sqrt</span><span class="p">(</span><span class="n">_re</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">_re</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">_im</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">_im</span><span class="p">);</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="o">&lt;</span><span class="k">template</span><span class="w"> </span><span class="k">typename</span><span class="w"> </span><span class="nc">T</span><span class="o">&gt;</span>
<span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">set</span><span class="p">(</span><span class="n">T</span><span class="w"> </span><span class="n">r</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="n">i</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">_re</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">r</span><span class="p">;</span>
<span class="w"> </span><span class="n">_im</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">i</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="k">private</span><span class="o">:</span>
<span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">_re</span><span class="p">;</span>
<span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">_im</span><span class="p">;</span>
<span class="p">};</span>
<span class="kt">void</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">counter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="w"> </span><span class="n">counter</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">i</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">namespace</span><span class="w"> </span><span class="nn">Foo</span><span class="w"> </span><span class="p">{</span>
<span class="k">namespace</span><span class="w"> </span><span class="nn">Bar</span><span class="w"> </span><span class="p">{</span>
<span class="kt">void</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">b</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">a</span><span class="p">;</span><span class="w"> </span><span class="o">++</span><span class="n">i</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="n">bar</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
<span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">bar</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
<span class="w"> </span><span class="n">bar</span><span class="p">(</span><span class="n">b</span><span class="p">);</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span><span class="w"> </span><span class="c1">// namespace Bar</span>
<span class="p">}</span><span class="w"> </span><span class="c1">// namespace Foo</span>
<span class="cp">#endif</span>
</pre></div>
</div>
</section>
<section id="file-layout">
<h3>File layout<a class="headerlink" href="#file-layout" title="Permalink to this heading"></a></h3>
<ul>
<li><p>See above header example</p></li>
<li><p><strong>Trailing newline</strong>: use a newline at the end of each source file.</p></li>
<li><p><strong>Include guards</strong>: Use include guards in your header files instead of #pragma once:</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="cp">#ifndef NAMESPACE_LIB_FILENAME_H</span>
<span class="cp">#define NAMESPACE_LIB_FILENAME_H</span>
<span class="p">...</span>
<span class="cp">#endif</span>
</pre></div>
</div>
</li>
</ul>
</section>
<section id="name-layout">
<h3>Name layout<a class="headerlink" href="#name-layout" title="Permalink to this heading"></a></h3>
<p>Use descriptive names and camel capping. That means the name of the element
starts with the case given in the following table. Every concatenated word
starts with an uppercase letter (e.g. myDescriptiveElementName).</p>
<p>For straight enumerations where values start with 0 a quantity name should be
defined that describes the upper bound for all valid enumeration values. Its
name should be prepended by two letters describing the enumeration name and an
underscore.</p>
<p>Look at the class example above for guidance.</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Type</p></th>
<th class="head"><p>Case of first letter</p></th>
<th class="head"><p>Comment</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>variable</p></td>
<td><p>lowercase</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>function</p></td>
<td><p>lowercase</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>structure</p></td>
<td><p>uppercase</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>class</p></td>
<td><p>uppercase</p></td>
<td></td>
</tr>
<tr class="row-even"><td colspan="3"><p>member variables:</p></td>
</tr>
<tr class="row-odd"><td><p>- public</p></td>
<td><p>lowercase</p></td>
<td><p>starts without underscore</p></td>
</tr>
<tr class="row-even"><td><p>- protected</p></td>
<td><p>lowercase</p></td>
<td><p>starts with underscore</p></td>
</tr>
<tr class="row-odd"><td><p>- private</p></td>
<td><p>lowercase</p></td>
<td><p>starts with underscore</p></td>
</tr>
<tr class="row-even"><td><p>methods</p></td>
<td><p>lowercase</p></td>
<td><p>no</p></td>
</tr>
<tr class="row-odd"><td><p>static methods</p></td>
<td><p>uppercase</p></td>
<td><p>no</p></td>
</tr>
<tr class="row-even"><td><p>inline methods and
templates</p></td>
<td><p>lowercase</p></td>
<td><p>sourced out into separate .ipp file
with same name as the header file</p></td>
</tr>
<tr class="row-odd"><td><p>enumeration</p></td>
<td><p>uppercase</p></td>
<td><p>elements are written all uppercase</p></td>
</tr>
<tr class="row-even"><td><p>documentation and
comments</p></td>
<td><ul class="simple">
<li></li>
</ul>
</td>
<td><p>use Doxygen</p></td>
</tr>
</tbody>
</table>
</section>
<section id="file-naming">
<h3>File naming<a class="headerlink" href="#file-naming" title="Permalink to this heading"></a></h3>
<p>All source and header files are named with lowercase letters. The suffix of a
source file is “.cpp” while for a header file it is “.h”. The name of files
that contain a class has to correspond with the class name. For other files,
a descriptive name has to be provided (e.g. protocol.h instead of pro.h).</p>
</section>
</section>
<section id="programming-guidelines">
<h2>Programming Guidelines<a class="headerlink" href="#programming-guidelines" title="Permalink to this heading"></a></h2>
<section id="return-values">
<h3>Return values<a class="headerlink" href="#return-values" title="Permalink to this heading"></a></h3>
<p>While designing methods or functions these rules about return values should be kept in mind:</p>
<ul>
<li><p>Functions returning an int or related types as status: 0 means success;
everything else is an error <a class="footnote-reference brackets" href="#id6" id="id2" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a></p></li>
<li><p>Functions returning a pointer:
0 (or <code class="code docutils literal notranslate"><span class="pre">nullptr</span></code>) means an error and of course an
invalid pointer <a class="footnote-reference brackets" href="#id6" id="id3" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a></p></li>
<li><p>Functions returning a class object can throw an exception in case of an error.
This is not obligatory and should be used with care.</p>
<p><strong>Example</strong>: std::string myMethod();</p>
</li>
</ul>
</section>
<section id="exception-specifications">
<h3>Exception specifications<a class="headerlink" href="#exception-specifications" title="Permalink to this heading"></a></h3>
<p>According to <a class="footnote-reference brackets" href="#id7" id="id4" role="doc-noteref"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a> dynamic exception specifications are considered or proposed
as deprecated feature and not recommended <a class="footnote-reference brackets" href="#id8" id="id5" role="doc-noteref"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></a>. Dont use them in declaring a function prototype.</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="c1">// Don&#39;t use that</span>
<span class="kt">int</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="k">throw</span><span class="p">(</span><span class="n">ValueException</span><span class="p">);</span>
<span class="c1">// Just declare it without an exception specification</span>
<span class="kt">int</span><span class="w"> </span><span class="nf">foo</span><span class="p">();</span>
</pre></div>
</div>
</section>
<section id="null-pointer">
<h3>Null pointer<a class="headerlink" href="#null-pointer" title="Permalink to this heading"></a></h3>
<p>Use either 0 or the <code class="code docutils literal notranslate"><span class="pre">nullptr</span></code> keyword of C++11.
Check a null pointer with implicit boolean conversion.</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="o">!</span><span class="n">ptr</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="n">do_something</span><span class="p">();</span>
</pre></div>
</div>
<p>rather than</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">ptr</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="n">do_something</span><span class="p">();</span>
</pre></div>
</div>
<p>or</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">ptr</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="n">do_something</span><span class="p">();</span>
</pre></div>
</div>
</section>
<section id="virtual-functions">
<h3>Virtual Functions<a class="headerlink" href="#virtual-functions" title="Permalink to this heading"></a></h3>
<p>Virtual functions are a fundamental concept of polymorphic classes. Virtual
functions will be overwritten in derived classes to implement specific
behaviour. It can happen that the signature of the virtual function in the
base class changes but derived classes do not follow this change.</p>
<p>This causes in erroneous behaviour as the derived virtual function will not
be called as desired. What is even worse is that this mismatch of signatures
is hard to find and to debug.</p>
<p>Fortunately C++11 introduces the long awaited override keyword which declares
that a virtual function of a derived class intends to override the virtual
function with the same name of the base class. If both signatures do not match,
the compiler will throw an error.</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="k">class</span><span class="w"> </span><span class="nc">Base</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">virtual</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">print</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">cout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Base class&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">endl</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
<span class="k">class</span><span class="w"> </span><span class="nc">Derived</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="k">public</span><span class="w"> </span><span class="n">Base</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">virtual</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">print</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">cout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Derived class&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">endl</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>If we change the signature of print to take an additional parameter then
the derived method will not be called anymore.</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="k">class</span><span class="w"> </span><span class="nc">Base</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">virtual</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">print</span><span class="p">(</span><span class="n">ostream</span><span class="w"> </span><span class="o">&amp;</span><span class="n">os</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">os</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Base class&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">endl</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Adding the override keyword will force the compiler to check both signatures
for equality.</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="k">class</span><span class="w"> </span><span class="nc">Derived</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="k">public</span><span class="w"> </span><span class="n">Base</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">print</span><span class="p">()</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">os</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Derived class&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">endl</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This code above will throw an error during compilation and one has to adapt
the signature of the function.</p>
<p>Use the override keyword whenever you implement a virtual function in derived
classes.</p>
<aside class="footnote-list brackets">
<aside class="footnote brackets" id="id6" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></span>
<span class="backrefs">(<a role="doc-backlink" href="#id2">1</a>,<a role="doc-backlink" href="#id3">2</a>)</span>
<p><a class="reference external" href="http://www.stroustrup.com/bs_faq2.html#null">http://www.stroustrup.com/bs_faq2.html#null</a></p>
</aside>
<aside class="footnote brackets" id="id7" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id4">2</a><span class="fn-bracket">]</span></span>
<p><a class="reference external" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3051.html">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3051.html</a></p>
</aside>
<aside class="footnote brackets" id="id8" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id5">3</a><span class="fn-bracket">]</span></span>
<p><a class="reference external" href="http://www.gotw.ca/publications/mill22.htm">http://www.gotw.ca/publications/mill22.htm</a></p>
</aside>
</aside>
</section>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Coding Conventions</a><ul>
<li><a class="reference internal" href="#code-style">Code Style</a><ul>
<li><a class="reference internal" href="#formatting">Formatting</a></li>
<li><a class="reference internal" href="#file-layout">File layout</a></li>
<li><a class="reference internal" href="#name-layout">Name layout</a></li>
<li><a class="reference internal" href="#file-naming">File naming</a></li>
</ul>
</li>
<li><a class="reference internal" href="#programming-guidelines">Programming Guidelines</a><ul>
<li><a class="reference internal" href="#return-values">Return values</a></li>
<li><a class="reference internal" href="#exception-specifications">Exception specifications</a></li>
<li><a class="reference internal" href="#null-pointer">Null pointer</a></li>
<li><a class="reference internal" href="#virtual-functions">Virtual Functions</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="style-guide.html"
title="previous chapter">Style Guide for Documentation</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="tests.html"
title="next chapter">Unit Testing</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/coding-conventions.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,148 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Concepts &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Messaging system" href="concepts/messaging.html" />
<link rel="prev" title="Historical Information" href="history.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="concepts/messaging.html" title="Messaging system"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="history.html" title="Historical Information"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="concepts">
<span id="id1"></span><h1>Concepts<a class="headerlink" href="#concepts" title="Permalink to this heading"></a></h1>
<p>This chapter refers to concepts shared between any applications of
the <a class="reference internal" href="glossary.html#term-trunk"><span class="xref std std-term">trunk</span></a> package.</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="concepts/messaging.html">Messaging: Exchanging information in real-time processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="concepts/modules.html">Modules: Daemon programs and command-line tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="concepts/plugins.html">Plugins: Extensions to modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="concepts/database.html">Database: Storing meta data, configurations and data products</a></li>
<li class="toctree-l1"><a class="reference internal" href="concepts/waveformarchives.html">Waveform archive: Storing raw waveform data</a></li>
<li class="toctree-l1"><a class="reference internal" href="concepts/recordstream.html">RecordStream: Access to data from real-time servers or archives</a></li>
<li class="toctree-l1"><a class="reference internal" href="concepts/inventory.html">Inventory: Station meta data</a></li>
<li class="toctree-l1"><a class="reference internal" href="concepts/configuration.html">Configuration: Inventory, module and binding configurations</a></li>
<li class="toctree-l1"><a class="reference internal" href="concepts/magnitudes.html">Processing: Magnitude computation</a></li>
<li class="toctree-l1"><a class="reference internal" href="concepts/locators.html">Processing: Locator types</a></li>
</ul>
</div>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="history.html"
title="previous chapter">Historical Information</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="concepts/messaging.html"
title="next chapter">Messaging system</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/concepts.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,960 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Configuration &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Magnitudes" href="magnitudes.html" />
<link rel="prev" title="Inventory" href="inventory.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="magnitudes.html" title="Magnitudes"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="inventory.html" title="Inventory"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../concepts.html" accesskey="U">Concepts</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="configuration">
<span id="concepts-configuration"></span><h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this heading"></a></h1>
<section id="scope">
<h2>Scope<a class="headerlink" href="#scope" title="Permalink to this heading"></a></h2>
<p>This chapter describes the configuration of a processing system and how all
the pieces gear into each other. It will cover module specific
configuration, inventory (station metadata) and module station bindings.</p>
</section>
<section id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h2>
<p>The <cite>SeisComP</cite> framework defines a common schema to read configuration parameters.
This schema is used by all <a class="reference internal" href="modules.html#concepts-modules"><span class="std std-ref">SeisComP modules</span></a> with names
starting with <strong>sc</strong>, e.g. <cite>scautopick</cite>. Other modules might be available
as well such as third party modules which use other naming conventions.</p>
<p>A way to discover a module that uses the <cite>SeisComP</cite> configuration schema
is to call it with <code class="docutils literal notranslate"><span class="pre">--help</span></code>. The first lines of a typical output look like
this:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>Generic:
<span class="w"> </span>-h<span class="w"> </span><span class="o">[</span><span class="w"> </span>--help<span class="w"> </span><span class="o">]</span><span class="w"> </span>Produce<span class="w"> </span><span class="nb">help</span><span class="w"> </span>message
<span class="w"> </span>-V<span class="w"> </span><span class="o">[</span><span class="w"> </span>--version<span class="w"> </span><span class="o">]</span><span class="w"> </span>Show<span class="w"> </span>version<span class="w"> </span>information
<span class="w"> </span>--config-file<span class="w"> </span>arg<span class="w"> </span>Use<span class="w"> </span>alternative<span class="w"> </span>configuration<span class="w"> </span>file
</pre></div>
</div>
<p>The reason for that is that there are also other modules which do not
use the <cite>SeisComP</cite> core and client libraries such Seedlink plugins, Seedlink
itself and some others which are not part of the trunk source package. Those
modules need translators to generate their native configuration when
the configuration is updated (<code class="docutils literal notranslate"><span class="pre">seiscomp</span> <span class="pre">update-config</span></code>).</p>
<p>Again, the two indicators that a module uses the following configuration
schema are:</p>
<ul class="simple">
<li><p>The module name is prefixed with <strong>sc</strong>, e.g. <em>scautopick</em></p></li>
<li><p>The output of <code class="docutils literal notranslate"><span class="pre">--help</span></code> looks like the text fragment above</p></li>
</ul>
<p>A typical configuration requires the following steps:</p>
<ol class="arabic simple">
<li><p>Generation and import of an inventory (station meta data): Read the concept
section <a class="reference internal" href="inventory.html#concepts-inventory"><span class="std std-ref">Inventory</span></a>,</p></li>
<li><p><a class="reference internal" href="#global-modules-config"><span class="std std-ref">Configuration of modules</span></a>,</p></li>
<li><p><a class="reference internal" href="#global-bindings-config"><span class="std std-ref">Configuration of bindings</span></a>.</p></li>
</ol>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p><a class="reference internal" href="modules.html#concepts-modules"><span class="std std-ref">Standalone modules</span></a> can also run without inventory.</p>
</div>
</section>
<section id="configuration-of-modules">
<span id="concepts-configuration-configs"></span><h2>Configuration of Modules<a class="headerlink" href="#configuration-of-modules" title="Permalink to this heading"></a></h2>
<p><cite>SeisComP</cite> modules provide 2 types of configurations:</p>
<ul>
<li><p><a class="reference internal" href="#global-modules-config"><span class="std std-ref">Module configurations</span></a> define module control
parameters which are equally applied to all operations on waveforms, event
parameters, graphical user interfaces, etc.</p>
<p><strong>All</strong> <a class="reference internal" href="modules.html#concepts-modules-daemon"><span class="std std-ref">daemon modules</span></a> and <strong>some</strong>
<a class="reference internal" href="modules.html#concepts-modules-commandline"><span class="std std-ref">command-line tools</span></a> provide module
configurations. <em>Module configurations are overridden by bindings
configurations.</em></p>
</li>
<li><p><a class="reference internal" href="#global-bindings-config"><span class="std std-ref">Binding configurations</span></a> define control
parameters per station and even stream. They are used for station- and even
stream-specific definitions, e.g. the data acquisition from a particular
station or server using <a class="reference internal" href="../../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a> or the phase detection by
<a class="reference internal" href="../../apps/scautopick.html#scautopick"><span class="std std-ref">scautopick</span></a>.</p>
<p>In contrast to module configuration, <strong>only some</strong>
<a class="reference internal" href="modules.html#concepts-modules"><span class="std std-ref">daemon modules</span></a> and a very few
<a class="reference internal" href="../glossary.html#term-GUI"><span class="xref std std-term">GUI modules</span></a> provide bindings. <em>Binding configurations override
module configurations.</em></p>
</li>
</ul>
<p>Whether or not a module considers bindings configurations can be read in the
module configuration panel of <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.</p>
<div class="two column layout"><figure class="align-default" id="id3">
<img alt="scconfig: no bindings configurations" src="../../_images/scconfig_no_bindings.png" />
<figcaption>
<p><span class="caption-text">scconfig modules panel indicating that no bindings can be configured.</span><a class="headerlink" href="#id3" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<figure class="align-default" id="id4">
<img alt="scconfig: no bindings configurations" src="../../_images/scconfig_has_bindings.png" />
<figcaption>
<p><span class="caption-text">scconfig modules panel indicating that bindings can be configured.</span><a class="headerlink" href="#id4" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</div><section id="module-configuration">
<span id="global-modules-config"></span><h3>Module configuration<a class="headerlink" href="#module-configuration" title="Permalink to this heading"></a></h3>
<p>Configurations for modules are saved as <code class="file docutils literal notranslate"><span class="pre">*.cfg</span></code> files. There are three
directories involved where configuration files can be stored:</p>
<ol class="arabic simple">
<li><p><code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/defaults/</span></code>: This directory ships with the distribution
of <cite>SeisComP</cite> and should never be touched. All contained files might be
overwritten with the next software update.</p></li>
<li><p><code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/</span></code>: This directory will never be populated by a software
update and it is save to store global module configuration files there.
Depending on the system setup this directory might be read-only to users.
It is called the system configuration directory.</p></li>
<li><p><code class="file docutils literal notranslate"><span class="pre">$HOME/.seiscomp/</span></code>: This directory is in the users home directory and
it is meant to provide configurations which override default and system
configurations.
It is called the user configuration directory.</p></li>
</ol>
<p>Furthermore there are two file names involved in each directory:
<code class="file docutils literal notranslate"><span class="pre">global.cfg</span></code> and <code class="file docutils literal notranslate"><span class="pre">[module].cfg</span></code>. The file <code class="file docutils literal notranslate"><span class="pre">global.cfg</span></code>
will be loaded by all modules and it is a good place to store common
parameters such as messaging connections or logging configurations.</p>
<p>The three directories and two files result in 6 locations to read all of a
modules configuration parameters:</p>
<ol class="arabic simple">
<li><p><code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/defaults/global.cfg</span></code></p></li>
<li><p><code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/defaults/[module].cfg</span></code></p></li>
<li><p><code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/global.cfg</span></code></p></li>
<li><p><code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/[module].cfg</span></code></p></li>
<li><p><code class="file docutils literal notranslate"><span class="pre">$HOME/.seiscomp/global.cfg</span></code></p></li>
<li><p><code class="file docutils literal notranslate"><span class="pre">$HOME/.seiscomp/[module].cfg</span></code></p></li>
</ol>
<p>The order of the configuration files above also represents the order of loading.
Parameters can be available in any of these files. The last occurrence of a
parameter takes priority such as configurations in <code class="file docutils literal notranslate"><span class="pre">$HOME/.seiscomp/</span></code>.</p>
<section id="adjusting">
<h4>Adjusting<a class="headerlink" href="#adjusting" title="Permalink to this heading"></a></h4>
<p><a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> provides a user-friendly graphical interface to adjust the
global and the module configuration parameters.</p>
<figure class="align-center" id="id5">
<a class="reference internal image-reference" href="../../_images/scconfig_config_modules.png"><img alt="scconfig: module configuration" src="../../_images/scconfig_config_modules.png" style="width: 18cm;" /></a>
<figcaption>
<p><span class="caption-text">scconfig modules module configuration panel.</span><a class="headerlink" href="#id5" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Alternatively, you may adjust the module configuration files corresponding to
a module. An easy way of getting started is to copy the default configuration
file in <code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/defaults/</span></code> to <code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/</span></code> and
adjust it there.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Do not adjust any parameter in the default configuration files located in
<code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/defaults/</span></code> as they will be overwritten by future
software updates.</p>
</div>
</section>
<section id="application">
<h4>Application<a class="headerlink" href="#application" title="Permalink to this heading"></a></h4>
<p>Module configurations are usually read when starting a module and cannot be
changed during runtime. For applying any change on module configuration</p>
<ol class="arabic simple">
<li><p>Save the configuration,</p></li>
<li><p>Restart or execute all affected modules.</p></li>
</ol>
<p>In addition to a permanent configuration you may temporally override any
configuration parameter when executing a module. Provide the full structure of
the configuration parameter on the command line along with “=” between parameter
and value. This will identify the parameter as a configuration parameter
overridden on the command line. E.g. refer to the codes parameter of
<a class="reference internal" href="../../apps/scrttv.html#scrttv"><span class="std std-ref">scrttv</span></a> in the streams section as <cite>codes.streams</cite>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>scrttv<span class="w"> </span>--streams.codes<span class="o">=</span><span class="s2">&quot;GR.*.*.HH?&quot;</span>
</pre></div>
</div>
</section>
</section>
<section id="bindings-configuration">
<span id="global-bindings-config"></span><h3>Bindings configuration<a class="headerlink" href="#bindings-configuration" title="Permalink to this heading"></a></h3>
<p>Bindings configure parameters specific to stations and for a certain module.
A station might require a custom set of parameters for e.g. data acquisition from
a remote data logger or server, for processing or
displaying. <cite>SeisComP</cite> design is that bindings will be stored
in the database. All modules requiring this information read them from the
database. In this way consistent inventory and its bindings will be distributed
to all modules running locally or on remote computers.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>Bindings can be conveniently configured in the Bindings panel of <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.
Read the section <a class="reference internal" href="../../apps/scconfig.html#scconfig-bindings"><span class="std std-ref">Bindings panel</span></a> for instructions.</p>
</div>
<figure class="align-center" id="id6">
<span id="config-fig-binding"></span><img alt="../../_images/binding.png" src="../../_images/binding.png" />
<figcaption>
<p><span class="caption-text">Binding</span><a class="headerlink" href="#id6" title="Permalink to this image"></a></p>
<div class="legend">
<p>A binding holds the configuration how a station is used in a module.</p>
</div>
</figcaption>
</figure>
<p>Parameters defined in bindings override parameters in module configurations.
Bindings configurations are saved as stations bindings or as bindings profiles with
given names:</p>
<ol class="arabic simple">
<li><p><strong>Station binding parameters:</strong> <code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/key/[module]/station_NET_STA</span></code>
is used only be one station NET.STA.</p></li>
<li><p><strong>Binding profile parameters:</strong> <code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/key/[module]/profile_[name]</span></code>
can be used by many stations. Then any update of this file applies to all stations
bound to this profile.</p></li>
</ol>
<p>Like in this list, the actual binding parameters for each module are
expected in either <code class="file docutils literal notranslate"><span class="pre">etc/key/$MODULE/station_$NET_$STA</span></code> or
<code class="file docutils literal notranslate"><span class="pre">etc/key/$MODULE/profile_$PROFILE</span></code>. That depends if a profile should
be used or not. If the station key file registers a module with a colon
following a name then this name is the profile name. If just a module is given
then the station binding file will be read.</p>
<p>The bindings themselves are links from the module to the station. They are written
into key files, e.g.</p>
<ul class="simple">
<li><p><code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/key/station_NET_STA</span></code></p></li>
</ul>
<p>Example of bindings profiles:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="c1"># Binding references</span>
<span class="na">global</span><span class="o">:</span><span class="s">__HH</span>
<span class="na">scautopick</span><span class="o">:</span><span class="s">default</span>
<span class="na">seedlink</span><span class="o">:</span><span class="s">geofon</span>
</pre></div>
</div>
<p>Example of bindings profiles and a station binding for slarchive:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="c1"># Binding references</span>
<span class="na">global</span><span class="o">:</span><span class="s">__HH</span>
<span class="na">scautopick</span><span class="o">:</span><span class="s">default</span>
<span class="na">seedlink</span><span class="o">:</span><span class="s">geofon</span>
<span class="na">slarchive</span>
</pre></div>
</div>
<p>The key files are named like <code class="file docutils literal notranslate"><span class="pre">station_$NET_$STA</span></code>, e.g. <code class="file docutils literal notranslate"><span class="pre">station_GE_MORC</span></code>.
The names within the key files define for which modules the station registers. In the
above example it is the <strong>global</strong>, <strong>scautopick</strong>, <strong>seedlink</strong> and slarchive.</p>
<p>To list all modules a particular station is configured for is very simple by printing the content
of the station key file:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>cat<span class="w"> </span>etc/key/station_GE_MORC
seedlink:geofon
global:BH
scautopick
</pre></div>
</div>
<p>Another way is a bit more complicated but at least all information is
there. To show all stations configured for SeedLink could be done this way:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="k">for</span><span class="w"> </span>i<span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="sb">`</span>find<span class="w"> </span>etc/key<span class="w"> </span>-type<span class="w"> </span>f<span class="w"> </span>-maxdepth<span class="w"> </span><span class="m">1</span><span class="w"> </span>-name<span class="w"> </span><span class="s2">&quot;station_*_*&quot;</span><span class="sb">`</span><span class="p">;</span><span class="w"> </span><span class="k">do</span>
&gt;<span class="w"> </span>egrep<span class="w"> </span>-q<span class="w"> </span><span class="s1">&#39;^seedlink(:.*){0,1}$&#39;</span><span class="w"> </span><span class="nv">$i</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="nv">$i</span><span class="p">;</span>
&gt;<span class="w"> </span><span class="k">done</span>
etc/key/station_GE_MORC
etc/key/station_GE_UGM
</pre></div>
</div>
<p>Modules usually read the bindings configuration from the database but not from files.
Therefore, the bindings are stored in the database when executing</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span>update-config
</pre></div>
</div>
<p>The database tables involved are <code class="docutils literal notranslate"><span class="pre">ConfigModule</span></code>, <code class="docutils literal notranslate"><span class="pre">ConfigStation</span></code>, <code class="docutils literal notranslate"><span class="pre">Setup</span></code>,
<code class="docutils literal notranslate"><span class="pre">ParameterSet</span></code> and <code class="docutils literal notranslate"><span class="pre">Parameter</span></code>.</p>
<figure class="align-center" id="id7">
<span id="config-fig-configdb-schema"></span><img alt="../../_images/configdb-schema.png" src="../../_images/configdb-schema.png" />
<figcaption>
<p><span class="caption-text">Configuration database schema</span><a class="headerlink" href="#id7" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>To illustrate the contents of the objects, the XML representation
is used below.</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt">&lt;Config&gt;</span>
<span class="w"> </span><span class="nt">&lt;module</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;Config/trunk&quot;</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;trunk&quot;</span><span class="w"> </span><span class="na">enabled=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span>...
<span class="w"> </span><span class="nt">&lt;/module&gt;</span>
<span class="nt">&lt;/Config&gt;</span>
</pre></div>
</div>
<p>A ConfigModule with publicID <em>Config/trunk</em> is created with name <em>trunk</em>. This
ConfigModule is managed by the global initialization script (<code class="file docutils literal notranslate"><span class="pre">etc/init/trunk.py</span></code>)
and will be synchronized with configured bindings of all trunk modules. The
ConfigModule trunk is the one that is actually used by all configurations unless
configured otherwise with:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>scapp<span class="w"> </span>--config-module<span class="w"> </span><span class="nb">test</span>
</pre></div>
</div>
<p>Here <strong class="program">scapp</strong> would read ConfigModule <em>test</em>. Because a ConfigModule <em>test</em>
is not managed by <strong class="program">seiscomp update-config</strong> it is up to the user to create
it.</p>
<p>For each station that has at least one binding, a ConfigStation object is
attached to the ConfigModule:</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt">&lt;Config&gt;</span>
<span class="w"> </span><span class="nt">&lt;module</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;Config/trunk&quot;</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;trunk&quot;</span><span class="w"> </span><span class="na">enabled=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;station</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;Config/trunk/GE/UGM&quot;</span>
<span class="w"> </span><span class="na">networkCode=</span><span class="s">&quot;GE&quot;</span><span class="w"> </span><span class="na">stationCode=</span><span class="s">&quot;UGM&quot;</span><span class="w"> </span><span class="na">enabled=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span>...
<span class="w"> </span><span class="nt">&lt;/station&gt;</span>
<span class="w"> </span><span class="nt">&lt;/module&gt;</span>
<span class="nt">&lt;/Config&gt;</span>
</pre></div>
</div>
<p>and finally one Setup per module:</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt">&lt;Config&gt;</span>
<span class="w"> </span><span class="nt">&lt;module</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;Config/trunk&quot;</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;trunk&quot;</span><span class="w"> </span><span class="na">enabled=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;station</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;Config/trunk/GE/UGM&quot;</span>
<span class="w"> </span><span class="na">networkCode=</span><span class="s">&quot;GE&quot;</span><span class="w"> </span><span class="na">stationCode=</span><span class="s">&quot;UGM&quot;</span><span class="w"> </span><span class="na">enabled=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;setup</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;default&quot;</span><span class="w"> </span><span class="na">enabled=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameterSetID&gt;</span>
<span class="w"> </span>ParameterSet/trunk/Station/GE/UGM/default
<span class="w"> </span><span class="nt">&lt;/parameterSetID&gt;</span>
<span class="w"> </span><span class="nt">&lt;/setup&gt;</span>
<span class="w"> </span><span class="nt">&lt;setup</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;scautopick&quot;</span><span class="w"> </span><span class="na">enabled=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameterSetID&gt;</span>
<span class="w"> </span>ParameterSet/trunk/Station/GE/UGM/scautopick
<span class="w"> </span><span class="nt">&lt;/parameterSetID&gt;</span>
<span class="w"> </span><span class="nt">&lt;/setup&gt;</span>
<span class="w"> </span><span class="nt">&lt;/station&gt;</span>
<span class="w"> </span><span class="nt">&lt;/module&gt;</span>
<span class="nt">&lt;/Config&gt;</span>
</pre></div>
</div>
<p>Here two setups have been created: <em>default</em> (which is a special case for
module <em>global</em> to be backwards compatible) and <em>scautopick</em> where each
refers to a ParameterSet by its publicID. The next XML fragment shows
the ParameterSet referred by the scautopick setup of station GE.UGM:</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt">&lt;Config&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameterSet</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;ParameterSet/trunk/Station/GE/UGM/scautopick&quot;</span>
<span class="w"> </span><span class="na">created=</span><span class="s">&quot;...&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;baseID&gt;</span>ParameterSet/trunk/Station/GE/UGM/default<span class="nt">&lt;/baseID&gt;</span>
<span class="w"> </span><span class="nt">&lt;moduleID&gt;</span>Config/trunk<span class="nt">&lt;/moduleID&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameter</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;...&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;name&gt;</span>timeCorr<span class="nt">&lt;/name&gt;</span>
<span class="w"> </span><span class="nt">&lt;value&gt;</span>-0.8<span class="nt">&lt;/value&gt;</span>
<span class="w"> </span><span class="nt">&lt;/parameter&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameter</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;...&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;name&gt;</span>detecFilter<span class="nt">&lt;/name&gt;</span>
<span class="w"> </span><span class="nt">&lt;value&gt;</span>
<span class="w"> </span>RMHP(10)<span class="ni">&amp;gt;&amp;gt;</span>ITAPER(30)<span class="ni">&amp;gt;&amp;gt;</span>BW(4,0.7,2)<span class="ni">&amp;gt;&amp;gt;</span>STALTA(2,80)
<span class="w"> </span><span class="nt">&lt;/value&gt;</span>
<span class="w"> </span><span class="nt">&lt;/parameter&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameter</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;...&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;name&gt;</span>trigOff<span class="nt">&lt;/name&gt;</span>
<span class="w"> </span><span class="nt">&lt;value&gt;</span>1.5<span class="nt">&lt;/value&gt;</span>
<span class="w"> </span><span class="nt">&lt;/parameter&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameter</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;...&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;name&gt;</span>trigOn<span class="nt">&lt;/name&gt;</span>
<span class="w"> </span><span class="nt">&lt;value&gt;</span>3<span class="nt">&lt;/value&gt;</span>
<span class="w"> </span><span class="nt">&lt;/parameter&gt;</span>
<span class="w"> </span><span class="nt">&lt;/parameterSet&gt;</span>
<span class="nt">&lt;/Config&gt;</span>
</pre></div>
</div>
<p>The mapping to the binding configuration files is 1:1. Each parameter in
the configuration file is exactly one parameter in the database and their
names are matching exactly.</p>
<p>The concept of global bindings which are specialized for each module is
reflected by the <em>baseID</em> of the ParameterSet which points to setup <em>default</em>
of station GE.UGM:</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt">&lt;Config&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameterSet</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;ParameterSet/trunk/Station/GE/UGM/default&quot;</span>
<span class="w"> </span><span class="na">created=</span><span class="s">&quot;...&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;moduleID&gt;</span>Config/trunk<span class="nt">&lt;/moduleID&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameter</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;...&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;name&gt;</span>detecStream<span class="nt">&lt;/name&gt;</span>
<span class="w"> </span><span class="nt">&lt;value&gt;</span>BH<span class="nt">&lt;/value&gt;</span>
<span class="w"> </span><span class="nt">&lt;/parameter&gt;</span>
<span class="w"> </span><span class="nt">&lt;/parameterSet&gt;</span>
<span class="nt">&lt;/Config&gt;</span>
</pre></div>
</div>
<p>This ends up with a final configuration for scautopick and station GE.UGM:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>Value</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>detecStream</p></td>
<td><p>BH</p></td>
</tr>
<tr class="row-odd"><td><p>timeCorr</p></td>
<td><p>-0.8</p></td>
</tr>
<tr class="row-even"><td><p>detecFilter</p></td>
<td><p>RMHP(10)&gt;&gt;ITAPER(30)&gt;&gt;BW(4,0.7,2)&gt;&gt;STALTA(2,80)</p></td>
</tr>
<tr class="row-odd"><td><p>trigOff</p></td>
<td><p>1.5</p></td>
</tr>
<tr class="row-even"><td><p>trigOn</p></td>
<td><p>3</p></td>
</tr>
</tbody>
</table>
<p>which is the concatenation of the two files <code class="file docutils literal notranslate"><span class="pre">etc/key/global/station_GE_UGM</span></code>
and <code class="file docutils literal notranslate"><span class="pre">etc/key/scautopick/station_GE_UGM</span></code>. The filter grammar is explained in
<a class="reference internal" href="../filter-grammar.html#filter-grammar"><span class="std std-ref">filter grammar section</span></a>.</p>
<p>The <code class="file docutils literal notranslate"><span class="pre">etc/key</span></code> directory is only used to ease the configuration of bindings.
They are finally transferred to the database or converted to other
representations a module might require to access them. The directory <code class="file docutils literal notranslate"><span class="pre">etc/key</span></code> is meant
for backup and used for copying bindings from one computer to another.</p>
<section id="id1">
<h4>Adjusting<a class="headerlink" href="#id1" title="Permalink to this heading"></a></h4>
<p><a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> provides a graphical interface to adjust the global and the module
bindings parameters and to create the bindings. It populates the <code class="file docutils literal notranslate"><span class="pre">etc/key</span></code>
directory and it takes care that they synchronize with the database when processing
<em>Update configuration</em> in the <em>System</em> panel.</p>
<figure class="align-center" id="id8">
<a class="reference internal image-reference" href="../../_images/scconfig_config_bindings.png"><img alt="scconfig: bindings configuration" src="../../_images/scconfig_config_bindings.png" style="width: 18cm;" /></a>
<figcaption>
<p><span class="caption-text">scconfig modules bindings configuration panel.</span><a class="headerlink" href="#id8" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Alternatively, you may manually generate the binding parameter file
<code class="file docutils literal notranslate"><span class="pre">etc/key/global/station_GE_UGM</span></code> and
<code class="file docutils literal notranslate"><span class="pre">etc/key/scautopick/station_GE_UGM</span></code> and add the binding to the key file
corresponding to the station, e.g.,
<code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/key/station_GE_UGM</span></code>.´</p>
</section>
<section id="seiscomp-shell">
<h4>SeisComP shell<a class="headerlink" href="#seiscomp-shell" title="Permalink to this heading"></a></h4>
<p>Instead of creating bindings in <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> or by adjusting key files
manually you may assign binding profiles to stations or networks or remove them
using the <cite>SeisComP</cite> shell which is a specific shell:</p>
<ol class="arabic">
<li><p>Start the <cite>SeisComP</cite> shell:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>shell
</pre></div>
</div>
</li>
<li><p>Issue a shell command. Examples:</p>
<ul>
<li><p>Read the help of the new shell:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="o">================================================================================</span>
SeisComP<span class="w"> </span><span class="nv">shell</span>
<span class="o">================================================================================</span>
Welcome<span class="w"> </span>to<span class="w"> </span>the<span class="w"> </span>SeisComP<span class="w"> </span>interactive<span class="w"> </span>shell.<span class="w"> </span>You<span class="w"> </span>can<span class="w"> </span>get<span class="w"> </span><span class="nb">help</span><span class="w"> </span>about
available<span class="w"> </span>commands<span class="w"> </span>with<span class="w"> </span><span class="s1">&#39;help&#39;</span>.<span class="w"> </span><span class="s1">&#39;exit&#39;</span><span class="w"> </span>leaves<span class="w"> </span>the<span class="w"> </span>shell.
$<span class="w"> </span><span class="nb">help</span>
</pre></div>
</div>
</li>
<li><p>add the existing scautopick binding profile, <em>default</em>, to the station
<em>GE.UGM</em>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">set</span><span class="w"> </span>profile<span class="w"> </span>scautopick<span class="w"> </span>default<span class="w"> </span>GE.UGM
</pre></div>
</div>
<p>or to all stations of the network <em>GE</em>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">set</span><span class="w"> </span>profile<span class="w"> </span>scautopick<span class="w"> </span>default<span class="w"> </span>GE.UGM
</pre></div>
</div>
</li>
<li><p>remove the scautopick binding profile, <em>default</em>, from the station <em>GE.UGM</em>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>remove<span class="w"> </span>profile<span class="w"> </span>scautopick<span class="w"> </span>default<span class="w"> </span>GE.UGM
</pre></div>
</div>
</li>
<li><p>exit the shell and get back to the Linux shell:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">exit</span>
</pre></div>
</div>
</li>
</ul>
</li>
</ol>
</section>
<section id="example-global-bindings">
<h4>Example: global bindings<a class="headerlink" href="#example-global-bindings" title="Permalink to this heading"></a></h4>
<p>A binding is a set of name value pairs just like a configuration file but for
a station. In the file system a binding looks like this:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">detecLocid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;&quot;</span>
<span class="na">detecStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">HH</span>
</pre></div>
</div>
<p>Simple. These are actually two parameters from the global binding and it solves
a common issue elegantly: a station might provide a couple of channels, often
data in various sampling rates, e.g. LH, BH, SH and HH. Co-located stations
with velocity and acceleration sensors also provide at least two channel groups,
e.g. HL and HH. Those groups are also provided with different location code,
e.g. 00 and 10. To process a station a module needs to know which channel
it should process. To display a representative data channel a viewer needs to
know which channel to show. Global bindings solve that issue by defining the
“preferred” location code and channel code with the two parameters <cite>detecLocid</cite>
and <cite>detecStream</cite>. The TraceView, <a class="reference internal" href="../../apps/scrttv.html#scrttv"><span class="std std-ref">scrttv</span></a> can read all available station
bindings, compose a fully qualified channel name from network code (part of the
binding), station code, detecLocid and detecStream. It will then lookup the
inventory information for that channel and display it.</p>
<p>The meta data of a binding are:</p>
<ul class="simple">
<li><p>Network code,</p></li>
<li><p>Station code,</p></li>
<li><p>Module name.</p></li>
</ul>
<p>The actual binding data are the key value pairs.</p>
</section>
<section id="reading-bindings">
<h4>Reading bindings<a class="headerlink" href="#reading-bindings" title="Permalink to this heading"></a></h4>
<p>Binding configuration parameters are read during a module start after the module
configuration parameters.
They override the module configuration.
Like module configurations, parameters defined in the global bindings can be
overridden in module bindings. The order of loading is:</p>
<ol class="arabic simple">
<li><p><code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/key/global/</span></code>: Global bindings configurations</p></li>
<li><p><code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/key/[module]</span></code>: Bindings configurations for a particular module.</p></li>
</ol>
<p>If the module connects to a messaging server then it will receive the database parameters,
connect to it and read the bindings. Otherwise the user has to provide the
database address. A module never reads the key directory. It only
gets the bindings from the configuration tables.</p>
<p>As with inventory information there might are cases when a module should
not connect to a database and work offline, in particular when <code class="docutils literal notranslate"><span class="pre">--ep</span></code> is being
used.</p>
<p>In order to
read the bindings configuration from XML files (again in SCML format),
use <a class="reference internal" href="../../apps/scxmldump.html#scxmldump"><span class="std std-ref">scxmldump</span></a> to dump the configuration XML file and let
the module use this XML file, <code class="docutils literal notranslate"><span class="pre">--config-db</span></code> must be used:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>myapp<span class="w"> </span>--config-db<span class="w"> </span>config.xml
</pre></div>
</div>
<p>That will completely bypass the database (even if used for event information or
inventory) for reading station bindings.</p>
<p>To extract a configuration XML file from the database, <a class="reference internal" href="../../apps/scxmldump.html#scxmldump"><span class="std std-ref">scxmldump</span></a> can be used:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>scxmldump<span class="w"> </span>-fC<span class="w"> </span>-d<span class="w"> </span>localhost<span class="w"> </span>-o<span class="w"> </span>config.xml
</pre></div>
</div>
<p>One can also create a config XML file straight from the <code class="docutils literal notranslate"><span class="pre">etc/key</span></code> directory
with <code class="docutils literal notranslate"><span class="pre">bindings2cfg</span></code>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>bindings2cfg<span class="w"> </span>-o<span class="w"> </span>config.xml
</pre></div>
</div>
<p>To create an XML file from a temporary key directory, an alternative directory
can be specified with <code class="docutils literal notranslate"><span class="pre">--key-dir</span></code>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>bindings2cfg<span class="w"> </span>--key-dir<span class="w"> </span>/tmp/key<span class="w"> </span>-o<span class="w"> </span>config.xml
</pre></div>
</div>
</section>
<section id="id2">
<h4>Application<a class="headerlink" href="#id2" title="Permalink to this heading"></a></h4>
<p>Binding configurations are read when starting a module and cannot be
changed during runtime. For applying any change on binding configurations</p>
<ol class="arabic">
<li><p>Save the configuration,</p></li>
<li><p>Update the configuration</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span>update-config
</pre></div>
</div>
</li>
<li><p>Restart or execute all affected modules.</p></li>
</ol>
</section>
<section id="summary">
<h4>Summary<a class="headerlink" href="#summary" title="Permalink to this heading"></a></h4>
<ul class="simple">
<li><p>Bindings are maintained as key files in <code class="file docutils literal notranslate"><span class="pre">etc/key</span></code>,</p></li>
<li><p>Key files are another human readable representation of bindings,</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">seiscomp</span> <span class="pre">update-config</span></code> or <code class="docutils literal notranslate"><span class="pre">seiscomp</span> <span class="pre">update-config</span> <span class="pre">trunk</span></code> writes the
information from <code class="file docutils literal notranslate"><span class="pre">etc/key</span></code> to the database,</p></li>
<li><p>A module never reads <code class="file docutils literal notranslate"><span class="pre">etc/key</span></code>,</p></li>
<li><p>Bindings are being read from the database or an XML file.</p></li>
</ul>
</section>
</section>
<section id="validation">
<h3>Validation<a class="headerlink" href="#validation" title="Permalink to this heading"></a></h3>
<p>After changing configuration the affected modules should be tested, e.g. by
running with informative debug logging output. You may use <a class="reference internal" href="../../apps/scdumpcfg.html#scdumpcfg"><span class="std std-ref">scdumpcfg</span></a> for
dumping the module an binding parameters into a summary file.</p>
</section>
</section>
<section id="format-of-parameters">
<span id="concepts-configuration-parameters"></span><h2>Format of Parameters<a class="headerlink" href="#format-of-parameters" title="Permalink to this heading"></a></h2>
<p>The <a class="reference internal" href="../glossary.html#term-trunk"><span class="xref std std-term">trunk</span></a> configuration files are simple text files where each line
is a name-value pair containing the parameter name and its value.</p>
<p>Parameter values can be provided as</p>
<ul class="simple">
<li><p>plain values or comma-separated lists on single or multiple lines
(read sections below) or as</p></li>
<li><p><a class="reference internal" href="#concepts-configuration-variables"><span class="std std-ref">variables</span></a>, allowing to refer to
previously defined parameters, e.g., in <code class="file docutils literal notranslate"><span class="pre">global.cfg</span></code> or to define relative
directories related to the <cite>SeisComP</cite> installation or the Linux system.</p></li>
</ul>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>In contrast to previous versions of <cite>SeisComP</cite> the parameter names are now
case-sensitive. Use :ref`scchkcfg` to check configurations from previous
versions regarding case-sensitivity.</p>
</div>
<section id="basic">
<h3>Basic<a class="headerlink" href="#basic" title="Permalink to this heading"></a></h3>
<p>Module and binding configuration files are simple text file where each line is a
name-value pair for one parameter. The parameter names are case-sensitive. The
format is a simple as:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">agencyID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">gempa</span>
<span class="na">recordstream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">slink://localhost:18000</span>
</pre></div>
</div>
<p>Spaces in string parameters must be protected by quotes:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">eventlist.filter.types.blacklist</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;not existing&quot;</span>
</pre></div>
</div>
<p>Parameter groups are indicated by a separating dot (“.”). The dot separates the
group from the parameter name or other groups. The item after the last dot is
the parameter.</p>
<p>Later assignments of parameters override previous ones so the order of lines in the
configuration file is important. The file is parsed top-down.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Values are not type-checked. Type checking is part of the module
logic and will be handled there. The configuration file parser will not raise
an error if a string is assigned to a parameter that is expected to be an
integer.</p>
</div>
</section>
<section id="comments">
<h3>Comments<a class="headerlink" href="#comments" title="Permalink to this heading"></a></h3>
<p>Everything following an unescaped <strong>#</strong> (hash) is a comment and is going to
be ignored. Blank lines and white spaces are ignored by the parser as well
unless quoted or escaped. Escaping is done by prepending a backslash (<strong>\\</strong>)
to the character that needs escaping. It backslash should be part of the
string, two backslashes should be used (<strong>\\\\</strong>).</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">agencyID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">gempa # This is a comment</span>
<span class="c1"># The preceding empty line is ignored. Now the value of skyColor is replaced</span>
<span class="c1"># with &#39;blue&#39;.</span>
<span class="c1"># The final value of a parameter is the result of the last assignment parsed</span>
<span class="c1"># from top to bottom.</span>
<span class="na">agencyID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">gempa</span>
</pre></div>
</div>
</section>
<section id="lists">
<h3>Lists<a class="headerlink" href="#lists" title="Permalink to this heading"></a></h3>
<p>Values can be either scalar values or lists. List items are separated by commas.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># This is a list definition</span>
<span class="n">rainbowColors</span> <span class="o">=</span> <span class="n">red</span><span class="p">,</span> <span class="n">orange</span><span class="p">,</span> <span class="n">yellow</span><span class="p">,</span> <span class="n">green</span><span class="p">,</span> <span class="n">blue</span><span class="p">,</span> <span class="n">indigo</span><span class="p">,</span> <span class="n">violet</span>
</pre></div>
</div>
<p>If a value needs to include a comma, white space or any other special
character it can either be escaped with backslash (\) or quoted with double
quotes (“). Whitespaces are removed in unquoted and unescaped values.</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="c1"># This is a comment</span>
<span class="c1"># The following list definitions have 2 items: 1,2 and 3,4</span>
<span class="c1"># quoted values</span>
<span class="na">tuples</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;1,2&quot;, &quot;3,4&quot;</span>
<span class="c1"># escaped values</span>
<span class="na">tuples</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">1</span><span class="se">\,</span><span class="s">2, 3</span><span class="se">\,</span><span class="s">4</span>
</pre></div>
</div>
<p>The value of the parameter tuples is now <cite>[“1,2”, “3,4”]</cite>.</p>
</section>
<section id="multi-line">
<h3>Multi-line<a class="headerlink" href="#multi-line" title="Permalink to this heading"></a></h3>
<p>Values can extend over multiple lines if a backslash is appended to each line</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="c1"># Multi-line string</span>
<span class="na">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;Hello world. &quot;</span><span class="se">\</span>
<span class="w"> </span><span class="s">&quot;This text spawns 3 lines in the configuration file &quot;</span><span class="se">\</span>
<span class="w"> </span><span class="s">&quot;but only one line in the final value.&quot;</span>
<span class="c1"># Multiline list definition</span>
<span class="na">rainbowColors</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">red,</span><span class="se">\</span>
<span class="w"> </span><span class="s">orange,</span><span class="se">\</span>
<span class="w"> </span><span class="s">yellow,</span><span class="se">\</span>
<span class="w"> </span><span class="s">green, blue,</span><span class="se">\</span>
<span class="w"> </span><span class="s">indigo, violet</span>
</pre></div>
</div>
</section>
<section id="control-characters">
<h3>Control characters<a class="headerlink" href="#control-characters" title="Permalink to this heading"></a></h3>
<p>A limited set of control characters is allowed within strings.</p>
<table class="docutils align-left">
<colgroup>
<col style="width: 10.0%" />
<col style="width: 90.0%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>\n</p></td>
<td><p>new line</p></td>
</tr>
<tr class="row-even"><td><p>\t</p></td>
<td><p>tab</p></td>
</tr>
</tbody>
</table>
<p>Example of a string consisting of two lines:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;123 456&quot;</span><span class="se">\n</span><span class="s">&quot;This is a new line with text&quot;</span>
</pre></div>
</div>
<p>The control characters must be outside of double quotes. Everything <strong>within</strong>
double quotes will <strong>not</strong> be decoded. Hence, “n” will end up as the string
“n” and not a new line character.</p>
</section>
<section id="namespaces">
<h3>Namespaces<a class="headerlink" href="#namespaces" title="Permalink to this heading"></a></h3>
<p>A basic usage of variable names is to organize them in namespaces. A common
habit is to separate namespaces and variable names with a period character:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">colors.sky</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">blue</span>
<span class="na">colors.grass</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">green</span>
</pre></div>
</div>
<p>Here a namespace called <code class="docutils literal notranslate"><span class="pre">colors</span></code> is used. The configuration file parser does
not care about namespaces at all. The final name (including the periods) is what
counts. But to avoid repeating namespaces again and again, declarations can
be wrapped in a namespace block. See the following example:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">colors</span><span class="w"> </span><span class="s">{</span>
<span class="w"> </span><span class="na">sky</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">blue</span>
<span class="w"> </span><span class="na">grass</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">green</span>
<span class="na">}</span>
</pre></div>
</div>
<p>Application code will still access <code class="docutils literal notranslate"><span class="pre">colors.sky</span></code> and <code class="docutils literal notranslate"><span class="pre">colors.grass</span></code>.
Namespaces can be arbitrarily nested and even survive includes.</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">A</span><span class="w"> </span><span class="s">{</span>
<span class="w"> </span><span class="na">B1</span><span class="w"> </span><span class="s">{</span>
<span class="w"> </span><span class="na">var1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">123</span>
<span class="w"> </span><span class="na">}</span>
<span class="w"> </span><span class="na">B2</span><span class="w"> </span><span class="s">{</span>
<span class="w"> </span><span class="na">var1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">456</span>
<span class="w"> </span><span class="na">}</span>
<span class="na">}</span>
</pre></div>
</div>
<p>The final list of parameter names is:</p>
<ul class="simple">
<li><p>A.B1.var1</p></li>
<li><p>A.B2.var1</p></li>
</ul>
</section>
</section>
<section id="variables">
<span id="concepts-configuration-variables"></span><h2>Variables<a class="headerlink" href="#variables" title="Permalink to this heading"></a></h2>
<p>Environment or preceding configuration variables (configuration parameters) can
be used as values for <a class="reference internal" href="#concepts-configuration-parameters"><span class="std std-ref">parameters</span></a> in
the configuration of SeisComP modules with <cite>${var}</cite>, e.g.</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">plugins</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">${plugins}, hypo71</span>
<span class="na">homeDir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">${HOME}</span>
<span class="na">myPath</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">${homeDir}/test</span>
<span class="na">myseiscomp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">${SEISCOMP_ROOT}</span>
</pre></div>
</div>
<p><cite>SeisComP</cite> knows internal variables defining the it environment. The can be used
with <cite>&#64;var&#64;</cite>, e.g.</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">autoloc.stationConfig</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">@DATAGDIR@/autoloc/station.conf</span>
</pre></div>
</div>
<p>Available internal <cite>SeisComP</cite> variables are:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Variable</p></th>
<th class="head"><p>Value</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>ROOTDIR</p></td>
<td><p>$SEISCOMP_ROOT</p></td>
</tr>
<tr class="row-odd"><td><p>DEFAUTLCONFIGDIR</p></td>
<td><p>$SEISCOMP_ROOT/etc/defaults</p></td>
</tr>
<tr class="row-even"><td><p>SYSTEMCONFIGDIR</p></td>
<td><p>$SEISCOMP_ROOT/etc</p></td>
</tr>
<tr class="row-odd"><td><p>DATADIR</p></td>
<td><p>$SEISCOMP_ROOT/share</p></td>
</tr>
<tr class="row-even"><td><p>CONFIGDIR</p></td>
<td><p>$HOME/.seiscomp</p></td>
</tr>
<tr class="row-odd"><td><p>LOGDIR</p></td>
<td><p>$HOME/.seiscomp/log</p></td>
</tr>
</tbody>
</table>
<p>The list of internal <cite>SeisComP</cite> variables can also be read in the information
panel of <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.</p>
<figure class="align-center" id="id9">
<a class="reference internal image-reference" href="../../_images/scconfig_information.png"><img alt="scconfig: information panel" src="../../_images/scconfig_information.png" style="width: 18cm;" /></a>
<figcaption>
<p><span class="caption-text">scconfig information panel indicating the internal <cite>SeisComP</cite> variables.</span><a class="headerlink" href="#id9" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>The internal <cite>SeisComP</cite> variable CONFIGDIR can be re-defined by the SHELL
environment variable SEISCOMP_LOCAL_CONFIG. Setting SEISCOMP_LOCAL_CONFIG will
also effect LOGDIR which is automatically set to
<code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_LOCAL_CONFIG/log</span></code>.
Example:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span><span class="w"> </span><span class="nv">SEISCOMP_LOCAL_CONFIG</span><span class="o">=</span>/var/log/seiscomp
</pre></div>
</div>
</section>
<section id="related-tools">
<h2>Related Tools<a class="headerlink" href="#related-tools" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p><a class="reference internal" href="../../apps/bindings2cfg.html#bindings2cfg"><span class="std std-ref">bindings2cfg</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scchkcfg.html#scchkcfg"><span class="std std-ref">scchkcfg</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scdumpcfg.html#scdumpcfg"><span class="std std-ref">scdumpcfg</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scxmldump.html#scxmldump"><span class="std std-ref">scxmldump</span></a></p></li>
</ul>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Configuration</a><ul>
<li><a class="reference internal" href="#scope">Scope</a></li>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#configuration-of-modules">Configuration of Modules</a><ul>
<li><a class="reference internal" href="#module-configuration">Module configuration</a><ul>
<li><a class="reference internal" href="#adjusting">Adjusting</a></li>
<li><a class="reference internal" href="#application">Application</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bindings-configuration">Bindings configuration</a><ul>
<li><a class="reference internal" href="#id1">Adjusting</a></li>
<li><a class="reference internal" href="#seiscomp-shell">SeisComP shell</a></li>
<li><a class="reference internal" href="#example-global-bindings">Example: global bindings</a></li>
<li><a class="reference internal" href="#reading-bindings">Reading bindings</a></li>
<li><a class="reference internal" href="#id2">Application</a></li>
<li><a class="reference internal" href="#summary">Summary</a></li>
</ul>
</li>
<li><a class="reference internal" href="#validation">Validation</a></li>
</ul>
</li>
<li><a class="reference internal" href="#format-of-parameters">Format of Parameters</a><ul>
<li><a class="reference internal" href="#basic">Basic</a></li>
<li><a class="reference internal" href="#comments">Comments</a></li>
<li><a class="reference internal" href="#lists">Lists</a></li>
<li><a class="reference internal" href="#multi-line">Multi-line</a></li>
<li><a class="reference internal" href="#control-characters">Control characters</a></li>
<li><a class="reference internal" href="#namespaces">Namespaces</a></li>
</ul>
</li>
<li><a class="reference internal" href="#variables">Variables</a></li>
<li><a class="reference internal" href="#related-tools">Related Tools</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="inventory.html"
title="previous chapter">Inventory</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="magnitudes.html"
title="next chapter">Magnitudes</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/concepts/configuration.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,280 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Database &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Waveform archives" href="waveformarchives.html" />
<link rel="prev" title="SeisComP plugins" href="plugins.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="waveformarchives.html" title="Waveform archives"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="plugins.html" title="SeisComP plugins"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../concepts.html" accesskey="U">Concepts</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="database">
<span id="concepts-database"></span><h1>Database<a class="headerlink" href="#database" title="Permalink to this heading"></a></h1>
<section id="scope">
<h2>Scope<a class="headerlink" href="#scope" title="Permalink to this heading"></a></h2>
<p>This chapter provides an overview over databases supported by <cite>SeisComP</cite>.</p>
</section>
<section id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h2>
<p><cite>SeisComP</cite> can store and read information from a relational database management
system (RDBMS). Supported are basically all existing RDBMS for which a plugin
can be written. Currently, <a class="reference internal" href="plugins.html#concepts-plugins"><span class="std std-ref">database plugins</span></a> are
provided for</p>
<table class="docutils align-left">
<colgroup>
<col style="width: 50.0%" />
<col style="width: 50.0%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Database</p></th>
<th class="head"><p>Plugin Name</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>MySQL / MariaDB</p></td>
<td><p><em>dbmysql</em></p></td>
</tr>
<tr class="row-odd"><td><p>PostgreSQL</p></td>
<td><p><em>dbpostgresql</em></p></td>
</tr>
<tr class="row-even"><td><p>SQLite3</p></td>
<td><p><em>dbsqlite3</em></p></td>
</tr>
</tbody>
</table>
<section id="database-access">
<h3>Database access<a class="headerlink" href="#database-access" title="Permalink to this heading"></a></h3>
<p>Typically, the database is accessed by the messaging (<a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a>) for
reading and writing.
Most other modules can only read from the database but do not write into it.
Among the few exceptions which can also directly write to the database are
<a class="reference internal" href="../../apps/scdb.html#scdb"><span class="std std-ref">scdb</span></a> and <a class="reference internal" href="../../apps/scardac.html#scardac"><span class="std std-ref">scardac</span></a>.</p>
<p>The database connection provided by the messaging is configured by the
<a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster module configuration</span></a>. <a class="reference internal" href="modules.html#concepts-modules"><span class="std std-ref">Modules</span></a>
connected to the messaging receive the read connection parameters through the
messaging connection. However, the default read connection by these and all
other modules may be set with <a class="reference internal" href="../../apps/global.html#confval-database"><code class="xref std std-confval docutils literal notranslate"><span class="pre">database</span></code></a> in
<a class="reference internal" href="../../apps/global.html#global-configuration"><span class="std std-ref">global configuration</span></a> or set on the command line
using <code class="xref std std-option docutils literal notranslate"><span class="pre">--database</span></code> or simply <code class="xref std std-option docutils literal notranslate"><span class="pre">-d</span></code>.
Read the sections <a class="reference internal" href="../installation.html#installation"><span class="std std-ref">SeisComP Installation</span></a> and <a class="reference internal" href="../getting-started.html#getting-started"><span class="std std-ref">Getting Started with SeisComP</span></a> on the
installation and the configuration of the database backend and the initial setup
of the database itself, respectively.</p>
<p>The database connection may be used together with the <em>debug</em> option to print
the database commands along with debug log output. Example for using
<a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a> in offline mode with database debug output:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scolv<span class="w"> </span>-d<span class="w"> </span>localhost?debug<span class="w"> </span>--offline<span class="w"> </span>--debug
</pre></div>
</div>
</section>
<section id="database-schema">
<h3>Database schema<a class="headerlink" href="#database-schema" title="Permalink to this heading"></a></h3>
<p>The used database schema is well defined and respected by all modules which
access the database. It is similar to the SeisComML schema (<a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a>,
a version of XML) and the C++ / Python class hierarchy of the datamodel
namespace / package.</p>
<p>Information of the following objects can be stored in the database as set out in
the <a class="reference internal" href="../api-python.html#api-datamodel-python"><span class="std std-ref">documentation of the data model</span></a>.</p>
<table class="docutils align-left">
<colgroup>
<col style="width: 25.0%" />
<col style="width: 75.0%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Object</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference internal" href="configuration.html#concepts-configuration"><span class="std std-ref">Config</span></a></p></td>
<td><p>station bindings</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../api-python.html#api-datamodel-python"><span class="std std-ref">DataAvailability</span></a></p></td>
<td><p>information on continuous data records</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../api-python.html#api-datamodel-python"><span class="std std-ref">EventParameters</span></a></p></td>
<td><p>derived objects like picks, amplitudes, magnitudes origins, events, etc.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="inventory.html#concepts-inventory"><span class="std std-ref">Inventory</span></a></p></td>
<td><p>station meta data</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../api-python.html#api-datamodel-python"><span class="std std-ref">Journaling</span></a></p></td>
<td><p>information on commands and actions, e.g., by <a class="reference internal" href="../../apps/scevent.html#scevent-journals"><span class="std std-ref">scevent</span></a></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../api-python.html#api-datamodel-python"><span class="std std-ref">QualityControl</span></a></p></td>
<td><p>waveform quality control parameters</p></td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The Config parameters just cover station bindings. Application/module specific
configurations (all .cfg files) are not stored in the database and only kept
in files.</p>
</div>
<p>The currently supported version of the database schema can be queried by any
module connecting to the data base using the option <code class="xref std std-option docutils literal notranslate"><span class="pre">-V</span></code>. Example:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>scm<span class="w"> </span>-V
<span class="w"> </span>scm
<span class="w"> </span>Framework:<span class="w"> </span><span class="m">6</span>.0.0<span class="w"> </span>Development
<span class="w"> </span>API<span class="w"> </span>version:<span class="w"> </span><span class="m">16</span>.0.0
<span class="w"> </span>Data<span class="w"> </span>schema<span class="w"> </span>version:<span class="w"> </span><span class="m">0</span>.12
<span class="w"> </span>GIT<span class="w"> </span>HEAD:<span class="w"> </span>5e16580cc
<span class="w"> </span>Compiler:<span class="w"> </span>c++<span class="w"> </span><span class="o">(</span>Ubuntu<span class="w"> </span><span class="m">11</span>.4.0-1ubuntu1~22.04<span class="o">)</span><span class="w"> </span><span class="m">11</span>.4.0
<span class="w"> </span>Build<span class="w"> </span>system:<span class="w"> </span>Linux<span class="w"> </span><span class="m">6</span>.2.0-26-generic
<span class="w"> </span>OS:<span class="w"> </span>Ubuntu<span class="w"> </span><span class="m">22</span>.04.3<span class="w"> </span>LTS<span class="w"> </span>/<span class="w"> </span>Linux
</pre></div>
</div>
</section>
</section>
<section id="related-modules">
<h2>Related Modules<a class="headerlink" href="#related-modules" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p><a class="reference internal" href="../../apps/scardac.html#scardac"><span class="std std-ref">scardac</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scdb.html#scdb"><span class="std std-ref">scdb</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scdbstrip.html#scdbstrip"><span class="std std-ref">scdbstrip</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scdispatch.html#scdispatch"><span class="std std-ref">scdispatch</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scquery.html#scquery"><span class="std std-ref">scquery</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scqueryqc.html#scqueryqc"><span class="std std-ref">scqueryqc</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scxmldump.html#scxmldump"><span class="std std-ref">scxmldump</span></a></p></li>
</ul>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Database</a><ul>
<li><a class="reference internal" href="#scope">Scope</a></li>
<li><a class="reference internal" href="#overview">Overview</a><ul>
<li><a class="reference internal" href="#database-access">Database access</a></li>
<li><a class="reference internal" href="#database-schema">Database schema</a></li>
</ul>
</li>
<li><a class="reference internal" href="#related-modules">Related Modules</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="plugins.html"
title="previous chapter">SeisComP plugins</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="waveformarchives.html"
title="next chapter">Waveform archives</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/concepts/database.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,359 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Inventory &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Configuration" href="configuration.html" />
<link rel="prev" title="RecordStream" href="recordstream.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="configuration.html" title="Configuration"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="recordstream.html" title="RecordStream"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../concepts.html" accesskey="U">Concepts</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="inventory">
<span id="concepts-inventory"></span><h1>Inventory<a class="headerlink" href="#inventory" title="Permalink to this heading"></a></h1>
<section id="scope">
<h2>Scope<a class="headerlink" href="#scope" title="Permalink to this heading"></a></h2>
<p>This chapter describes the concept of inventories.</p>
</section>
<section id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h2>
<p>In <cite>SeisComP</cite> the term <a class="reference internal" href="../glossary.html#term-inventory"><span class="xref std std-term">inventory</span></a> refers to the meta data of data recording
stations.
Many <cite>SeisComP</cite> <a class="reference internal" href="modules.html#concepts-modules"><span class="std std-ref">modules</span></a> require inventory information to
operate correctly and a correct inventory is therefore fundamental to <cite>SeisComP</cite>.</p>
<p>The inventory will be read from the <a class="reference internal" href="database.html#concepts-database"><span class="std std-ref">database</span></a>
by default. To insert or update the inventory in the database, this information
needs to be created or downloaded and converted. The following sections will
describe the process of populating the database and how applications get access
to it.</p>
<p>The format used for inventory is known as <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a>. Correct inventory in
<a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> format can be generated by <span id="id1"><em>SMP</em> [<a class="reference internal" href="../references.html#id268" title="SMP. Station Management Portal by gempa GmbH. URL: https://smp.gempa.de/.">22</a>]</span>. Some modules for
<strong>converting from other formats</strong> are listed in section
<a class="reference internal" href="#concepts-inventory-format"><span class="std std-ref">Inventory Format</span></a>. Tools for <strong>processing inventory</strong> are
listed in section <a class="reference internal" href="#concepts-inventory-tools"><span class="std std-ref">Related Tools</span></a>.</p>
<p>The inventory shall contain all meta data describing the full recording system
and the
pre-processing of the raw data stream provided to the data processing modules
using the <a class="reference internal" href="recordstream.html#concepts-recordstream"><span class="std std-ref">RecordStream</span></a>. Inventories should be
always complete w.r.t the
processed data streams, correct and up-to-date. Beside network, station, location
and stream information they must include the full sensor and datalogger responses.</p>
<p>Older version used key files to configure available networks and stations.
Because the support of response meta-data was very limited, tools were build to
add this functionality. Since the release of Seattle the concept of key files
for station meta-data has been completely removed from the system. Now <cite>SeisComP</cite>
only handles station meta-data in its own XML format called <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a>.
The task of supporting old key files, dataless SEED and other formats has been
out-sourced to external applications. The inventory synchronization is a
<a class="reference internal" href="#config-fig-inventory-sync"><span class="std std-ref">two-stage process</span></a>:</p>
<ol class="arabic simple">
<li><p>Convert <a class="reference internal" href="#concepts-inventory-format"><span class="std std-ref">external formats</span></a> into <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a></p></li>
<li><p>Synchronize inventory pool with the database: merged all inventory files and
synchronize with the database using <strong class="program">scinv snyc</strong>.</p></li>
</ol>
<figure class="align-center" id="id5">
<span id="config-fig-inventory-sync"></span><a class="reference internal image-reference" href="../../_images/inventory-sync.png"><img alt="../../_images/inventory-sync.png" src="../../_images/inventory-sync.png" style="width: 12cm;" /></a>
<figcaption>
<p><span class="caption-text">Inventory synchronization as a two-stage process</span><a class="headerlink" href="#id5" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>All station meta-data are stored in <code class="file docutils literal notranslate"><span class="pre">etc/inventory</span></code>
and can be organized as needed. Either one file per network, a file containing the
complete inventory or one file for all instruments and one file per station.
The update script</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>scinv<span class="w"> </span>sync
</pre></div>
</div>
<p>loads the existing inventory from the database and merges each file in <code class="file docutils literal notranslate"><span class="pre">etc/inventory</span></code>.
Finally it removes all unreferenced objects and sends all updates to the database.</p>
<p>The <cite>SeisComP</cite> <a class="reference internal" href="modules.html#concepts-modules"><span class="std std-ref">configuration</span></a> does not deal with station
meta-data anymore.
It only configures parameters for modules and module-station associations.
The management of the inventory can and should be handled by external tools
e.g. <span id="id2"><em>SMP</em> [<a class="reference internal" href="../references.html#id268" title="SMP. Station Management Portal by gempa GmbH. URL: https://smp.gempa.de/.">22</a>]</span>.</p>
<p>The <cite>SeisComP</cite> documentation describes the
<a class="reference internal" href="../api-python.html#api-datamodel-python"><span class="std std-ref">data model including the inventory</span></a>.</p>
</section>
<section id="inventory-format">
<span id="concepts-inventory-format"></span><h2>Inventory Format<a class="headerlink" href="#inventory-format" title="Permalink to this heading"></a></h2>
<p>A typical inventory file in <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> looks like this:</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="nt">&lt;seiscomp</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">&quot;http://geofon.gfz-potsdam.de/ns/seiscomp-schema/0.11&quot;</span><span class="w"> </span><span class="na">version=</span><span class="s">&quot;0.11&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;Inventory&gt;</span>
<span class="w"> </span><span class="nt">&lt;sensor&gt;</span>...
<span class="w"> </span><span class="nt">&lt;datalogger&gt;</span>...
<span class="w"> </span><span class="nt">&lt;network&gt;</span>...
<span class="w"> </span><span class="nt">&lt;/Inventory&gt;</span>
<span class="nt">&lt;/seiscomp&gt;</span>
</pre></div>
</div>
<p>The version attribute of the <code class="docutils literal notranslate"><span class="pre">seiscomp</span></code> tag represents the schema version of
the <cite>SeisComP</cite> data model which is consistent with the database schema version
and the version of all other representations.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>All geographic coordinates (latitudes, longitudes, elevation) are assumed in the
World Geodetic System 1984 (WGS84) reference system (National Imagery and
Mapping Agency 2000). Latitudes, longitudes are provided in degrees but
elevations are given in meters.</p>
</div>
<p>Inventories must be provided to <cite>SeisComP</cite> in XML files in <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> format. A
convenient way to generate clean and correct inventory files in <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a>
format is <span id="id3"><em>SMP</em> [<a class="reference internal" href="../references.html#id268" title="SMP. Station Management Portal by gempa GmbH. URL: https://smp.gempa.de/.">22</a>]</span>. Tools are provided to convert between other formats:</p>
<table class="docutils align-left">
<colgroup>
<col style="width: 50.0%" />
<col style="width: 50.0%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Module namespace</p></th>
<th class="head"><p>Conversion</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>arclink2inv</p></td>
<td><p>Arclink XML to SeisComPML</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../../apps/dlsv2inv.html#dlsv2inv"><span class="std std-ref">dlsv2inv</span></a></p></td>
<td><p>dataless SEED to SeisComPML</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../../apps/inv2dlsv.html#inv2dlsv"><span class="std std-ref">inv2dlsv</span></a></p></td>
<td><p>SeisComPML to dataless SEED</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../../apps/fdsnxml2inv.html#fdsnxml2inv"><span class="std std-ref">fdsnxml2inv</span></a></p></td>
<td><p>FDSN StationXML to SeisComPML and back</p></td>
</tr>
</tbody>
</table>
</section>
<section id="adding-updating-inventory">
<h2>Adding / Updating Inventory<a class="headerlink" href="#adding-updating-inventory" title="Permalink to this heading"></a></h2>
<p>To add inventory information to the <cite>SeisComP</cite> database one either has to write directly
to the database with custom script (not recommended) or place <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> files
in <code class="file docutils literal notranslate"><span class="pre">&#64;SYSTEMCONFIGDIR&#64;/inventory</span></code>. The service to import all data in that
directory can be called with</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span>update-config<span class="w"> </span>inventory
</pre></div>
</div>
<p>This command runs <a class="reference internal" href="../../apps/scinv.html#scinv"><span class="std std-ref">scinv</span></a> finally. <a class="reference internal" href="../../apps/scinv.html#scinv"><span class="std std-ref">scinv</span></a> merges all XML files and
synchronizes the merged local inventory tree with the database. That is a
rather complex process and for more information it is recommended to study
the source code of <a class="reference internal" href="../../apps/scinv.html#scinv"><span class="std std-ref">scinv</span></a>. The bottom line is that inventory data is created
from <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> files.</p>
<p>Because nobody will ever create such XML files by hand, tools are necessary.
A quite popular tools is the online station management portal (SMP)
<span id="id4">[<a class="reference internal" href="../references.html#id268" title="SMP. Station Management Portal by gempa GmbH. URL: https://smp.gempa.de/.">22</a>]</span>. SMP will output XML in version of <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> directly.</p>
<p>Another source is the FDSN station webservice (FDSNWS). If the <cite>SeisComP</cite>
implementation of FDSNWS is used, the SeisComP XML format can be requested
directly as an extension. Otherwise FDSN StationXML will be provided. Inventory
in FDSN StationXML needs to be converted with either <a class="reference internal" href="../../apps/fdsnxml2inv.html#fdsnxml2inv"><span class="std std-ref">fdsnxml2inv</span></a> or
<a class="reference internal" href="../../apps/import_inv.html#import-inv"><span class="std std-ref">import_inv</span></a>. The latter is a more versatile application that also supports
several import formats.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>import_inv<span class="w"> </span>fdsnxml<span class="w"> </span>download-1234.xml
</pre></div>
</div>
<p>This will automatically place the output XML file in
<code class="file docutils literal notranslate"><span class="pre">&#64;SYSTEMCONFIGDIR&#64;/inventory</span></code>. Afterwards call</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span>update-config<span class="w"> </span>inventory
</pre></div>
</div>
<p>to synchronize the changes with the database. If <strong class="program">scconfig</strong> is used,
then either the <code class="docutils literal notranslate"><span class="pre">Sync</span></code> button of the <cite>Inventory</cite> panel or the
<code class="docutils literal notranslate"><span class="pre">Update</span> <span class="pre">configuration</span></code> button of the <code class="docutils literal notranslate"><span class="pre">System</span></code> panel must pressed.</p>
<p><strong>Summary</strong></p>
<p>In order to populate the database with inventory information, the following
steps have to be performed:</p>
<ol class="arabic">
<li><p>Convert existing station meta data formats to <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a></p></li>
<li><p>Place all <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> files at <code class="file docutils literal notranslate"><span class="pre">&#64;SYSTEMCONFIGDIR&#64;/inventory</span></code></p></li>
<li><p>Synchronize the inventory files and write the meta data to the database. Run</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>scinv<span class="w"> </span>sync
</pre></div>
</div>
<p>or</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span>update-config<span class="w"> </span>inventory
</pre></div>
</div>
</li>
</ol>
</section>
<section id="reading-inventory">
<h2>Reading Inventory<a class="headerlink" href="#reading-inventory" title="Permalink to this heading"></a></h2>
<p>Applications usually connect to the database and read the necessary inventory
information. An application can decide whether it requires full response
information including sensor and data logger response functions or just channel
information without instrument descriptions. The latter performs faster and
some applications do not require full instrument information.</p>
<p>An application usually does not require special configuration to read inventory
information. A database connection is enough and it comes usually along with the
handshake message of the messaging server.</p>
<p>If the messaging is not involved, the database can be specified by the
command-line option <code class="docutils literal notranslate"><span class="pre">-d</span></code>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>myapp<span class="w"> </span>-d<span class="w"> </span><span class="o">[</span>type<span class="o">]</span>://<span class="o">[</span>user<span class="o">]</span>:<span class="o">[</span>password<span class="o">]</span>@<span class="o">[</span>host<span class="o">]</span>:<span class="o">[</span>port<span class="o">]</span>
</pre></div>
</div>
<p>There are cases when an application should be run without a database connection
but requires inventory information, particularly in combination with the
<code class="docutils literal notranslate"><span class="pre">--ep</span></code> command line argument. To direct an application to an inventory XML file
(again in <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> format), <code class="docutils literal notranslate"><span class="pre">--inventory-db</span></code> must be used:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>myapp<span class="w"> </span>--inventory-db<span class="w"> </span>inventory.xml
</pre></div>
</div>
<p>The option <code class="docutils literal notranslate"><span class="pre">--inventory-db</span></code> will cause the module to completely bypass
the database for reading inventory information even if used for event
information. The file <code class="file docutils literal notranslate"><span class="pre">inventory.xml</span></code> can be created from the database
using <a class="reference internal" href="../../apps/scxmldump.html#scxmldump"><span class="std std-ref">scxmldump</span></a>.</p>
</section>
<section id="related-tools">
<span id="concepts-inventory-tools"></span><h2>Related Tools<a class="headerlink" href="#related-tools" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>arclink2inv</p></li>
<li><p><a class="reference internal" href="../../apps/dlsv2inv.html#dlsv2inv"><span class="std std-ref">dlsv2inv</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/fdsnxml2inv.html#fdsnxml2inv"><span class="std std-ref">fdsnxml2inv</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/import_inv.html#import-inv"><span class="std std-ref">import_inv</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/invextr.html#invextr"><span class="std std-ref">invextr</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/inv2dlsv.html#inv2dlsv"><span class="std std-ref">inv2dlsv</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/sccnv.html#sccnv"><span class="std std-ref">sccnv</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scinv.html#scinv"><span class="std std-ref">scinv</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scxmldump.html#scxmldump"><span class="std std-ref">scxmldump</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/tab2inv.html#tab2inv"><span class="std std-ref">tab2inv</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/tabinvmodifier.html#tabinvmodifier"><span class="std std-ref">tabinvmodifier</span></a></p></li>
</ul>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Inventory</a><ul>
<li><a class="reference internal" href="#scope">Scope</a></li>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#inventory-format">Inventory Format</a></li>
<li><a class="reference internal" href="#adding-updating-inventory">Adding / Updating Inventory</a></li>
<li><a class="reference internal" href="#reading-inventory">Reading Inventory</a></li>
<li><a class="reference internal" href="#related-tools">Related Tools</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="recordstream.html"
title="previous chapter">RecordStream</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="configuration.html"
title="next chapter">Configuration</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/concepts/inventory.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,478 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Locators &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Glossary" href="../glossary.html" />
<link rel="prev" title="Magnitudes" href="magnitudes.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="../glossary.html" title="Glossary"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="magnitudes.html" title="Magnitudes"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../concepts.html" accesskey="U">Concepts</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="locators">
<span id="concepts-locators"></span><h1>Locators<a class="headerlink" href="#locators" title="Permalink to this heading"></a></h1>
<p>Locators receive <a class="reference internal" href="../glossary.html#term-pick"><span class="xref std std-term">phase picks</span></a> from modules such as <a class="reference internal" href="../../apps/scautoloc.html#scautoloc"><span class="std std-ref">scautoloc</span></a>,
<a class="reference internal" href="../../apps/screloc.html#screloc"><span class="std std-ref">screloc</span></a> or <a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a> for locating seismic or non-seismic sources. The
solutions may include source time and location with or without uncertainties.
They are used to form new <a class="reference internal" href="../glossary.html#term-origin"><span class="xref std std-term">origins</span></a> which can be treated
further.</p>
<p><cite>SeisComP</cite> ships with built-in locators:</p>
<ul class="simple">
<li><p><a class="reference internal" href="../../apps/global_fixedhypocenter.html#global-fixedhypocenter"><span class="std std-ref">FixedHypocenter</span></a> (FH)</p></li>
<li><p><a class="reference internal" href="../../apps/global_hypo71.html#global-hypo71"><span class="std std-ref">Hypo71</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/global_iloc.html#global-iloc"><span class="std std-ref">iLoc</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/global_locsat.html#global-locsat"><span class="std std-ref">LOCSAT</span></a>, the default locator in <a class="reference internal" href="../../apps/scautoloc.html#scautoloc"><span class="std std-ref">scautoloc</span></a> and <a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/global_nonlinloc.html#global-nonlinloc"><span class="std std-ref">NonLinLoc</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/global_stdloc.html#global-stdloc"><span class="std std-ref">StdLoc</span></a></p></li>
</ul>
<p>and a none built-in locator:</p>
<ul class="simple">
<li><p><a class="reference internal" href="../../apps/global_locext.html#global-locext"><span class="std std-ref">LocExt</span></a>.</p></li>
</ul>
<p>While the built-in locators are well defined and documented, any other external
locator routine can be added to <cite>SeisComP</cite> by configuration of the locator
<a class="reference internal" href="../../apps/global_locext.html#global-locext"><span class="std std-ref">LocExt</span></a> and custom scripts.
LOCSAT and FixedHypocenter are native to <cite>SeisComP</cite>. All other locators are
implemented as <a class="reference internal" href="../glossary.html#term-plugin"><span class="xref std std-term">plugins</span></a>. A <a class="reference internal" href="../glossary.html#term-plugin"><span class="xref std std-term">plugin</span></a>
needs to be added to the list of loaded plugins by configuration of the global
parameter <a class="reference internal" href="../../apps/global.html#confval-plugins"><code class="xref std std-confval docutils literal notranslate"><span class="pre">plugins</span></code></a> for making the corresponding locator available to
<cite>SeisComP</cite> applications.</p>
<p>A comparison of the locators is given in the table below.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The specifications given below may depend on the configuration of the
respective locator. Please carefully read the documentation of the locators
for optimizing their performance.</p>
</div>
<table class="docutils align-center">
<colgroup>
<col style="width: 30.0%" />
<col style="width: 10.0%" />
<col style="width: 10.0%" />
<col style="width: 10.0%" />
<col style="width: 10.0%" />
<col style="width: 10.0%" />
<col style="width: 10.0%" />
<col style="width: 10.0%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"></th>
<th class="head"><p>FH</p></th>
<th class="head"><p>Hypo71</p></th>
<th class="head"><p>iLoc</p></th>
<th class="head"><p>LocExt</p></th>
<th class="head"><p>LOCSAT</p></th>
<th class="head"><p>NonLinLoc</p></th>
<th class="head"><p>StdLoc</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><strong>Applications</strong></p></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>phases considered by default</p></td>
<td><p>seismic / infrasound</p></td>
<td><p>seismic</p></td>
<td><p>seismic / infrasound / hydroacoustic</p></td>
<td><p>[3]</p></td>
<td><p>seismic / infrasound</p></td>
<td><p>seismic</p></td>
<td><p>seismic</p></td>
</tr>
<tr class="row-even"><td><p>distance ranges of application</p></td>
<td><p>local / regional / teleseismic</p></td>
<td><p>local / regional</p></td>
<td><p>local / regional / teleseismic</p></td>
<td><p>[3]</p></td>
<td><p>local / regional / teleseismic</p></td>
<td><p>local / regional / teleseismic</p></td>
<td><p>local / regional [4]</p></td>
</tr>
<tr class="row-odd"><td><p>application with default configuration</p></td>
<td><p>regional / teleseismic</p></td>
<td><p></p></td>
<td><p>regional / global</p></td>
<td><p>[3]</p></td>
<td><p>regional / teleseismic</p></td>
<td><p></p></td>
<td><p>local / regional [1]</p></td>
</tr>
<tr class="row-even"><td><p><strong>Algorithm</strong></p></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>inversion algorithm</p></td>
<td><p>linear</p></td>
<td><p>iterative</p></td>
<td><p>configurable</p></td>
<td><p>[3]</p></td>
<td><p>grid search</p></td>
<td><p>probabilistic</p></td>
<td><p>configurable</p></td>
</tr>
<tr class="row-even"><td><p>automatic phase renaming</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>[3]</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p>considers network code</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>[3]</p></td>
<td><p></p></td>
<td><p>✅ [1]</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p>positive station elevation</p></td>
<td><p>✅ [2/4]</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>[3]</p></td>
<td><p>✅ [2]</p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p>negative station elevation</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>[3]</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p>considers pick time</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>[3]</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p>considers pick slowness</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>[3]</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p>considers pick backazimuth</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>[3]</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p>speed</p></td>
<td><p>fast</p></td>
<td><p>fast</p></td>
<td><p>fast - intermediate</p></td>
<td><p>[3]</p></td>
<td><p>fast</p></td>
<td><p>intermediate</p></td>
<td><p>fast - intermediate</p></td>
</tr>
<tr class="row-even"><td><p><strong>Velocity model</strong></p></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>velocity model</p></td>
<td><p>1D [4]</p></td>
<td><p>1D</p></td>
<td><p>1D</p></td>
<td><p>[3]</p></td>
<td><p>1D</p></td>
<td><p>1D / 3D</p></td>
<td><p>1D / 3D [4]</p></td>
</tr>
<tr class="row-even"><td><p>independent Vp and Vs</p></td>
<td><p>✅ [4]</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>[3]</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>✅ [4]</p></td>
</tr>
<tr class="row-odd"><td><p>default velocity model</p></td>
<td><p>iasp91 / tab</p></td>
<td><p></p></td>
<td><p>iasp91 / ak135</p></td>
<td><p>[3]</p></td>
<td><p>iasp91 / tab</p></td>
<td><p></p></td>
<td><p>iasp91 / tab [1]</p></td>
</tr>
<tr class="row-even"><td><p>applies RSTT</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>[3]</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><strong>Hypocenter solution</strong></p></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>inverts for hypocenter location</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>[3]</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p>inverts for hypocenter time</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>[3]</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p>supports negative source depth</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p>[3]</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><strong>Configuration</strong></p></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>native or plugin to load</p></td>
<td><p></p></td>
<td><p><em>hypo71</em></p></td>
<td><p><em>lociloc</em></p></td>
<td><p><em>locext</em></p></td>
<td><p></p></td>
<td><p><em>locnll</em></p></td>
<td><p><em>stdloc</em></p></td>
</tr>
<tr class="row-odd"><td><p><cite>SeisComP</cite> provides locator</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p>operates without external files</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p>operates without custom scripts</p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><strong>Others</strong></p></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>remarks</p></td>
<td><p>intended for ground-truth tests / single-station location / any travel-time interface</p></td>
<td></td>
<td><p>operational at EMSC and ISC (earlier version)</p></td>
<td><p>any external locator can be called by a custom script</p></td>
<td><p>currently the fastest locator in <cite>SeisComP</cite> and the only one available to <a class="reference internal" href="../../apps/scautoloc.html#scautoloc"><span class="std std-ref">scautoloc</span></a></p></td>
<td><p>considers model uncertainties</p></td>
<td><p>uses travel-times from any travel-time interface</p></td>
</tr>
<tr class="row-even"><td><p>point of contact</p></td>
<td><p><span id="id1"><em>SeisComP forum</em> [<a class="reference internal" href="../references.html#id256" title="SeisComP forum. GFZ. URL: https://forum.seiscomp.de/.">24</a>]</span></p></td>
<td><p><span id="id2"><em>SeisComP forum</em> [<a class="reference internal" href="../references.html#id256" title="SeisComP forum. GFZ. URL: https://forum.seiscomp.de/.">24</a>]</span></p></td>
<td><p><a class="reference external" href="mailto:ibondar2014&#37;&#52;&#48;gmail&#46;com">ibondar2014 <span>&#64;</span>gmail<span>&#46;</span>com</a></p></td>
<td><p><span id="id3"><em>SeisComP forum</em> [<a class="reference internal" href="../references.html#id256" title="SeisComP forum. GFZ. URL: https://forum.seiscomp.de/.">24</a>]</span></p></td>
<td><p><span id="id4"><em>SeisComP forum</em> [<a class="reference internal" href="../references.html#id256" title="SeisComP forum. GFZ. URL: https://forum.seiscomp.de/.">24</a>]</span></p></td>
<td><p><span id="id5"><em>SeisComP forum</em> [<a class="reference internal" href="../references.html#id256" title="SeisComP forum. GFZ. URL: https://forum.seiscomp.de/.">24</a>]</span></p></td>
<td><p><span id="id6"><em>SeisComP forum</em> [<a class="reference internal" href="../references.html#id256" title="SeisComP forum. GFZ. URL: https://forum.seiscomp.de/.">24</a>]</span></p></td>
</tr>
</tbody>
</table>
<ul class="simple">
<li><p>[1]: requires initial or specific configuration</p></li>
<li><p>[2]: requires correction file</p></li>
<li><p>[3]: depends on selected locator</p></li>
<li><p>[4]: depends on selected travel-time interface</p></li>
</ul>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="magnitudes.html"
title="previous chapter">Magnitudes</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="../glossary.html"
title="next chapter">Glossary</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/concepts/locators.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,299 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Magnitudes &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Locators" href="locators.html" />
<link rel="prev" title="Configuration" href="configuration.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="locators.html" title="Locators"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="configuration.html" title="Configuration"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../concepts.html" accesskey="U">Concepts</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="magnitudes">
<span id="concepts-magnitudes"></span><h1>Magnitudes<a class="headerlink" href="#magnitudes" title="Permalink to this heading"></a></h1>
<p>Magnitudes are computed based on amplitudes measured from waveforms. Different
types of amplitudes and magnitudes are available which are listed in
<a class="reference internal" href="../../apps/scamp.html#scamp"><span class="std std-ref">scamp</span></a> and <a class="reference internal" href="../../apps/scmag.html#scmag"><span class="std std-ref">scmag</span></a>.</p>
<section id="amplitudes">
<h2>Amplitudes<a class="headerlink" href="#amplitudes" title="Permalink to this heading"></a></h2>
<p>Amplitudes can be measured automatically from waveforms</p>
<ul class="simple">
<li><p>During phase picking by <a class="reference internal" href="../../apps/scautopick.html#scautopick"><span class="std std-ref">scautopick</span></a> with generally fixed time windows
due to the absence of knowledge about source parameters or by,</p></li>
<li><p><a class="reference internal" href="../../apps/scamp.html#scamp"><span class="std std-ref">scamp</span></a> as soon as <a class="reference internal" href="../glossary.html#term-origin"><span class="xref std std-term">origins</span></a> are available. Depending
on the magnitude type, fixed or distance-dependent time windows apply.</p></li>
</ul>
<p>and interactively using <a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a>.</p>
<section id="instrument-simulation">
<h3>Instrument simulation<a class="headerlink" href="#instrument-simulation" title="Permalink to this heading"></a></h3>
<p>Amplitude measurements for some magnitude types require or allow the simulation
of instruments such as <a class="reference internal" href="../filter-grammar.html#WA" title="WA"><code class="xref py py-func docutils literal notranslate"><span class="pre">Wood-Anderson</span> <span class="pre">torsion</span> <span class="pre">seismometers</span></code></a>
(<span id="id1">Richter [<a class="reference internal" href="../references.html#id62" title="C.F. Richter. An instrumental earthquake magnitude scale. Bull. Seismol. Soc. Am., 1:1 - 32, 1935. URL: https://resolver.caltech.edu/CaltechAUTHORS:20140804-143558638, doi:10.1785/BSSA0250010001.">57</a>], Uhrhammer and Collins [<a class="reference internal" href="../references.html#id81" title="R.A. Uhrhammer and E.R. Collins. Synthesis of Wood-Anderson seismograms from broadband digital records. Bull. Seismol. Soc. Am., 80(3):702716, 1990. doi:10.1785/BSSA0800030702.">64</a>]</span>), <a class="reference internal" href="../filter-grammar.html#WWSSN_SP" title="WWSSN_SP"><code class="xref py py-func docutils literal notranslate"><span class="pre">WWSSN_SP()</span></code></a> or <a class="reference internal" href="../filter-grammar.html#WWSSN_LP" title="WWSSN_LP"><code class="xref py py-func docutils literal notranslate"><span class="pre">WWSSN_LP()</span></code></a>.
The calibration parameters describing the Wood-Anderson seismometer are
configurable in global bindings or global module configuration:
<a class="reference internal" href="../../apps/global.html#confval-2"><code class="xref std std-confval docutils literal notranslate"><span class="pre">amplitudes.WoodAnderson.gain</span></code></a>, <a class="reference internal" href="../../apps/global.html#confval-3"><code class="xref std std-confval docutils literal notranslate"><span class="pre">amplitudes.WoodAnderson.T0</span></code></a>,
<a class="reference internal" href="../../apps/global.html#confval-4"><code class="xref std std-confval docutils literal notranslate"><span class="pre">amplitudes.WoodAnderson.h</span></code></a>. Specifically, the difference in magnitude
due to configuration using original values listed in
<span id="id2">Richter [<a class="reference internal" href="../references.html#id62" title="C.F. Richter. An instrumental earthquake magnitude scale. Bull. Seismol. Soc. Am., 1:1 - 32, 1935. URL: https://resolver.caltech.edu/CaltechAUTHORS:20140804-143558638, doi:10.1785/BSSA0250010001.">57</a>]</span> and updated ones given in <span id="id3">Uhrhammer and Collins [<a class="reference internal" href="../references.html#id81" title="R.A. Uhrhammer and E.R. Collins. Synthesis of Wood-Anderson seismograms from broadband digital records. Bull. Seismol. Soc. Am., 80(3):702716, 1990. doi:10.1785/BSSA0800030702.">64</a>]</span>
result in a constant offset of 0.13 in those magnitudes which apply
Wood-Anderson simulation, e.g. <a class="reference internal" href="../glossary.html#term-magnitude-local-ML"><span class="xref std std-term">ML</span></a>,
<a class="reference internal" href="../glossary.html#term-magnitude-local-vertical-MLv"><span class="xref std std-term">MLv</span></a>, <a class="reference internal" href="../glossary.html#term-magnitude-local-custom-MLc"><span class="xref std std-term">MLc</span></a>.</p>
</section>
</section>
<section id="station-magnitudes">
<h2>Station Magnitudes<a class="headerlink" href="#station-magnitudes" title="Permalink to this heading"></a></h2>
<p>Station magnitudes are computed automatically by <a class="reference internal" href="../../apps/scmag.html#scmag"><span class="std std-ref">scmag</span></a> or interactively
by <a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a> from measured amplitudes based on distance-dependent
calibration curves which depend on magnitude type. When computing a set of
magnitudes in <a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a> which is different from the set configured in
<a class="reference internal" href="../../apps/scmag.html#scmag"><span class="std std-ref">scmag</span></a>, then scmag may later add the missing magnitudes automatically.
Magnitude types for which the evaluation status is set to “rejected”, e.g., in
scolv, will not be recomputed by scmag.</p>
<section id="station-corrections">
<span id="concepts-magnitudes-correction"></span><h3>Station corrections<a class="headerlink" href="#station-corrections" title="Permalink to this heading"></a></h3>
<p>Linear station corrections applied to station magnitudes can be configured by
global <a class="reference internal" href="configuration.html#global-bindings-config"><span class="std std-ref">binding parameters</span></a>:</p>
<ol class="arabic simple">
<li><p>Add a magnitude type profile where the name of the profile is the name of the
magnitude itself,</p></li>
<li><p>Configure the correction parameters.</p></li>
</ol>
<p>When using binding profiles, all referencing stations will be affected equally
which is typically not intended. In contrast, applying station bindings requires
to set up many bindings which may not be intended either.</p>
<p>Therefore, you may add lines to the global module configuration in
<code class="file docutils literal notranslate"><span class="pre">global.cfg</span></code> where one line corresponds to one station with one magnitude
and the corresponding correction parameter. The groups and the name of the
parameters are identical to the global bindings parameters. All lines start with
<em>module.trunk</em>”. Example for an offset correction of
<a class="reference internal" href="../glossary.html#term-magnitude-local-vertical-MLv"><span class="xref std std-term">MLv</span></a> measured station GE.UGM:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">module.trunk.GE.UGM.magnitudes.MLv.offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">0.1</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The configuration of parameters starting with <em>module.trunk.</em> is not
supported by <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>. All corresponding configurations must be done
by direclty editing the configuration file, e.g.,
<code class="file docutils literal notranslate"><span class="pre">seiscomp/etc/global.cfg</span></code>.</p>
</div>
</section>
</section>
<section id="network-magnitudes">
<h2>Network Magnitudes<a class="headerlink" href="#network-magnitudes" title="Permalink to this heading"></a></h2>
<p>Network magnitudes are computed automatically by <a class="reference internal" href="../../apps/scmag.html#scmag"><span class="std std-ref">scmag</span></a> or interactively
by <a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a> from station magnitudes based on averaging station magnitudes.
The averaging methods applied by <a class="reference internal" href="../../apps/scmag.html#scmag"><span class="std std-ref">scmag</span></a> are configurable by
<a class="reference internal" href="../../apps/scmag.html#confval-magnitudes.average"><code class="xref std std-confval docutils literal notranslate"><span class="pre">magnitudes.average</span></code></a>. Available are (<span id="id4">Rosenberger and Gasko [<a class="reference internal" href="../references.html#id70" title="J.L. Rosenberger and M. Gasko. Comparing location estimators: trimmed means, medians, and trimean. In D.C. Hoaglin, F. Mosteller, and J.W. Tukey, editors, Understanding Robust and Exploratory Data Analysis, pages 297-336. Wiley, New York, NY, 1983.">59</a>]</span>):</p>
<ul class="simple">
<li><p><em>mean</em>: the mean value from all station magnitudes.</p></li>
<li><p><em>median</em>: the mean value from all station magnitudes.</p></li>
<li><p><em>trimmedMean(X)</em>: gnores outlier station magnitudes by first removing the
largest and the smallest <em>X</em> % of the observed values (percentiles). The mean is
formed from the remaining station magnitudes.</p></li>
<li><p><em>trimmedMedian(X)</em>: forms the median from all station magnitudes but returns
the uncertainty by ignoring the largest and the smallest <em>X</em> % station
magnitudes.</p></li>
<li><p><em>medianTrimmedMean(X)</em>: returns the mean magnitude from all station magnitudes
differing less than <em>X</em> magnitudes from the median.</p></li>
</ul>
</section>
<section id="aliases">
<h2>Aliases<a class="headerlink" href="#aliases" title="Permalink to this heading"></a></h2>
<p>New magnitude types (aliases) can be created based on existing magnitude and
amplitude types but configured specifically.
The setup procedure is outlined in the
<a class="reference internal" href="../tutorials/magnitude-regionalization.html#tutorials-magnitude-aliases"><span class="std std-ref">tutorial on magnitude aliases</span></a>.</p>
</section>
<section id="regionalization">
<span id="concepts-magnitudes-regionalization"></span><h2>Regionalization<a class="headerlink" href="#regionalization" title="Permalink to this heading"></a></h2>
<p>The computation of station magnitudes can be regionalized. This means that for
a specific region specific conditions apply when computing magnitudes. The
conditions include any parameter available for configuring a magnitude
including global binding parameters such as magnitude calibration, distance
and depth ranges, etc. As an example you may wish to apply different
attenuation curves for computing MLv magnitudes to earthquakes in Eastern and
in Western Canada.</p>
<p>Regionalization is achieved by adding magnitude-type profiles in the magnitudes
section of global module configuration parameters. Regionalization assumes
defaults from global bindings but overrides the values when configured. The
setup procedure including
<a class="reference internal" href="#concepts-magnitudes-correction"><span class="std std-ref">station corrections</span></a> is outlined in the
<a class="reference internal" href="../tutorials/magnitude-regionalization.html#tutorials-magnitude-region-aliases"><span class="std std-ref">tutorial on regionalization</span></a>.</p>
</section>
<section id="moment-magnitudes">
<h2>Moment Magnitudes<a class="headerlink" href="#moment-magnitudes" title="Permalink to this heading"></a></h2>
<p>Moment magnitudes can be derived from all other network magnitudes by mapping of
the original network magnitude, e.g., <em>Mx</em>, to a new moment magnitude <em>Mw(Mx)</em>.</p>
<p>The mapping function can be configured for all original magnitude types except
<a class="reference internal" href="../glossary.html#term-magnitude-derived-mB-Mw-mB"><span class="xref std std-term">mB</span></a> and
<a class="reference internal" href="../glossary.html#term-magnitude-derived-Mwp-Mw-Mwp"><span class="xref std std-term">Mwp</span></a> where the mapping is hardcoded.
Read the <a class="reference internal" href="../tutorials/magnitude-regionalization.html#tutorials-mags-moment"><span class="std std-ref">tutorial on moment magnitudes</span></a> for the
configuration.</p>
</section>
<section id="summary-magnitude">
<span id="concepts-magnitudes-summary"></span><h2>Summary Magnitude<a class="headerlink" href="#summary-magnitude" title="Permalink to this heading"></a></h2>
<p>In order to account for different phenomena related to magnitude computation
including magnitude saturation and application of different magnitude types at
specific distance and depth ranges of the sources a summary magnitude can be
computed from network magnitudes by <a class="reference internal" href="../../apps/scmag.html#scmag"><span class="std std-ref">scmag</span></a>. The summary magnitude is
usually referred to as <em>M</em>. The name is configurable.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Station, network and summary magnitudes are contained uniquely in one
<a class="reference internal" href="../glossary.html#term-origin"><span class="xref std std-term">origin</span></a>.</p>
</div>
</section>
<section id="preferred-magnitude">
<h2>Preferred Magnitude<a class="headerlink" href="#preferred-magnitude" title="Permalink to this heading"></a></h2>
<p>From the list of computed network magnitudes and the summary magnitude,
<a class="reference internal" href="../../apps/scevent.html#scevent"><span class="std std-ref">scevent</span></a> can automatically determine the preferred magnitude of the
<a class="reference internal" href="../glossary.html#term-event"><span class="xref std std-term">event</span></a>. This may also be done interactively by operators in the
<a class="reference internal" href="../../apps/scolv.html#scolv-sec-event-tab"><span class="std std-ref">Event tab of scolv</span></a> or by
<a class="reference internal" href="../../apps/scolv.html#sec-scolv-custom-commit"><span class="std std-ref">custom commit buttons in scolv</span></a>.</p>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Magnitudes</a><ul>
<li><a class="reference internal" href="#amplitudes">Amplitudes</a><ul>
<li><a class="reference internal" href="#instrument-simulation">Instrument simulation</a></li>
</ul>
</li>
<li><a class="reference internal" href="#station-magnitudes">Station Magnitudes</a><ul>
<li><a class="reference internal" href="#station-corrections">Station corrections</a></li>
</ul>
</li>
<li><a class="reference internal" href="#network-magnitudes">Network Magnitudes</a></li>
<li><a class="reference internal" href="#aliases">Aliases</a></li>
<li><a class="reference internal" href="#regionalization">Regionalization</a></li>
<li><a class="reference internal" href="#moment-magnitudes">Moment Magnitudes</a></li>
<li><a class="reference internal" href="#summary-magnitude">Summary Magnitude</a></li>
<li><a class="reference internal" href="#preferred-magnitude">Preferred Magnitude</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="configuration.html"
title="previous chapter">Configuration</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="locators.html"
title="next chapter">Locators</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/concepts/magnitudes.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,344 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Messaging system &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="SeisComP modules" href="modules.html" />
<link rel="prev" title="Concepts" href="../concepts.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="modules.html" title="SeisComP modules"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="../concepts.html" title="Concepts"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../concepts.html" accesskey="U">Concepts</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="messaging-system">
<span id="concepts-messaging"></span><h1>Messaging system<a class="headerlink" href="#messaging-system" title="Permalink to this heading"></a></h1>
<section id="scope">
<h2>Scope<a class="headerlink" href="#scope" title="Permalink to this heading"></a></h2>
<p>This chapter describes the messaging system used for exchanging parameter messages between
different <a class="reference internal" href="modules.html#concepts-modules"><span class="std std-ref">SeisComP modules</span></a> during runtime.</p>
</section>
<section id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h2>
<p>A typical real-time <cite>SeisComP</cite> system consists of data processing and other
modules (clients) and a messaging bus. The messaging bus connects all the
clients letting them exchange information by messages through this bus.
The messaging system is a fundamental concept of SeisComP following the
publish-subscribe pattern <span id="id1">[<a class="reference internal" href="../references.html#id186" title="Publishsubscribe pattern. Wikipedia. URL: https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern.">21</a>]</span>. It is provided by the <cite>SeisComP</cite>
module <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a>.</p>
<p>Clients can be producers (sending messages) and/or consumers (receiving
messages). The basic concept is really simple: A producer sends a message
(some event parameter, arbitrary content) and a consumer read that message and tries to
process it. Thats it. That is a very generic approach which requires clients
to understand the message content of each other.</p>
<p>In <cite>SeisComP</cite> this common messaging language consists of well defined message
types and contents. The vast majority of messages sent around are so called
<strong>notifiers</strong>.</p>
<p>Notifiers inform about changes on the data model. They carry just three
attributes:</p>
<ul class="simple">
<li><p>The unique identifier of the parent object</p></li>
<li><p>The operation to apply (add, update or remove)</p></li>
<li><p>The subject</p></li>
</ul>
<p>Speaking XML, a notifier looks like this:</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="nt">&lt;seiscomp</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">&quot;http://geofon.gfz-potsdam.de/ns/seiscomp-schema/0.11&quot;</span><span class="w"> </span><span class="na">version=</span><span class="s">&quot;0.11&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;Notifier</span><span class="w"> </span><span class="na">parentID=</span><span class="s">&quot;EventParameters&quot;</span><span class="w"> </span><span class="na">operation=</span><span class="s">&quot;add&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;Pick</span><span class="w"> </span><span class="na">publicID=</span><span class="s">&quot;Pick/....&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="cm">&lt;!-- All pick attributes will be placed here --&gt;</span>
<span class="w"> </span><span class="nt">&lt;/Pick&gt;</span>
<span class="w"> </span><span class="nt">&lt;/Notifier&gt;</span>
<span class="nt">&lt;/seiscomp&gt;</span>
</pre></div>
</div>
<p>Each client that receives such a notifier will take further actions if the
information meets its interest. A simple example is <a class="reference internal" href="../../apps/scautoloc.html#scautoloc"><span class="std std-ref">scautoloc</span></a>. It
receives Pick objects in the form as written above. It stores the pick to its
internal data structures and when there are enough picks to form an Origin,
it does its processing and probably sends an Origin as a result (again as
notifier).</p>
<figure class="align-center" id="id2">
<img alt="sketch of a distributed system" src="../../_images/system.png" />
<figcaption>
<p><span class="caption-text">Schematic view on a distributed SeisComP system.</span><a class="headerlink" href="#id2" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</section>
<section id="queues">
<span id="messaging-queue"></span><h2>Queues<a class="headerlink" href="#queues" title="Permalink to this heading"></a></h2>
<p>The messaging server (<a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a>) manages a set of queues. Each queue is
independent and clients can only connect to <em>one</em> queue at a time within one
connection. Messages sent to a queue are sorted by their arrival time and
forwarded to clients in exactly that order. That is called a FIFO (first in
first out) queue.</p>
<p>For each queue a set of processors can be added where each message is
piped through. One example is the dbstore processor which applies notifiers to
a configured relational database management system (RDBMS).</p>
<p>One could configure scmaster with two queues, one for production which
populates a database and one for playbacks which does not populate a database.</p>
<p>A client can be directed to either the one or the other queue:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>connection.server<span class="w"> </span><span class="o">=</span><span class="w"> </span>localhost/production
</pre></div>
</div>
<p>or</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scautopick<span class="w"> </span>-H<span class="w"> </span>localhost/production
</pre></div>
</div>
</section>
<section id="groups">
<span id="messaging-groups"></span><h2>Groups<a class="headerlink" href="#groups" title="Permalink to this heading"></a></h2>
<p>Groups are like topic filters for a message. A message is always being sent to
a specific group or a specific client (peer-to-peer). A client can subscribe
to one or many groups and it will only receive messages tagged with a group it
has subscribed to.</p>
<p>For example <a class="reference internal" href="../../apps/scautopick.html#scautopick"><span class="std std-ref">scautopick</span></a> processes waveforms sending detections or
picks as pick notifiers to the PICK group. All clients subscribed to that group
would also receive this information. If the queue is configured with the
dbstore processor then it is guaranteed that the pick has been stored already
in the database at the time of message arrival at the clients.</p>
<p>A consumer of the PICK group messages is <a class="reference internal" href="../../apps/scautoloc.html#scautoloc"><span class="std std-ref">scautoloc</span></a>. Whenever it receives
a new pick it will try to associate it or to locate a seismic event. After it
succeeded it will send an origin to the LOCATION group and so on.</p>
</section>
<section id="scheme">
<span id="messaging-scheme"></span><h2>Scheme<a class="headerlink" href="#scheme" title="Permalink to this heading"></a></h2>
<p>The messaging allows unencrypted or encrypted connections which are specified by
the scheme parameter of the connection:</p>
<ul class="simple">
<li><p><cite>scmp</cite> (default): unencrypted,</p></li>
<li><p><cite>scmps</cite>: encrypted.</p></li>
</ul>
<p>Scheme, host, port and <a class="reference internal" href="#messaging-scheme"><span class="std std-ref">queue</span></a> together form the
connection URL of the messaging system which is configurable in
<a class="reference internal" href="../../apps/global.html#confval-connection.server"><code class="xref std std-confval docutils literal notranslate"><span class="pre">connection.server</span></code></a> or set by the command-line option <code class="docutils literal notranslate"><span class="pre">-H</span></code>.</p>
<p>Examples:</p>
<ul>
<li><p>Connect to the production queue of the messaging on localhost with default port.
Not using encryption <cite>scmp</cite> can be assumed implicitly in global configuration</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">connection</span><span class="o">.</span><span class="n">server</span> <span class="o">=</span> <span class="n">localhost</span><span class="o">/</span><span class="n">production</span>
</pre></div>
</div>
<p>On the command line use, e.g.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ scolv -H localhost
</pre></div>
</div>
</li>
<li><p>Connect to the production queue of the messaging on localhost with default port.
Using non-default secure encryption and port the scheme and the port must be
provided explicitly in global configuration</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">connection</span><span class="o">.</span><span class="n">server</span> <span class="o">=</span> <span class="n">scmps</span><span class="p">:</span><span class="o">//</span><span class="n">localhost18181</span><span class="o">/</span><span class="n">production</span>
</pre></div>
</div>
<p>On the command line use, e.g.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ scolv -H scmps://localhost:18181/production
</pre></div>
</div>
</li>
</ul>
</section>
<section id="database">
<span id="messaging-db"></span><h2>Database<a class="headerlink" href="#database" title="Permalink to this heading"></a></h2>
<p>The <a class="reference internal" href="database.html#concepts-database"><span class="std std-ref">database</span></a> is populated by <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> with all
kind of information which might depend on
each other. It is crucial for operations that write operations are well
synchronized. Part of the messaging contract is that clients get read-only
database access from <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> and that they will never attempt to write
into the database. In a fully-fledged <cite>SeisComP</cite> system the only instance that is
allowed to populate the database is the dbstore plugin of <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a>.</p>
<p>When connecting from a client to the messaging, the database connection parameters
are reported by <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a>. They can be overridden by the global configuration
or command-line option <code class="docutils literal notranslate"><span class="pre">-d</span></code>.</p>
<p>Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">scolv</span> <span class="o">-</span><span class="n">H</span> <span class="n">localhost</span> <span class="o">-</span><span class="n">d</span> <span class="n">mysql</span><span class="p">:</span><span class="o">//</span><span class="n">sysop</span><span class="p">:</span><span class="n">sysop</span><span class="nd">@localhost</span><span class="o">/</span><span class="n">seiscomp</span><span class="o">-</span><span class="n">test</span>
</pre></div>
</div>
</section>
<section id="module-distribution">
<span id="messaging-distribution"></span><h2>Module distribution<a class="headerlink" href="#module-distribution" title="Permalink to this heading"></a></h2>
<p>The messaging server accepts TCP/IP connections enabling a module actually
running anywhere in the network. It happens that this concept is not understood
and users run on each computer another <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> instance to offload
processing to more computers. Unfortunately each scmaster instance is
configured with the same database connection which will most likely cause data
inconsistencies because each group of modules which is connected to an scmaster
instance does not know about the other scmaster clients and therefore ignore
the sent updates.</p>
<p>The correct approach is to run <strong>one</strong> scmaster on computer A which populates
database X. Modules running on computer A, use</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>connection.server<span class="w"> </span><span class="o">=</span><span class="w"> </span>localhost/production
</pre></div>
</div>
<p>while modules running on computer B use</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>connection.server<span class="w"> </span><span class="o">=</span><span class="w"> </span>computerA/production
</pre></div>
</div>
<p>The database connection which is used by <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> will be reported to the
clients when they connect so no explicit database configuration is necessary.</p>
<p>The messaging connection can be explicitly provided on the command line using
the option <code class="docutils literal notranslate"><span class="pre">-H</span></code> considering the comments on the
<a class="reference internal" href="#messaging-scheme"><span class="std std-ref">scheme</span></a> and <a class="reference internal" href="#messaging-queue"><span class="std std-ref">queue</span></a>, e.g.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scolv<span class="w"> </span>-H<span class="w"> </span>computerA/production
</pre></div>
</div>
</section>
<section id="web-frontend">
<h2>Web Frontend<a class="headerlink" href="#web-frontend" title="Permalink to this heading"></a></h2>
<p>When running <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> a web frontend is available which can be adjusted to
provide system information. The default port to access the web frontend is 18180:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>firefox<span class="w"> </span>localhost:18180
</pre></div>
</div>
<figure class="align-center" id="id3">
<a class="reference internal image-reference" href="../../_images/scmaster_web.png"><img alt="scmaster: web frontend" src="../../_images/scmaster_web.png" style="width: 10cm;" /></a>
<figcaption>
<p><span class="caption-text">scmaster: Web frontend</span><a class="headerlink" href="#id3" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</section>
<section id="related-modules">
<h2>Related Modules<a class="headerlink" href="#related-modules" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p><a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scm.html#scm"><span class="std std-ref">scm</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scmm.html#scmm"><span class="std std-ref">scmm</span></a></p></li>
</ul>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Messaging system</a><ul>
<li><a class="reference internal" href="#scope">Scope</a></li>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#queues">Queues</a></li>
<li><a class="reference internal" href="#groups">Groups</a></li>
<li><a class="reference internal" href="#scheme">Scheme</a></li>
<li><a class="reference internal" href="#database">Database</a></li>
<li><a class="reference internal" href="#module-distribution">Module distribution</a></li>
<li><a class="reference internal" href="#web-frontend">Web Frontend</a></li>
<li><a class="reference internal" href="#related-modules">Related Modules</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="../concepts.html"
title="previous chapter">Concepts</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="modules.html"
title="next chapter">SeisComP modules</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/concepts/messaging.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,317 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>SeisComP modules &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="SeisComP plugins" href="plugins.html" />
<link rel="prev" title="Messaging system" href="messaging.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="plugins.html" title="SeisComP plugins"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="messaging.html" title="Messaging system"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../concepts.html" accesskey="U">Concepts</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="seiscomp-modules">
<span id="concepts-modules"></span><h1>SeisComP modules<a class="headerlink" href="#seiscomp-modules" title="Permalink to this heading"></a></h1>
<section id="scope">
<h2>Scope<a class="headerlink" href="#scope" title="Permalink to this heading"></a></h2>
<p>This document describes the difference between command-line and daemon modules.</p>
</section>
<section id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h2>
<p>SeisComP is not a single executable but it provides a set of <a class="reference internal" href="../glossary.html#term-trunk"><span class="xref std std-term">trunk</span></a> and
<a class="reference internal" href="../glossary.html#term-standalone-module"><span class="xref std std-term">standalone</span></a> <a class="reference internal" href="../glossary.html#term-module"><span class="xref std std-term">modules</span></a>. Trunk modules
can be</p>
<ul class="simple">
<li><p><a class="reference internal" href="#concepts-modules-commandline"><span class="std std-ref">Command-line modules</span></a>,</p></li>
<li><p><a class="reference internal" href="#concepts-modules-daemon"><span class="std std-ref">Daemon modules</span></a>.</p></li>
</ul>
<p>Modules are <a class="reference internal" href="#concepts-modules-config"><span class="std std-ref">configured by configuration files</span></a>
either to be used directly or to generate its native configuration. Modules that
need to convert the configuration or do not use the default configuration
options (see below) are called <a class="reference internal" href="../glossary.html#term-standalone-module"><span class="xref std std-term">standalone modules</span></a>.
All other modules are called <a class="reference internal" href="../glossary.html#term-trunk"><span class="xref std std-term">trunk</span></a> modules.</p>
<p>Examples for standalone modules are <a class="reference internal" href="../../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a>, <a class="reference internal" href="../../apps/slarchive.html#slarchive"><span class="std std-ref">slarchive</span></a> and <a class="reference internal" href="../../apps/slmon.html#slmon"><span class="std std-ref">slmon</span></a>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>In order to start or execute modules without <strong class="command">seiscomp exec</strong>
(see below), the <cite>SeisComP</cite> SHELL environment variables must be known to the
system. The variables and their values can be printed giving the full path to
the <a class="reference internal" href="../../apps/seiscomp.html#seiscomp"><span class="std std-ref">seiscomp</span></a> tool. Example:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>/home/sysop/seiscomp/bin/seiscomp<span class="w"> </span>print<span class="w"> </span>env
</pre></div>
</div>
</div>
</section>
<section id="daemon-tools">
<span id="concepts-modules-daemon"></span><h2>Daemon Tools<a class="headerlink" href="#daemon-tools" title="Permalink to this heading"></a></h2>
<p>Daemon tools are <cite>SeisComP</cite> modules that can run automatically in the background
without user interaction, e.g., for automatic data acquisition or data
processing. The names of all daemon modules are listed when executing the
<a class="reference internal" href="../../apps/seiscomp.html#seiscomp"><span class="std std-ref">seiscomp</span></a> tool with <strong class="command">list modules</strong>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>list<span class="w"> </span>modules
</pre></div>
</div>
<p>Daemon modules can be started to run in the background:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>start<span class="w"> </span>scautopick
</pre></div>
</div>
<p>When starting a daemon module, all verbosity output is logged to
<a class="reference internal" href="#concepts-modules-logging"><span class="std std-ref">log files</span></a>. Daemon modules can also be executed
as <a class="reference internal" href="#concepts-modules-commandline"><span class="std std-ref">command-line tools</span></a>.</p>
</section>
<section id="command-line-tools">
<span id="concepts-modules-commandline"></span><h2>Command-Line Tools<a class="headerlink" href="#command-line-tools" title="Permalink to this heading"></a></h2>
<p>All non-daemon modules are command-line modules. These command-line modules
and most <a class="reference internal" href="#concepts-modules-daemon"><span class="std std-ref">daemon modules</span></a> can be executed on
demand from the SHELL command-line. These modules can also be
utilities or <a class="reference internal" href="../glossary.html#term-GUI"><span class="xref std std-term">graphical user interfaces (GUIs)</span></a>.
For executing use the full path to the <a class="reference internal" href="../../apps/seiscomp.html#seiscomp"><span class="std std-ref">seiscomp</span></a> tool or, when the
<cite>SeisComP</cite> environment is known, just call the module name along with command-line
options, e.g.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>scolv<span class="w"> </span><span class="o">[</span>options<span class="o">]</span>
scolv<span class="w"> </span><span class="o">[</span>options<span class="o">]</span>
</pre></div>
</div>
<p>Command-line modules are found in <code class="file docutils literal notranslate"><span class="pre">&#64;ROOTDIR&#64;/bin/</span></code> but they are <strong>NOT</strong>
listed when executing</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>list<span class="w"> </span>modules
</pre></div>
</div>
<p>Using options like <code class="xref std std-option docutils literal notranslate"><span class="pre">-h</span></code> the list of available command-line options can
be learned.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scbulletin<span class="w"> </span>-h
</pre></div>
</div>
<p>In addition, any module configuration parameter can be specified on
the command line overriding the configured parameter. For indicating that a
module configuration parameter is set on the command line separate the value
from the parameter by = and provide the full set of sections separated by ..
Example:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scolv<span class="w"> </span>--picker.loadAllPicks<span class="o">=</span><span class="nb">true</span>
</pre></div>
</div>
<p>When executing a module, all verbosity output is logged to
<a class="reference internal" href="#concepts-modules-logging"><span class="std std-ref">log files</span></a>. The logging level can be controlled
by configuration or by the command-line option <code class="xref std std-option docutils literal notranslate"><span class="pre">-v</span></code>.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scbulletin<span class="w"> </span>-vvvv
</pre></div>
</div>
<p>Detailed debugging information can also be printed on the command line during
runtime using the <code class="xref std std-option docutils literal notranslate"><span class="pre">--debug</span></code> option:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scbulletin<span class="w"> </span>--debug
</pre></div>
</div>
<p>When starting a daemon module all verbosity output is stored in <code class="file docutils literal notranslate"><span class="pre">&#64;LOGDIR&#64;</span></code>
or <code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/var/log</span></code>. Daemon modules can also be executed as
<a class="reference internal" href="#concepts-modules-commandline"><span class="std std-ref">command-line tools</span></a>.</p>
</section>
<section id="configuration">
<span id="concepts-modules-config"></span><h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this heading"></a></h2>
<p>Each <a class="reference internal" href="../glossary.html#term-standalone-module"><span class="xref std std-term">standalone module</span></a> tries to read from three module configuration
files whereas <a class="reference internal" href="../glossary.html#term-trunk"><span class="xref std std-term">trunk</span></a> modules try to read the six files. Note that
configuration parameters defined earlier are overwritten if defined in files
read in later:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>File</p></th>
<th class="head"><p>Standalone</p></th>
<th class="head"><p>Trunk</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>$SEISCOMP_ROOT/etc/defaults/global.cfg</p></td>
<td></td>
<td><p>X</p></td>
</tr>
<tr class="row-odd"><td><p>$SEISCOMP_ROOT/etc/defaults/module.cfg</p></td>
<td><p>X</p></td>
<td><p>X</p></td>
</tr>
<tr class="row-even"><td><p>$SEISCOMP_ROOT/etc/global.cfg</p></td>
<td></td>
<td><p>X</p></td>
</tr>
<tr class="row-odd"><td><p>$SEISCOMP_ROOT/etc/module.cfg</p></td>
<td><p>X</p></td>
<td><p>X</p></td>
</tr>
<tr class="row-even"><td><p>~/.seiscomp/global.cfg</p></td>
<td></td>
<td><p>X</p></td>
</tr>
<tr class="row-odd"><td><p>~/.seiscomp/module.cfg</p></td>
<td><p>X</p></td>
<td><p>X</p></td>
</tr>
</tbody>
</table>
<p>In addition to the module configuration files some modules such as
<a class="reference internal" href="../../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a> or <a class="reference internal" href="../../apps/scautopick.html#scautopick"><span class="std std-ref">scautopick</span></a> consider <a class="reference internal" href="../glossary.html#term-binding"><span class="xref std std-term">bindings</span></a>.
Bindings provide parameters specific to stations. They are configured as
per-station bindings or profiles used for multiple stations.</p>
<p>The <a class="reference internal" href="../../apps/global.html#global-configuration"><span class="std std-ref">global configuration section</span></a> describes all
available global configuration parameters for a trunk module. Modules typically
do not make use of all available global parameters because they may be disabled,
e.g., the messaging component. So the configuration of the messaging server is
disabled, too.</p>
<p>The concept section <a class="reference internal" href="configuration.html#concepts-configuration"><span class="std std-ref">Configuration</span></a> provides more
details about configurations.</p>
</section>
<section id="logging">
<span id="concepts-modules-logging"></span><h2>Logging<a class="headerlink" href="#logging" title="Permalink to this heading"></a></h2>
<p>Whenever operated, modules report the state of operation to log files. Trunk
modules report the module and the start up log to <code class="file docutils literal notranslate"><span class="pre">&#64;LOGDIR&#64;/[module].log</span></code> and
<code class="file docutils literal notranslate"><span class="pre">&#64;ROOTDIR&#64;/var/log/[module].log</span></code>, respectively. Standalone modules log to
<code class="file docutils literal notranslate"><span class="pre">&#64;ROOTDIR&#64;/var/log/[module].log</span></code> only. The log files are rotated and the
level of detail can be configured by <a class="reference internal" href="../../apps/global.html#confval-logging.level"><code class="xref std std-confval docutils literal notranslate"><span class="pre">logging.level</span></code></a>. More parameters
in <code class="xref std std-confval docutils literal notranslate"><span class="pre">logging.*</span></code> provide more control over logging, e.g., the log file
rotation.</p>
</section>
<section id="alias-modules">
<span id="concepts-modules-aliaes"></span><h2>Alias Modules<a class="headerlink" href="#alias-modules" title="Permalink to this heading"></a></h2>
<p>Many <a class="reference internal" href="../glossary.html#term-trunk"><span class="xref std std-term">trunk</span></a> and <a class="reference internal" href="../glossary.html#term-standalone-module"><span class="xref std std-term">standalone modules</span></a> allow
generating aliases as symbolic links to another module.
These aliases are useful for running multiple instances of the same module with
different configuration.</p>
<p>Alias modules can be created or removed using the <a class="reference internal" href="../../apps/seiscomp.html#seiscomp"><span class="std std-ref">seiscomp</span></a> tool by
providing the commands <strong class="command">alias create</strong> or <strong class="command">alias remove</strong>,
respectively. Read the documentation of <a class="reference internal" href="../../apps/seiscomp.html#sec-seiscomp-aliases"><span class="std std-ref">seiscomp</span></a>
for the details.</p>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">SeisComP modules</a><ul>
<li><a class="reference internal" href="#scope">Scope</a></li>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#daemon-tools">Daemon Tools</a></li>
<li><a class="reference internal" href="#command-line-tools">Command-Line Tools</a></li>
<li><a class="reference internal" href="#configuration">Configuration</a></li>
<li><a class="reference internal" href="#logging">Logging</a></li>
<li><a class="reference internal" href="#alias-modules">Alias Modules</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="messaging.html"
title="previous chapter">Messaging system</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="plugins.html"
title="next chapter">SeisComP plugins</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/concepts/modules.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,219 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>SeisComP plugins &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Database" href="database.html" />
<link rel="prev" title="SeisComP modules" href="modules.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="database.html" title="Database"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="modules.html" title="SeisComP modules"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../concepts.html" accesskey="U">Concepts</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="seiscomp-plugins">
<span id="concepts-plugins"></span><h1>SeisComP plugins<a class="headerlink" href="#seiscomp-plugins" title="Permalink to this heading"></a></h1>
<section id="scope">
<h2>Scope<a class="headerlink" href="#scope" title="Permalink to this heading"></a></h2>
<p>This chapter describes the general use of plugins in SeisComP.</p>
</section>
<section id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h2>
<p>Plugins expand the functionality of <a class="reference internal" href="modules.html#concepts-modules"><span class="std std-ref">applications</span></a>.
They are C++ shared object libraries which are dynamically loaded at runtime
into an application.</p>
<p>Typical plugins provide access to:</p>
<ul class="simple">
<li><p><a class="reference internal" href="database.html#concepts-database"><span class="std std-ref">Databases</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/global_recordstream.html#global-recordstream"><span class="std std-ref">Recordstream implementations</span></a></p></li>
<li><p><a class="reference internal" href="../../index.html#sec-index-extensions"><span class="std std-ref">Locator routines</span></a></p></li>
<li><p><a class="reference internal" href="../../index.html#sec-index-extensions"><span class="std std-ref">Amplitude and magnitude types</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scqc.html#scqc"><span class="std std-ref">Waveform quality</span></a>.</p></li>
</ul>
<p>The plugin files themselves are located in <code class="file docutils literal notranslate"><span class="pre">share/plugins</span></code>.</p>
<p>By just loading a plugin an application does not change
its way to function magically. Common plugins just implement a certain
interface (see e.g. messaging or RecordStream) and exhibit that functionality
by adding a new entry to the internal interface factory. As an example an
application makes use of interface <code class="docutils literal notranslate"><span class="pre">DatabaseInterface</span></code>. Technically it
creates a new object implementing a certain interface by calling the C++
method:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nv">db</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>DatabaseInterface::Create<span class="o">(</span><span class="s2">&quot;mysql&quot;</span><span class="o">)</span><span class="p">;</span>
</pre></div>
</div>
<p>Without having a plugin loaded the returned object will be NULL or to put it
in other words, there is not implementation for mysql available.</p>
<p>Once the plugin <code class="docutils literal notranslate"><span class="pre">dbmysql</span></code> is loaded into the application, an implementation
for type mysql is added and will be available to the application. It is
still required for the application to explicitly ask for a particular
interface. That is most likely left to the user by adding a corresponding
configuration option to the configuration file.</p>
<p>That means, if an application loads two plugins, e.g. <code class="docutils literal notranslate"><span class="pre">dbmysql</span></code> and
<code class="docutils literal notranslate"><span class="pre">dbpostgresql</span></code> that does not mean that it will not read from two database
at a time. It means the user has now the option to either use a MySQL database
or a PostgreSQL database. He still needs to make his choice in the
configuration file.</p>
<p>Trunk plugins are only supported as shared object libraries and therefore are
required to be written in C++. Implementations for all available interfaces
can be added. An incomplete list of SeisComP C++ interfaces:</p>
<ul class="simple">
<li><p><a class="reference internal" href="messaging.html#concepts-messaging"><span class="std std-ref">Messaging</span></a></p></li>
<li><p><a class="reference internal" href="database.html#concepts-database"><span class="std std-ref">Database</span></a></p></li>
<li><p><a class="reference internal" href="recordstream.html#concepts-recordstream"><span class="std std-ref">RecordStream</span></a></p></li>
<li><p>Record formats</p></li>
<li><p>Map projections</p></li>
<li><p><a class="reference internal" href="../filter-grammar.html#filter-grammar"><span class="std std-ref">Time domain filters</span></a></p></li>
<li><p>Importer</p></li>
<li><p>Exporter</p></li>
<li><p><strong>Amplitude processors</strong></p></li>
<li><p><strong>Magnitude processors</strong></p></li>
</ul>
<p>This is just a subset of available extensible interface factories. The
emphasized entries refer to the factories which are most commonly extended.</p>
</section>
<section id="location-and-configuration">
<h2>Location and Configuration<a class="headerlink" href="#location-and-configuration" title="Permalink to this heading"></a></h2>
<p>Plugins are located in <code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/share/pugins</span></code>. In order to make a
plugins available for a module it must be added to the configuration of
<a class="reference internal" href="../../apps/global.html#confval-plugins"><code class="xref std std-confval docutils literal notranslate"><span class="pre">plugins</span></code></a> of the global parameters of a module or in
<a class="reference internal" href="../../apps/global.html#id1"><span class="std std-ref">Module Configuration</span></a>.</p>
<p>Configuring <a class="reference internal" href="../../apps/global.html#confval-plugins"><code class="xref std std-confval docutils literal notranslate"><span class="pre">plugins</span></code></a> with the name of a plugin will let the exclusively
use this plugin and no other ones, e.g. default plugins. Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">plugins</span> <span class="o">=</span> <span class="n">evrc</span>
</pre></div>
</div>
<p>In order to add a plugin to the default plugins or plugins loaded by before, e.g.
by the global configuration, load these</p>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">SeisComP plugins</a><ul>
<li><a class="reference internal" href="#scope">Scope</a></li>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#location-and-configuration">Location and Configuration</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="modules.html"
title="previous chapter">SeisComP modules</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="database.html"
title="next chapter">Database</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/concepts/plugins.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,200 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>RecordStream &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Inventory" href="inventory.html" />
<link rel="prev" title="Waveform archives" href="waveformarchives.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="inventory.html" title="Inventory"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="waveformarchives.html" title="Waveform archives"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../concepts.html" accesskey="U">Concepts</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="recordstream">
<span id="concepts-recordstream"></span><h1>RecordStream<a class="headerlink" href="#recordstream" title="Permalink to this heading"></a></h1>
<section id="scope">
<h2>Scope<a class="headerlink" href="#scope" title="Permalink to this heading"></a></h2>
<p>This document describes the RecordStream interface for accessing waveform data.</p>
</section>
<section id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h2>
<p>A RecordStream refers to the interface which allows to retrieve records
(time series) from arbitrary sources. An implementation can either be real-time
and stream records continuously or time window based and just deliver what is
available at the time of requesting data.
A comprehensive list of RecordStream implementations is available in the
<a class="reference internal" href="../../apps/global_recordstream.html#global-recordstream"><span class="std std-ref">technical documentation</span></a>.</p>
<p>RecordStream implementations have a name such as “slink”, “fdsnws” or “file”
which is used as scheme in the configuration URL. The location part of the URL
is passed to the implementation. The scheme part is used to create the
implementation. As one might have noticed, that RecordStream
implementations can be added to existing applications with plugins.</p>
<p>What do they do actually?</p>
<p>Well, first of all they connect to or open the data source. If that fails, an
error is logged. Then they are configured with time windows and channel
identifieres. Once done, they are simply asked for new records in a loop. A
RecordStream implementation can run forever or finish after a short time.
The behavior depends on the implementation and configuration.</p>
<p>The application uses RecordStreams like that:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># The RecordStream URL passed is slink://localhost:18000</span>
<span class="n">scheme</span> <span class="o">=</span> <span class="n">URL</span><span class="o">.</span><span class="n">scheme</span><span class="p">()</span> <span class="c1"># scheme = &#39;slink&#39;</span>
<span class="n">location</span> <span class="o">=</span> <span class="n">URL</span><span class="o">.</span><span class="n">location</span><span class="p">()</span> <span class="c1"># location = &#39;localhost:18000&#39;</span>
<span class="n">rs</span> <span class="o">=</span> <span class="n">RecordStream</span><span class="o">.</span><span class="n">Create</span><span class="p">(</span><span class="n">scheme</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">rs</span><span class="p">:</span>
<span class="n">throw</span> <span class="n">Error</span><span class="p">()</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">rs</span><span class="o">.</span><span class="n">setSource</span><span class="p">(</span><span class="n">location</span><span class="p">):</span>
<span class="n">throw</span> <span class="n">Error</span><span class="p">()</span>
<span class="n">rs</span><span class="o">.</span><span class="n">setStartTime</span><span class="p">(</span><span class="n">Time</span><span class="p">(</span><span class="mi">2019</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">))</span>
<span class="n">rs</span><span class="o">.</span><span class="n">addStream</span><span class="p">(</span><span class="s1">&#39;GE&#39;</span><span class="p">,</span> <span class="s1">&#39;UGM&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="s1">&#39;BH?&#39;</span><span class="p">)</span>
<span class="n">rs</span><span class="o">.</span><span class="n">addStream</span><span class="p">(</span><span class="s1">&#39;GE&#39;</span><span class="p">,</span> <span class="s1">&#39;MORC&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="s1">&#39;BH?&#39;</span><span class="p">)</span>
<span class="k">while</span> <span class="p">(</span> <span class="n">rec</span> <span class="o">=</span> <span class="n">rs</span><span class="o">.</span><span class="n">next</span><span class="p">()</span> <span class="p">)</span>
<span class="n">do_something_with</span><span class="p">(</span><span class="n">rec</span><span class="p">)</span>
</pre></div>
</div>
<p>In the example above the end time is not set, so actually an open time window
should be read. That works pretty well for the Seedlink implemtation but the
FDSNWS implementation would complain and issue an error because no end time
was set. So configuring a RecordStream for an application requires some
knowledge of the context and the supported features of the configured
implementation.</p>
<p>Although <cite>SeisComP</cite> ships with the Seedlink server, the processing application
are not aware of the fact that they connect to Seedlink. All time series
retrieval is done with the RecordStream concept. There is no knowledge about
the underlying implementation. This leads to a high flexibility and
implementations can be added without the need to modify the base <cite>SeisComP</cite>
sources.</p>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">RecordStream</a><ul>
<li><a class="reference internal" href="#scope">Scope</a></li>
<li><a class="reference internal" href="#overview">Overview</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="waveformarchives.html"
title="previous chapter">Waveform archives</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="inventory.html"
title="next chapter">Inventory</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/concepts/recordstream.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,204 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Waveform archives &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="RecordStream" href="recordstream.html" />
<link rel="prev" title="Database" href="database.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="recordstream.html" title="RecordStream"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="database.html" title="Database"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../concepts.html" accesskey="U">Concepts</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="waveform-archives">
<span id="concepts-waveformarchives"></span><h1>Waveform archives<a class="headerlink" href="#waveform-archives" title="Permalink to this heading"></a></h1>
<section id="scope">
<h2>Scope<a class="headerlink" href="#scope" title="Permalink to this heading"></a></h2>
<p>This chapter describes waveform archives for long-term storage of miniSEED data.</p>
</section>
<section id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h2>
<p>While real-time data sources provide data for a rather short amount of time,
long-term access to waveforms can be established through waveform archives.
The <a class="reference internal" href="recordstream.html#concepts-recordstream"><span class="std std-ref">RecordStream interface</span></a> allows a combined access
to real-time data and data in <a class="reference internal" href="#concepts-sds"><span class="std std-ref">SDS</span></a> or other archives.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>It is assumed that instrument corrections applied to the recorded
waveform data result in data in units of the real observations and their unmodified value.
Therefore, it is recommended to store only unprocessed raw data in units of digital counts
in the waveform archives and to provide the complete <a class="reference internal" href="inventory.html#concepts-inventory"><span class="std std-ref">inventory</span></a>
referring to input data given in counts.</p>
</div>
</section>
<section id="sds-archives">
<span id="concepts-sds"></span><h2>SDS archives<a class="headerlink" href="#sds-archives" title="Permalink to this heading"></a></h2>
<p>SeisComP uses the SeisComP Data Structure (SDS) for archiving miniSEED waveform data.
It has the structure:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>archive
<span class="w"> </span>+<span class="w"> </span>year
<span class="w"> </span>+<span class="w"> </span>network<span class="w"> </span>code
<span class="w"> </span>+<span class="w"> </span>station<span class="w"> </span>code
<span class="w"> </span>+<span class="w"> </span>channel<span class="w"> </span>code
<span class="w"> </span>+<span class="w"> </span>one<span class="w"> </span>file<span class="w"> </span>per<span class="w"> </span>day<span class="w"> </span>and<span class="w"> </span>location,<span class="w"> </span>e.g.<span class="w"> </span>NET.STA.LOC.CHAN.D.YEAR.DOY
</pre></div>
</div>
<p>SeisComP ships with <a class="reference internal" href="../../apps/slarchive.html#slarchive"><span class="std std-ref">slarchive</span></a> to create SDS archives from a miniSEED waveform
buffer by <a class="reference internal" href="../../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a> in real time and with <a class="reference internal" href="../../apps/scart.html#scart"><span class="std std-ref">scart</span></a> to intergrate miniSEED
records from files into an SDS archive. <a class="reference internal" href="../../apps/scart.html#scart"><span class="std std-ref">scart</span></a> can also be used to retrieve
miniSEED records from an SDS archive.</p>
</section>
<section id="access-to-waveform-archives">
<h2>Access to waveform archives<a class="headerlink" href="#access-to-waveform-archives" title="Permalink to this heading"></a></h2>
<p>Access from SeisComP processing and GUI modules to waveform archives is realized by
<a class="reference internal" href="recordstream.html#concepts-recordstream"><span class="std std-ref">RecordStream implementations</span></a>.
The continuity of SDS archives can be monitored by <a class="reference internal" href="../../apps/scardac.html#scardac"><span class="std std-ref">scardac</span></a> and exposed by
the <a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws availability feature</span></a>.
miniSEED waveforms in SDS archives, can interactively retrieved using <a class="reference internal" href="../../apps/scart.html#scart"><span class="std std-ref">scart</span></a>.
Waveforms stored in SDS archives can be served to clients, e.g. using <a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws</span></a>.</p>
</section>
<section id="related-modules">
<h2>Related modules<a class="headerlink" href="#related-modules" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p><span class="xref std std-ref">caps_plugin</span></p></li>
<li><p><a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scardac.html#scardac"><span class="std std-ref">scardac</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scart.html#scart"><span class="std std-ref">scart</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/slarchive.html#slarchive"><span class="std std-ref">slarchive</span></a></p></li>
</ul>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Waveform archives</a><ul>
<li><a class="reference internal" href="#scope">Scope</a></li>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#sds-archives">SDS archives</a></li>
<li><a class="reference internal" href="#access-to-waveform-archives">Access to waveform archives</a></li>
<li><a class="reference internal" href="#related-modules">Related modules</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="database.html"
title="previous chapter">Database</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="recordstream.html"
title="next chapter">RecordStream</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/concepts/waveformarchives.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,878 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Contributing Documentation &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Style Guide for Documentation" href="style-guide.html" />
<link rel="prev" title="Getting the Source Code" href="build.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="style-guide.html" title="Style Guide for Documentation"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="build.html" title="Getting the Source Code"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="contributing-documentation">
<span id="id1"></span><h1>Contributing Documentation<a class="headerlink" href="#contributing-documentation" title="Permalink to this heading"></a></h1>
<p>This is the documentation for the core processing elements and utilities that make up the <cite>SeisComP</cite> system.
It aims to document the configuration and command line options for
<cite>SeisComP</cite> in multiple formats (HTML, man, PDF, ePub etc) in a
consistent way. The functionality of <cite>SeisComP</cite> differs between
versions so the documentation is versioned along with <cite>SeisComP</cite>.
For more general topics and tutorials please refer to the
<a class="reference external" href="https://www.seiscomp.de/">SeisComP wiki</a> <a class="footnote-reference brackets" href="#id2" id="id3" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a>.</p>
<p>The documentation is written in <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reStructuredText</a> <a class="footnote-reference brackets" href="#id4" id="id5" role="doc-noteref"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a> (reST) a
simple text mark up format. The documentation is generated using <a class="reference external" href="https://www.sphinx-doc.org/">Sphinx</a> <a class="footnote-reference brackets" href="#id6" id="id7" role="doc-noteref"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></a>
which is used to create the <a class="reference external" href="https://docs.python.org/">Python documentation</a> <a class="footnote-reference brackets" href="#id8" id="id9" role="doc-noteref"><span class="fn-bracket">[</span>4<span class="fn-bracket">]</span></a>.
The Sphinx website has a very good
<a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html">introduction to reST</a> <a class="footnote-reference brackets" href="#id10" id="id11" role="doc-noteref"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a> and also covers the Sphinx specific
<a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html">directives</a> <a class="footnote-reference brackets" href="#id12" id="id13" role="doc-noteref"><span class="fn-bracket">[</span>6<span class="fn-bracket">]</span></a>.</p>
<p>If you would like to add to this documentation or you find an error, then please
submit a patch to <a class="reference external" href="https://github.com/SeisComP">SeisComP on GitHub</a> <a class="footnote-reference brackets" href="#id14" id="id15" role="doc-noteref"><span class="fn-bracket">[</span>7<span class="fn-bracket">]</span></a> or report to the
SeisComP <a class="reference external" href="https://forum.seiscomp.de">discussion forum</a> <a class="footnote-reference brackets" href="#id16" id="id17" role="doc-noteref"><span class="fn-bracket">[</span>8<span class="fn-bracket">]</span></a>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Please understand the <a class="reference internal" href="style-guide.html#documentation-style-guide"><span class="std std-ref">documentation style guide</span></a>
before contributing documentation.</p>
</div>
<p>If you view the HTML version of the documentation in a browser,
then you can use the <em>Show Source</em> link on each page to view the reST
source. The source and the documentation files for executables (see below) are
good starting points for a new patch.</p>
<section id="documenting-executables">
<h2>Documenting Executables<a class="headerlink" href="#documenting-executables" title="Permalink to this heading"></a></h2>
<p>The documentation for executables is generated from two sources:</p>
<dl>
<dt>executable.xml</dt><dd><p>An XML file that contains a brief description of the command,
markup describing the command line parameters, and any
configuration parameters for the executable. Each parameter should
have a brief description of the purpose of the parameter.</p>
<p>The description should be plain text and not contain reST markup. Where parameters are common across
a number of executables they should be placed in the appropriate common file and referred to using
their publicID.</p>
<p>All XML files live in the <code class="file docutils literal notranslate"><span class="pre">doc/apps</span></code> directory of the source
distribution or in <code class="file docutils literal notranslate"><span class="pre">etc/descriptions</span></code> of an installation.</p>
</dd>
<dt>executable.rst</dt><dd><p>This is a text file in reST markup that gives any more-detailed description and examples for the executable.
It is combined with the corresponding .xml to create the full documentation.
The first entry in the file should be a paragraph giving a more
detailed description of the executable.</p>
</dd>
</dl>
<p>These two files should be placed in a <code class="file docutils literal notranslate"><span class="pre">descriptions</span></code> sub-directory of the
respective module, e.g. <code class="file docutils literal notranslate"><span class="pre">src/seedlink/apps/seedlink/descriptions/seedlink.rst</span></code>.
The intention is that the documentation is close to the code to make it easier for developers to keep the
documentation up to date with code changes.</p>
<p>For a new executable an entry should also be made in the man section of <code class="file docutils literal notranslate"><span class="pre">conf.py</span></code>.
The man page is a short form of the documentation that is generated from only the .xml file.</p>
</section>
<section id="images">
<h2>Images<a class="headerlink" href="#images" title="Permalink to this heading"></a></h2>
<p>Any images should be placed in a suitable sub-directory of <code class="file docutils literal notranslate"><span class="pre">descriptions/media</span></code>.
Read the <span class="xref std std-ref">documentation on image styles</span> for more details.
The images can then be referred to (in .rst) like:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>.. figure:: media/scolv/scolv-overview.png
:width: 16cm
:align: center
Overview of the defrobnicator switches in :ref:`scolv`.
</pre></div>
</div>
<p>The images will be moved to the correct location during the documentation build.</p>
</section>
<section id="understanding-the-xml">
<h2>Understanding the XML<a class="headerlink" href="#understanding-the-xml" title="Permalink to this heading"></a></h2>
<p>As mentioned before XML is used to generate brief descriptions of the configuration and command line parameters.
This section describes the XML format.</p>
<p>Any description XML uses the root element <em>seiscomp</em>:</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="nt">&lt;seiscomp&gt;</span>
<span class="w"> </span>...
<span class="nt">&lt;/seiscomp&gt;</span>
</pre></div>
</div>
<p>Three elements are used inside the root element: <a class="reference internal" href="#xml-module"><span class="std std-ref">module</span></a>, <a class="reference internal" href="#xml-plugin"><span class="std std-ref">plugin</span></a> and <a class="reference internal" href="#xml-binding"><span class="std std-ref">binding</span></a>.
Modules, plugins and bindings can be described in one XML or split up into one file per description. It is better to
have things as close as possible. A module and its binding should go into one module.XML whereas plugins should
go into separate XML files.</p>
<section id="module">
<span id="xml-module"></span><h3>Module<a class="headerlink" href="#module" title="Permalink to this heading"></a></h3>
<p>A template for a description XML file can be found in <code class="file docutils literal notranslate"><span class="pre">doc/templates/app.xml</span></code>.</p>
<p>The XML file describes the <cite>SeisComP</cite> <a class="reference internal" href="glossary.html#term-module"><span class="xref std std-term">module</span></a> with the configuration and command-line parameters.</p>
<p>Element: <strong>module</strong></p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>XML type</p></th>
<th class="head"><p>Mandatory</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><strong>name</strong></p></td>
<td><p>attrib</p></td>
<td><p>yes</p></td>
<td><p>The name of the module. This name must be
unique among all available modules.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>category</strong></p></td>
<td><p>attrib</p></td>
<td><p>no</p></td>
<td><p>The category of the module. It is used by the
configurator to group modules and by the
documentation generator to create the final
document structure. The category can contain
slashes to introduce hierarchies.</p></td>
</tr>
<tr class="row-even"><td><p><strong>standalone</strong></p></td>
<td><p>attrib</p></td>
<td><p>no</p></td>
<td><p>The standalone attribute is also optional and
by default false. Standalone means that the
module does not take the global configuration
files (e.g. <code class="file docutils literal notranslate"><span class="pre">etc/global.cfg</span></code>) into
account.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>inherit-global-bindings</strong></p></td>
<td><p>attrib</p></td>
<td><p>no</p></td>
<td><p>If global bindings are inherited. The default
is false. If yes, then all parameters of
the global binding are also available in
the module binding to allow overwriting them.
Standalone modules will never inherit global
bindings regardless the value of this
attribute.</p></td>
</tr>
<tr class="row-even"><td><p><strong>description</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>A short description of the module.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>configuration</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>The available configuration parameters. See
element
<a class="reference internal" href="#xml-configuration"><span class="std std-ref">configuration</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><strong>command-line</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>The available command-line options. See
element
<a class="reference internal" href="#xml-command-line"><span class="std std-ref">command-line</span></a>.</p></td>
</tr>
</tbody>
</table>
<p>It follows a simple example of how a module definition looks like.</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="nt">&lt;seiscomp&gt;</span>
<span class="w"> </span><span class="nt">&lt;module</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;scevent&quot;</span><span class="w"> </span><span class="na">category=</span><span class="s">&quot;Modules/Processing&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>
<span class="w"> </span>Associates<span class="w"> </span>an<span class="w"> </span>Origin<span class="w"> </span>to<span class="w"> </span>an<span class="w"> </span>Event<span class="w"> </span>or<span class="w"> </span>forms<span class="w"> </span>a<span class="w"> </span>new<span class="w"> </span>Event<span class="w"> </span>if<span class="w"> </span>no<span class="w"> </span>match
<span class="w"> </span>is<span class="w"> </span>found.<span class="w"> </span>Selects<span class="w"> </span>the<span class="w"> </span>preferred<span class="w"> </span>magnitude.
<span class="w"> </span><span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;configuration/&gt;</span>
<span class="w"> </span><span class="nt">&lt;command-line/&gt;</span>
<span class="w"> </span><span class="nt">&lt;/module&gt;</span>
<span class="nt">&lt;/seiscomp&gt;</span>
</pre></div>
</div>
</section>
<section id="plugin">
<span id="xml-plugin"></span><h3>Plugin<a class="headerlink" href="#plugin" title="Permalink to this heading"></a></h3>
<p>A template for a description XML file can be found in <code class="file docutils literal notranslate"><span class="pre">doc/templates/plugin.xml</span></code>.</p>
<p>The XML file describes the <cite>SeisComP</cite> <a class="reference internal" href="glossary.html#term-plugin"><span class="xref std std-term">plugin</span></a> with the configuration and command-line parameters. This is most likely the
case when an application loads dynamically shared libraries also called plugins.</p>
<p>Element: <strong>plugin</strong></p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>XML type</p></th>
<th class="head"><p>Mandatory</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><strong>name</strong></p></td>
<td><p>attrib</p></td>
<td><p>yes</p></td>
<td><p>The name of the plugin.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>extends</strong></p></td>
<td><p>element</p></td>
<td><p>yes</p></td>
<td><p>The list of names of module names that
the plugin extends, separated by commas.</p></td>
</tr>
<tr class="row-even"><td><p><strong>description</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>A short description of the plugin.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>configuration</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>The available configuration parameters. See
element
<a class="reference internal" href="#xml-configuration"><span class="std std-ref">configuration</span></a>.</p></td>
</tr>
</tbody>
</table>
<p>Below is a simple example of how a plugin definition appears in XML.</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="nt">&lt;seiscomp&gt;</span>
<span class="w"> </span><span class="nt">&lt;plugin</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;NonLinLoc&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;extends&gt;</span>global<span class="nt">&lt;/extends&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>
<span class="w"> </span>NonLinLoc<span class="w"> </span>locator<span class="w"> </span>wrapper<span class="w"> </span>plugin<span class="w"> </span>for<span class="w"> </span>SeisComP.
<span class="w"> </span>NonLinLoc<span class="w"> </span>was<span class="w"> </span>written<span class="w"> </span>by<span class="w"> </span>Anthony<span class="w"> </span>Lomax<span class="w"> </span>(http://alomax.free.fr/nlloc).
<span class="w"> </span><span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;configuration/&gt;</span>
<span class="w"> </span><span class="nt">&lt;command-line/&gt;</span>
<span class="w"> </span><span class="nt">&lt;/plugin&gt;</span>
<span class="nt">&lt;/seiscomp&gt;</span>
</pre></div>
</div>
</section>
<section id="binding">
<span id="xml-binding"></span><h3>Binding<a class="headerlink" href="#binding" title="Permalink to this heading"></a></h3>
<p>A binding template can be found in <code class="file docutils literal notranslate"><span class="pre">doc/templates/binding.xml</span></code>.</p>
<p>It describes the set of configuration parameters to configure a station for a module.</p>
<p>Element: <strong>binding</strong></p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>XML type</p></th>
<th class="head"><p>Mandatory</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><strong>module</strong></p></td>
<td><p>attrib</p></td>
<td><p>yes</p></td>
<td><p>The name of the module this binding belongs
to.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>description</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>A short description of the binding.</p></td>
</tr>
<tr class="row-even"><td><p><strong>configuration</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>The available configuration parameters. See
element
<a class="reference internal" href="#xml-configuration"><span class="std std-ref">configuration</span></a>.</p></td>
</tr>
</tbody>
</table>
<p>Below is an example of how a simple binding definition appears as XML.</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="nt">&lt;seiscomp&gt;</span>
<span class="w"> </span><span class="nt">&lt;binding</span><span class="w"> </span><span class="na">module=</span><span class="s">&quot;seedlink&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>
<span class="w"> </span>Configures<span class="w"> </span>sources<span class="w"> </span>and<span class="w"> </span>parameters<span class="w"> </span>of<span class="w"> </span>a<span class="w"> </span>SeedLink<span class="w"> </span>station.
<span class="w"> </span><span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;configuration/&gt;</span>
<span class="w"> </span><span class="nt">&lt;/binding&gt;</span>
<span class="nt">&lt;/seiscomp&gt;</span>
</pre></div>
</div>
</section>
<section id="configuration">
<span id="xml-configuration"></span><h3>Configuration<a class="headerlink" href="#configuration" title="Permalink to this heading"></a></h3>
<p>This element is used to describe the configuration parameters (not command-line, just
configuration file) of a module, binding and plugin.</p>
<p>Element: <strong>configuration</strong></p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>XML type</p></th>
<th class="head"><p>Mandatory</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><strong>parameter</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>A top level parameter that does not contain
dots in the configuration file.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nv">param</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>value
group.param<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;another value&quot;</span>
</pre></div>
</div>
<p>Here <code class="docutils literal notranslate"><span class="pre">param</span></code> is a top level parameter
whereas <code class="docutils literal notranslate"><span class="pre">group.param</span></code> is not. See
<a class="reference internal" href="#xml-configuration-parameter"><span class="std std-ref">parameter</span></a>.</p>
</td>
</tr>
<tr class="row-odd"><td><p><strong>struct</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>A top level structure definition. Structures
are different from groups and parameters
as they can be instantiated by an arbitrary
name.</p></td>
</tr>
<tr class="row-even"><td><p><strong>group</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>A parameter group that describes a logical
grouping of parameters also called “scope” or
“namespace”. If a parameter in the
configuration file contains dots, then only
the last part is a parameter all others are
groups.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>group1.group2.param<span class="w"> </span><span class="o">=</span><span class="w"> </span>value
</pre></div>
</div>
</td>
</tr>
</tbody>
</table>
<p id="xml-configuration-parameter">Element: <strong>parameter</strong></p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>XML type</p></th>
<th class="head"><p>Mandatory</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><strong>name</strong></p></td>
<td><p>attrib</p></td>
<td><p>yes</p></td>
<td><p>The name of the parameter. This name must be
unique among all parameters of the same
level.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>type</strong></p></td>
<td><p>attrib</p></td>
<td><p>no</p></td>
<td><p>An optional description of the parameter
type which can be interpreted by a
configurator to provide specialized input
widgets. It is also important for the user
how the parameter is read by the module.</p></td>
</tr>
<tr class="row-even"><td><p><strong>unit</strong></p></td>
<td><p>attrib</p></td>
<td><p>no</p></td>
<td><p>An optional unit such as “s” or “km” or
“deg”.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>default</strong></p></td>
<td><p>attrib</p></td>
<td><p>no</p></td>
<td><p>The default value the module uses if this
parameter is not configured.</p></td>
</tr>
<tr class="row-even"><td><p><strong>description</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Gives a brief description of the parameter.</p></td>
</tr>
</tbody>
</table>
<p id="xml-configuration-struct">Element: <strong>struct</strong></p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>XML type</p></th>
<th class="head"><p>Mandatory</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><strong>type</strong></p></td>
<td><p>attrib</p></td>
<td><p>yes</p></td>
<td><p>The name of the struct type. This name is
used in a configurator to give a selection
of available types to be instantiated.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>link</strong></p></td>
<td><p>attrib</p></td>
<td><p>no</p></td>
<td><p>The absolute reference parameter as it would
appear in the configuration file which
holds all instantiated structures.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># &#39;link&#39; parameter holding all available</span>
<span class="c1"># structures. &quot;local&quot; and &quot;teleseismic&quot;</span>
<span class="c1"># are instances of a structure defined</span>
<span class="c1"># below.</span>
locator.profiles<span class="w"> </span><span class="o">=</span><span class="w"> </span>local,<span class="w"> </span>teleseismic
<span class="c1"># The structure defined in locator.profile</span>
<span class="c1"># would have &quot;locator.profiles&quot; as link</span>
<span class="c1"># attribute.</span>
locator.profile.local.param<span class="w"> </span><span class="o">=</span><span class="w"> </span>value
locator.profile.teleseismic.param<span class="w"> </span><span class="o">=</span><span class="w"> </span>value
</pre></div>
</div>
</td>
</tr>
<tr class="row-even"><td><p><strong>description</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Gives a brief description of the parameter.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>parameter</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Describes a parameter in the struct. See
<a class="reference internal" href="#xml-configuration-parameter"><span class="std std-ref">parameter</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><strong>struct</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Describes a struct part of this struct.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>group</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Describes a group part of this struct. See
<a class="reference internal" href="#xml-configuration-group"><span class="std std-ref">group</span></a>.</p></td>
</tr>
</tbody>
</table>
<p id="xml-configuration-group">Element: <strong>group</strong></p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>XML type</p></th>
<th class="head"><p>Mandatory</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><strong>name</strong></p></td>
<td><p>attrib</p></td>
<td><p>yes</p></td>
<td><p>The name of the group. This name must be
unique among all groups of the same level.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>description</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Gives a brief description of the parameter.</p></td>
</tr>
<tr class="row-even"><td><p><strong>parameter</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Describes a parameter in the group. See
<a class="reference internal" href="#xml-configuration-parameter"><span class="std std-ref">parameter</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>struct</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Describes a struct part of this group. See
<a class="reference internal" href="#xml-configuration-struct"><span class="std std-ref">struct</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><strong>group</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Describes a group part of this group.</p></td>
</tr>
</tbody>
</table>
<p>Below is an example of the plugin definition for the NonLinLoc plugin. It contains
groups, parameters and structures.</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="nt">&lt;seiscomp&gt;</span>
<span class="w"> </span><span class="nt">&lt;plugin</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;NonLinLoc&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;extends&gt;</span>global<span class="nt">&lt;/extends&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>...<span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;configuration&gt;</span>
<span class="w"> </span><span class="nt">&lt;group</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;NonLinLoc&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameter</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;publicID&quot;</span><span class="w"> </span><span class="na">type=</span><span class="s">&quot;string&quot;</span>
<span class="w"> </span><span class="na">default=</span><span class="s">&quot;NLL.@time/%Y%m%d%H%M%S.%f@.@id@&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>
<span class="w"> </span>PublicID<span class="w"> </span>creation<span class="w"> </span>pattern<span class="w"> </span>for<span class="w"> </span>an<span class="w"> </span>origin<span class="w"> </span>created<span class="w"> </span>by<span class="w"> </span>NonLinLoc.
<span class="w"> </span><span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;/parameter&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameter</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;outputPath&quot;</span><span class="w"> </span><span class="na">type=</span><span class="s">&quot;path&quot;</span><span class="w"> </span><span class="na">default=</span><span class="s">&quot;/tmp/sc3.nll&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>
<span class="w"> </span>Defines<span class="w"> </span>the<span class="w"> </span>output<span class="w"> </span>path<span class="w"> </span>for<span class="w"> </span>all<span class="w"> </span>native<span class="w"> </span>NonLinLoc<span class="w"> </span>input<span class="w"> </span>and
<span class="w"> </span>output<span class="w"> </span>files.
<span class="w"> </span><span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;/parameter&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameter</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;profiles&quot;</span><span class="w"> </span><span class="na">type=</span><span class="s">&quot;list:string&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>
<span class="w"> </span>Defines<span class="w"> </span>a<span class="w"> </span>list<span class="w"> </span>of<span class="w"> </span>active<span class="w"> </span>profiles<span class="w"> </span>to<span class="w"> </span>be<span class="w"> </span>used<span class="w"> </span>by<span class="w"> </span>the<span class="w"> </span>plugin.
<span class="w"> </span><span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;/parameter&gt;</span>
<span class="w"> </span><span class="nt">&lt;group</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;profile&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;struct</span><span class="w"> </span><span class="na">type=</span><span class="s">&quot;NonLinLoc profile&quot;</span><span class="w"> </span><span class="na">link =</span><span class="w"> </span><span class="s">&quot;NonLinLoc.profiles&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>
<span class="w"> </span>Defines<span class="w"> </span>a<span class="w"> </span>regional<span class="w"> </span>profile<span class="w"> </span>that<span class="w"> </span>is<span class="w"> </span>used<span class="w"> </span>if<span class="w"> </span>a<span class="w"> </span>prelocation<span class="w"> </span>falls
<span class="w"> </span>inside<span class="w"> </span>the<span class="w"> </span>configured<span class="w"> </span>region.
<span class="w"> </span><span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;parameter</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;earthModelID&quot;</span><span class="w"> </span><span class="na">type=</span><span class="s">&quot;string&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>
<span class="w"> </span>earthModelID<span class="w"> </span>that<span class="w"> </span>is<span class="w"> </span>stored<span class="w"> </span>in<span class="w"> </span>the<span class="w"> </span>created<span class="w"> </span>origin.
<span class="w"> </span><span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;/parameter&gt;</span>
<span class="w"> </span><span class="nt">&lt;/struct&gt;</span>
<span class="w"> </span><span class="nt">&lt;/group&gt;</span>
<span class="w"> </span><span class="nt">&lt;/group&gt;</span>
<span class="w"> </span><span class="nt">&lt;/configuration&gt;</span>
<span class="w"> </span><span class="nt">&lt;/plugin&gt;</span>
<span class="nt">&lt;/seiscomp&gt;</span>
</pre></div>
</div>
</section>
<section id="command-line">
<span id="xml-command-line"></span><h3>Command-line<a class="headerlink" href="#command-line" title="Permalink to this heading"></a></h3>
<p>This element is used to describe the command-line options of a module. The element structure is
much simpler than the <a class="reference internal" href="#xml-configuration"><span class="std std-ref">configuration</span></a> element. The command-line only
contains group elements which in turn have either option or optionReference elements. Through
the optionReference element it is possible to refer to existing command-line options. This is
important for all modules that are using the <cite>SeisComP</cite> libraries because they share a set of
basic command-line options inherited from the Application class.</p>
<p>Element: <strong>command-line</strong></p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>XML type</p></th>
<th class="head"><p>Mandatory</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><strong>synopsis</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Optional description of how to start the
module.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>description</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Optional description of the command-line
and non option parameters.</p></td>
</tr>
<tr class="row-even"><td><p><strong>group</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Describes an option group. See
<a class="reference internal" href="#xml-command-line-group"><span class="std std-ref">group</span></a>.</p></td>
</tr>
</tbody>
</table>
<p id="xml-command-line-group">Element: <strong>group</strong></p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>XML type</p></th>
<th class="head"><p>Mandatory</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><strong>name</strong></p></td>
<td><p>attrib</p></td>
<td><p>yes</p></td>
<td><p>The name of the group. This name must be
unique among all groups of the same level.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>option</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>An option part of this group. See
<a class="reference internal" href="#xml-command-line-option"><span class="std std-ref">option</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><strong>optionReference</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>A reference to an existing option using its
publicID.</p></td>
</tr>
</tbody>
</table>
<p id="xml-command-line-option">Element: <strong>option</strong></p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>XML type</p></th>
<th class="head"><p>Mandatory</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><strong>flag</strong></p></td>
<td><p>attrib</p></td>
<td><p>semi</p></td>
<td><p>The short option flag. Either this attribute
or long-flag must be set.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>long-flag</strong></p></td>
<td><p>attrib</p></td>
<td><p>semi</p></td>
<td><p>The long option flag. Either this attribute
or flag must be set.</p></td>
</tr>
<tr class="row-even"><td><p><strong>param-ref</strong></p></td>
<td><p>attrib</p></td>
<td><p>no</p></td>
<td><p>Refers to a configuration parameter name that
this parameter overrides. Name is the full
path, e.g. <em>connection.server</em> and not just
<em>server</em>.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>argument</strong></p></td>
<td><p>attrib</p></td>
<td><p>no</p></td>
<td><p>The optional argument string. If argument is
not set, the option is a switch.</p></td>
</tr>
<tr class="row-even"><td><p><strong>default</strong></p></td>
<td><p>attrib</p></td>
<td><p>no</p></td>
<td><p>The options default value used if the option
is not given though it is hard in most cases
because command-line options very often
redefine configuration parameters which is
then used as a default value for the option.</p></td>
</tr>
<tr class="row-odd"><td><p><strong>publicID</strong></p></td>
<td><p>attrib</p></td>
<td><p>no</p></td>
<td><p>The optional publicID of the option to be
able to reference it from an optionReference
element. The publicID must be unique among
all defined options.</p></td>
</tr>
<tr class="row-even"><td><p><strong>description</strong></p></td>
<td><p>element</p></td>
<td><p>no</p></td>
<td><p>Gives a brief description of the option.</p></td>
</tr>
</tbody>
</table>
<p>Below is an example of the module definition for <strong class="program">scautoloc</strong> (extract).</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="nt">&lt;seiscomp&gt;</span>
<span class="w"> </span><span class="nt">&lt;module</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;scautoloc&quot;</span><span class="w"> </span><span class="na">category=</span><span class="s">&quot;Modules/Processing&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>Locates<span class="w"> </span>seismic<span class="w"> </span>events.<span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;configuration&gt;</span>
<span class="w"> </span>...
<span class="w"> </span><span class="nt">&lt;/configuration&gt;</span>
<span class="w"> </span><span class="nt">&lt;command-line&gt;</span>
<span class="w"> </span><span class="nt">&lt;group</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;Generic&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;optionReference&gt;</span>generic#help<span class="nt">&lt;/optionReference&gt;</span>
<span class="w"> </span><span class="nt">&lt;optionReference&gt;</span>generic#version<span class="nt">&lt;/optionReference&gt;</span>
<span class="w"> </span><span class="nt">&lt;optionReference&gt;</span>generic#config-file<span class="nt">&lt;/optionReference&gt;</span>
<span class="w"> </span><span class="nt">&lt;optionReference&gt;</span>generic#plugins<span class="nt">&lt;/optionReference&gt;</span>
<span class="w"> </span><span class="nt">&lt;optionReference&gt;</span>generic#daemon<span class="nt">&lt;/optionReference&gt;</span>
<span class="w"> </span><span class="nt">&lt;optionReference&gt;</span>generic#auto-shutdown<span class="nt">&lt;/optionReference&gt;</span>
<span class="w"> </span><span class="nt">&lt;optionReference&gt;</span>generic#shutdown-master-module<span class="nt">&lt;/optionReference&gt;</span>
<span class="w"> </span><span class="nt">&lt;optionReference&gt;</span>generic#shutdown-master-username<span class="nt">&lt;/optionReference&gt;</span>
<span class="w"> </span><span class="nt">&lt;/group&gt;</span>
<span class="w"> </span><span class="nt">&lt;group</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;Mode&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;option</span><span class="w"> </span><span class="na">flag=</span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="na">long-flag=</span><span class="s">&quot;test&quot;</span><span class="w"> </span><span class="na">argument=</span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="na">default=</span><span class="s">&quot;&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>Do<span class="w"> </span>not<span class="w"> </span>send<span class="w"> </span>any<span class="w"> </span>object<span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;/option&gt;</span>
<span class="w"> </span><span class="nt">&lt;option</span><span class="w"> </span><span class="na">flag=</span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="na">long-flag=</span><span class="s">&quot;offline&quot;</span><span class="w"> </span><span class="na">argument=</span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="na">default=</span><span class="s">&quot;&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>
<span class="w"> </span>Do<span class="w"> </span>not<span class="w"> </span>connect<span class="w"> </span>to<span class="w"> </span>a<span class="w"> </span>messaging<span class="w"> </span>server.<span class="w"> </span>Instead<span class="w"> </span>a
<span class="w"> </span>station-locations.conf<span class="w"> </span>file<span class="w"> </span>can<span class="w"> </span>be<span class="w"> </span>provided.<span class="w"> </span>This<span class="w"> </span>implies
<span class="w"> </span>--test<span class="w"> </span>and<span class="w"> </span>--playback
<span class="w"> </span><span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;/option&gt;</span>
<span class="w"> </span><span class="nt">&lt;option</span><span class="w"> </span><span class="na">flag=</span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="na">long-flag=</span><span class="s">&quot;playback&quot;</span><span class="w"> </span><span class="na">argument=</span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="na">default=</span><span class="s">&quot;&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;description&gt;</span>Flush<span class="w"> </span>origins<span class="w"> </span>immediately<span class="w"> </span>without<span class="w"> </span>delay<span class="nt">&lt;/description&gt;</span>
<span class="w"> </span><span class="nt">&lt;/option&gt;</span>
<span class="w"> </span><span class="nt">&lt;/group&gt;</span>
<span class="w"> </span><span class="nt">&lt;/command-line&gt;</span>
<span class="w"> </span><span class="nt">&lt;/module&gt;</span>
<span class="nt">&lt;/seiscomp&gt;</span>
</pre></div>
</div>
</section>
</section>
<section id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this heading"></a></h2>
<aside class="footnote-list brackets">
<aside class="footnote brackets" id="id2" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id3">1</a><span class="fn-bracket">]</span></span>
<p><a class="reference external" href="https://www.seiscomp.de/">https://www.seiscomp.de/</a></p>
</aside>
<aside class="footnote brackets" id="id4" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id5">2</a><span class="fn-bracket">]</span></span>
<p><a class="reference external" href="https://docutils.sourceforge.io/rst.html">https://docutils.sourceforge.io/rst.html</a></p>
</aside>
<aside class="footnote brackets" id="id6" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id7">3</a><span class="fn-bracket">]</span></span>
<p><a class="reference external" href="https://www.sphinx-doc.org/">https://www.sphinx-doc.org/</a></p>
</aside>
<aside class="footnote brackets" id="id8" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id9">4</a><span class="fn-bracket">]</span></span>
<p><a class="reference external" href="https://docs.python.org/">https://docs.python.org/</a></p>
</aside>
<aside class="footnote brackets" id="id10" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id11">5</a><span class="fn-bracket">]</span></span>
<p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html">https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html</a></p>
</aside>
<aside class="footnote brackets" id="id12" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id13">6</a><span class="fn-bracket">]</span></span>
<p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html">https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html</a></p>
</aside>
<aside class="footnote brackets" id="id14" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id15">7</a><span class="fn-bracket">]</span></span>
<p><a class="reference external" href="https://github.com/SeisComP">https://github.com/SeisComP</a></p>
</aside>
<aside class="footnote brackets" id="id16" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id17">8</a><span class="fn-bracket">]</span></span>
<p><a class="reference external" href="https://forum.seiscomp.de">https://forum.seiscomp.de</a></p>
</aside>
</aside>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Contributing Documentation</a><ul>
<li><a class="reference internal" href="#documenting-executables">Documenting Executables</a></li>
<li><a class="reference internal" href="#images">Images</a></li>
<li><a class="reference internal" href="#understanding-the-xml">Understanding the XML</a><ul>
<li><a class="reference internal" href="#module">Module</a></li>
<li><a class="reference internal" href="#plugin">Plugin</a></li>
<li><a class="reference internal" href="#binding">Binding</a></li>
<li><a class="reference internal" href="#configuration">Configuration</a></li>
<li><a class="reference internal" href="#command-line">Command-line</a></li>
</ul>
</li>
<li><a class="reference internal" href="#references">References</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="build.html"
title="previous chapter">Getting the Source Code</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="style-guide.html"
title="next chapter">Style Guide for Documentation</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/contributing-docs.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,676 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Filter Grammar &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Time Formats" href="time-grammar.html" />
<link rel="prev" title="ncurses" href="../apps/scm_ncurses.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="time-grammar.html" title="Time Formats"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="../apps/scm_ncurses.html" title="ncurses"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="filter-grammar">
<span id="id1"></span><h1>Filter Grammar<a class="headerlink" href="#filter-grammar" title="Permalink to this heading"></a></h1>
<p>SeisComP supports string-based filter definitions. This section covers available
filters and their parameters.</p>
<p>The filter definitions support <a class="reference internal" href="#sec-filters-list"><span class="std std-ref">SeisComP filters</span></a> and
building filter chains (operator &gt;&gt; or -&gt;) as well as combining them with basic
mathematical operators. Filter or the first filter in a filter chain
is always applied to the raw, uncorrected data.
Use brackets <em>()</em> to apply the operations within before the one outside.</p>
<p>Mathematical operators are:</p>
<ul class="simple">
<li><p>+ : addition</p></li>
<li><p>- : subtraction</p></li>
<li><p>* : multiplication</p></li>
<li><p>/ : division</p></li>
<li><p>^ : power / exponentiation</p></li>
<li><p>|. | : absolute value.</p></li>
</ul>
<p>A special mathematical operator is a negative value replacing a positive
frequency value, e.g., in Butterworth filters (see Section
<a class="reference internal" href="#sec-filters-list"><span class="std std-ref">List of filters</span></a>). The modulus of the frequency value is multiplied by
the sample rate of the waveforms to which it is applied. The resulting value
defines the frequency the filter is configured with. Note, -0.5 defines the
<a class="reference internal" href="glossary.html#term-Nyquist-frequency"><span class="xref std std-term">Nyquist frequency</span></a> of the data. Negative values can be applied for
defining frequencies dynamically based on sample rate.</p>
<p>Example:</p>
<p>Data with a sample rate of 100 Hz shall be low-pass filtered at 80% of the
Nyquist frequency by a <a class="reference internal" href="#BW_LP" title="BW_LP"><code class="xref py py-func docutils literal notranslate"><span class="pre">Butterworth</span> <span class="pre">low-pass</span> <span class="pre">filter,</span> <span class="pre">BW_LP</span></code></a>. A
value of -0.4 corresponds to 80% of the Nyquist frequency. The filter can be
specified as <a class="reference internal" href="#BW_LP" title="BW_LP"><code class="xref py py-func docutils literal notranslate"><span class="pre">BW_LP(3,-0.4)</span></code></a>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Filters in <cite>SeisComP</cite> are recursive allowing real-time application. Therefore,
filter artefacts, e.g. ringing, are always visible at the beginning of the
traces or after data gaps.</p>
</div>
<section id="example">
<h2>Example<a class="headerlink" href="#example" title="Permalink to this heading"></a></h2>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>A<span class="o">(</span><span class="m">1</span>,2<span class="o">)</span>&gt;&gt;<span class="o">(</span>B<span class="o">(</span><span class="m">3</span>,4<span class="o">)</span>*2+C<span class="o">(</span><span class="m">5</span>,6,7<span class="o">))</span>&gt;&gt;D<span class="o">(</span><span class="m">8</span><span class="o">)</span>
</pre></div>
</div>
<p>where A, B, C and D are different filters configured with different parameters.
In this example a sample <em>s</em> is filtered to get the final sample <em>sf</em> passing the following stages:</p>
<ol class="arabic simple">
<li><p>filter sample <em>s</em> with A: <em>sa</em> = A(1,2)(<em>s</em>)</p></li>
<li><p>filter <em>sa</em> with B: <em>sb</em> = B(3,4)(<em>sa</em>)</p></li>
<li><p><em>sb</em> = <em>sb</em> * 2</p></li>
<li><p>filter <em>sa</em> with C: <em>sc</em> = C(5,6,7)(<em>sa</em>)</p></li>
<li><p>add <em>sb</em> and <em>sc</em>: <em>sbc</em> = <em>sb</em> + <em>sc</em></p></li>
<li><p>filter <em>sbc</em> with D: <em>sf</em> = D(8)(<em>sbc</em>)</p></li>
</ol>
<p>sf = final sample.</p>
<p>The default filter applied by <a class="reference internal" href="../apps/scautopick.html#scautopick"><span class="std std-ref">scautopick</span></a> for making detections is</p>
<p><a class="reference internal" href="#RMHP" title="RMHP"><code class="xref py py-func docutils literal notranslate"><span class="pre">RMHP(10)</span></code></a> &gt;&gt; <a class="reference internal" href="#ITAPER" title="ITAPER"><code class="xref py py-func docutils literal notranslate"><span class="pre">ITAPER(30)</span></code></a> &gt;&gt; <a class="reference internal" href="#BW" title="BW"><code class="xref py py-func docutils literal notranslate"><span class="pre">BW(4,0.7,2)</span></code></a> &gt;&gt; <a class="reference internal" href="#STALTA" title="STALTA"><code class="xref py py-func docutils literal notranslate"><span class="pre">STALTA(2,80)</span></code></a></p>
<p>It first removes the offset. Then an ITAPER of 30 seconds is applied before the data
is filtered with a fourth order Butterworth bandpass with corner frequencies of 0.7 Hz and 2 Hz.
Finally an STA/LTA filter with a short-time time window of 2 seconds and a long-term time window of
80 seconds is applied.</p>
<p>To apply mathematical operations on original waveforms use <a class="reference internal" href="#self" title="self"><code class="xref py py-func docutils literal notranslate"><span class="pre">self()</span></code></a>, e.g.:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>self<span class="o">()</span>^2&gt;&gt;A<span class="o">(</span><span class="m">1</span>,2<span class="o">)</span>
</pre></div>
</div>
</section>
<section id="test-filter-strings">
<h2>Test filter strings<a class="headerlink" href="#test-filter-strings" title="Permalink to this heading"></a></h2>
<p>Filters can be conveniently tested without much configuration. To perform such tests</p>
<ol class="arabic simple">
<li><p>Open waveforms in <a class="reference internal" href="../apps/scrttv.html#scrttv"><span class="std std-ref">scrttv</span></a> or the picker window of <a class="reference internal" href="../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a>.</p></li>
<li><p>Open a simple graphical text editor, e.g. gedit, pluma or kwrite and write down
the filter string.</p></li>
<li><p>Mark / highlight the filter string and use the mouse to drag the filter string
onto the waveforms.</p></li>
<li><p>Observe the differences between filtered and unfiltered waveforms.</p></li>
</ol>
<figure class="align-center" id="id2">
<a class="reference internal image-reference" href="../_images/scrttv-filter.png"><img alt="../_images/scrttv-filter.png" src="../_images/scrttv-filter.png" style="width: 10cm;" /></a>
<figcaption>
<p><span class="caption-text">scrttv with raw (blue) and filtered (black) data. The applied filter string
is shown in the lower left corner.</span><a class="headerlink" href="#id2" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</section>
<section id="list-of-filters">
<span id="sec-filters-list"></span><h2>List of filters<a class="headerlink" href="#list-of-filters" title="Permalink to this heading"></a></h2>
<p>Multiple filter functions are available. Filters may take parameters as
arguments. If a filter function has no parameter, it can be given either with
parentheses, e.g. <a class="reference internal" href="#DIFF" title="DIFF"><code class="xref py py-func docutils literal notranslate"><span class="pre">DIFF()</span></code></a>, or without, e.g.
<a class="reference internal" href="#DIFF" title="DIFF"><code class="xref py py-func docutils literal notranslate"><span class="pre">DIFF</span></code></a>.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>All frequencies passed by parameters to filters must be below the Nyquist
frequency of the original signal. Otherwise, filtering may result in undesired
behavior of modules, e.g., stopping or showing of empty traces.</p>
</div>
<dl class="py function">
<dt class="sig sig-object py" id="AVG">
<span class="sig-name descname"><span class="pre">AVG</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timespan</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#AVG" title="Permalink to this definition"></a></dt>
<dd><p>Calculates the average of preceding samples.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>timespan</strong> Time span to form the average in seconds</p>
</dd>
</dl>
</dd></dl>
<span class="target" id="filter-bw"></span><dl class="py function">
<dt class="sig sig-object py" id="BPENV">
<span class="sig-name descname"><span class="pre">BPENV</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">center-freq</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bandwidth</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">order</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#BPENV" title="Permalink to this definition"></a></dt>
<dd><p>Butterworth bandpass filter combined with envelope computation.</p>
<p>This is a recursive approximation of the envelope. It depends on the bandpass center
frequency being also the dominant frequency of the signal. Hence it only makes sense for
bandpass filtered signals. Even though bandwidth and order may be changed it is
recommended to use the defaults.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>center-freq</strong> The center frequency of the passband in Hz. Negative values define the frequency as -value * sample rate.</p></li>
<li><p><strong>bandwidth</strong> The filter bandwidth in octaves (default is 1 octave)</p></li>
<li><p><strong>order</strong> The filter order of the bandpass (default is 4)</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="BW">
<span class="sig-name descname"><span class="pre">BW</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">order</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lo-freq</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">hi-freq</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#BW" title="Permalink to this definition"></a></dt>
<dd><p>Alias for the <a class="reference internal" href="#BW_BP" title="BW_BP"><code class="xref py py-func docutils literal notranslate"><span class="pre">Butterworth</span> <span class="pre">band-pass</span> <span class="pre">filter,</span> <span class="pre">BW_BP</span></code></a>.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="BW_BP">
<span class="sig-name descname"><span class="pre">BW_BP</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">order</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lo-freq</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">hi-freq</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#BW_BP" title="Permalink to this definition"></a></dt>
<dd><p>Butterworth bandpass filter (BW) realized as a causal recursive IIR (infinite impulse response)
filter. An arbitrary bandpass filter can be created for given order and corner frequencies.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>order</strong> The filter order</p></li>
<li><p><strong>lo-freq</strong> The lower corner frequency as 1/seconds. Negative values define the frequency as -value * sample rate.</p></li>
<li><p><strong>hi-freq</strong> The upper corner frequency as 1/seconds. Negative values define the frequency as -value * sample rate.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="BW_BS">
<span class="sig-name descname"><span class="pre">BW_BS</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">order</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lo-freq</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">hi-freq</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#BW_BS" title="Permalink to this definition"></a></dt>
<dd><p>Butterworth band stop filter realized as a causal recursive IIR (infinite impulse response) filter
suppressing amplitudes at frequencies between <em>lo-freq</em> and <em>hi-freq</em>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>order</strong> The filter order</p></li>
<li><p><strong>lo-freq</strong> The lower corner frequency as 1/seconds. Negative values define the frequency as -value * sample rate.</p></li>
<li><p><strong>hi-freq</strong> The upper corner frequency as 1/seconds. Negative values define the frequency as -value * sample rate.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="BW_HP">
<span class="sig-name descname"><span class="pre">BW_HP</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">order</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lo-freq</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#BW_HP" title="Permalink to this definition"></a></dt>
<dd><p>Butterworth high-pass filter realized as a causal recursive IIR (infinite
impulse response) filter.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>order</strong> The filter order</p></li>
<li><p><strong>lo-freq</strong> The corner frequency as 1/seconds. Negative values define the frequency as -value * sample rate.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="BW_HLP">
<span class="sig-name descname"><span class="pre">BW_HLP</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">order</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lo-freq</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">hi-freq</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#BW_HLP" title="Permalink to this definition"></a></dt>
<dd><p>Butterworth high-low-pass filter realized as a combination of
<a class="reference internal" href="#BW_HP" title="BW_HP"><code class="xref py py-func docutils literal notranslate"><span class="pre">BW_HP()</span></code></a> and <a class="reference internal" href="#BW_LP" title="BW_LP"><code class="xref py py-func docutils literal notranslate"><span class="pre">BW_LP()</span></code></a>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>order</strong> The filter order</p></li>
<li><p><strong>lo-freq</strong> The lower corner frequency as 1/seconds. Negative values define the frequency as -value * sample rate.</p></li>
<li><p><strong>hi-freq</strong> The upper corner frequency as 1/seconds. Negative values define the frequency as -value * sample rate.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="BW_LP">
<span class="sig-name descname"><span class="pre">BW_LP</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">order</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">hi-freq</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#BW_LP" title="Permalink to this definition"></a></dt>
<dd><p>Butterworth low-pass filter realized as a causal recursive IIR (infinite
impulse response) filter.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>order</strong> The filter order</p></li>
<li><p><strong>hi-freq</strong> The corner frequency as 1/seconds. Negative values define the frequency as -value * sample rate.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="CUTOFF">
<span class="sig-name descname"><span class="pre">CUTOFF</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">delta</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#CUTOFF" title="Permalink to this definition"></a></dt>
<dd><p>Sets the value of the current sample to the mean of the current and the
previous sample when the difference between the two exceeds <em>delta</em>.
Otherwise, the original value is retained.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>delta</strong> The threshold for forming the average.</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="DIFF">
<span class="sig-name descname"><span class="pre">DIFF</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#DIFF" title="Permalink to this definition"></a></dt>
<dd><p>Differentiation filter realized as a recursive IIR (infinite impulse
response) differentiation filter.</p>
<p>The differentiation loop calculates for each input sample <cite>s</cite> the output sample <cite>s'</cite>:</p>
<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="n">s</span><span class="s1">&#39; = (s-v1) / dt</span>
<span class="n">v1</span> <span class="o">=</span> <span class="n">s</span><span class="p">;</span>
</pre></div>
</div>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="DT">
<span class="sig-name descname"><span class="pre">DT</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#DT" title="Permalink to this definition"></a></dt>
<dd><p>Replaces each input sample with the sampling time of the current sample. This
is a shortcut for <code class="code docutils literal notranslate"><span class="pre">1/SR</span></code> but more efficient as the division has to be
done only once and not once per input sample.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="DURATION">
<span class="sig-name descname"><span class="pre">DURATION</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">trigger_on</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">trigger_off</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#DURATION" title="Permalink to this definition"></a></dt>
<dd><p>Replaces the input samples with the trigger duration. The duration is computed as the
time between <cite>trigger_on</cite> and <cite>trigger_off</cite>. Outside the trigger, the filter outputs
zero.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="INT">
<span class="sig-name descname"><span class="pre">INT</span></span><span class="sig-paren">(</span><span class="optional">[</span><em class="sig-param"><span class="n"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">0</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#INT" title="Permalink to this definition"></a></dt>
<dd><p>Integration filter realized as a recursive IIR (infinite impulse response) integration
filter. The weights are calculated according to parameter <cite>a</cite> in the following way:</p>
<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="n">a0</span> <span class="o">=</span> <span class="p">((</span><span class="mi">3</span><span class="o">-</span><span class="n">a</span><span class="p">)</span><span class="o">/</span><span class="mi">6</span><span class="p">)</span> <span class="o">*</span> <span class="n">dt</span>
<span class="n">a1</span> <span class="o">=</span> <span class="p">(</span><span class="mi">2</span><span class="o">*</span><span class="p">(</span><span class="mi">3</span><span class="o">+</span><span class="n">a</span><span class="p">)</span><span class="o">/</span><span class="mi">6</span><span class="p">)</span> <span class="o">*</span> <span class="n">dt</span>
<span class="n">a2</span> <span class="o">=</span> <span class="p">((</span><span class="mi">3</span><span class="o">-</span><span class="n">a</span><span class="p">)</span><span class="o">/</span><span class="mi">6</span><span class="p">)</span> <span class="o">*</span> <span class="n">dt</span>
<span class="n">b0</span> <span class="o">=</span> <span class="mi">1</span>
<span class="n">b1</span> <span class="o">=</span> <span class="mi">0</span>
<span class="n">b2</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span>
</pre></div>
</div>
<p>The integration loop calculates for each input sample <cite>s</cite> the integrated output sample s':</p>
<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="n">v0</span> <span class="o">=</span> <span class="n">b0</span><span class="o">*</span><span class="n">s</span> <span class="o">-</span> <span class="n">b1</span><span class="o">*</span><span class="n">v1</span> <span class="o">-</span> <span class="n">b2</span><span class="o">*</span><span class="n">v2</span>
<span class="n">s</span><span class="s1">&#39; = a0*v0 + a1*v1 + a2*v2</span>
<span class="n">v2</span> <span class="o">=</span> <span class="n">v1</span>
<span class="n">v1</span> <span class="o">=</span> <span class="n">v0</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>a</strong> Coefficient <cite>a</cite>.</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="ITAPER">
<span class="sig-name descname"><span class="pre">ITAPER</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timespan</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#ITAPER" title="Permalink to this definition"></a></dt>
<dd><p>A one-sided cosine taper applied when initializing the filter, e.g. at the
beginning of the data or after longer gaps.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>timespan</strong> The timespan to apply the taper in seconds.</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="MAX">
<span class="sig-name descname"><span class="pre">MAX</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timespan</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#MAX" title="Permalink to this definition"></a></dt>
<dd><p>Computes the maximum within the timespan preceding the sample.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>timespan</strong> The timespan to measure the maximum in seconds</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="MEDIAN">
<span class="sig-name descname"><span class="pre">MEDIAN</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timespan</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#MEDIAN" title="Permalink to this definition"></a></dt>
<dd><p>Computes the median within the timespan preceding the sample. Useful, e.g.
for despiking. The delay due to the filter may be up to its timespan.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>timespan</strong> The timespan to compute the median in seconds</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="MIN">
<span class="sig-name descname"><span class="pre">MIN</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timespan</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#MIN" title="Permalink to this definition"></a></dt>
<dd><p>Computes the minimum within the timespan preceding the sample.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>timespan</strong> The timespan to measure the minimum in seconds</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="RM">
<span class="sig-name descname"><span class="pre">RM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timespan</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#RM" title="Permalink to this definition"></a></dt>
<dd><p>A running mean filter computing the mean value within <em>timespan</em>. For a given
time window in seconds the running mean is computed from the single amplitude
values and set as output. This computation is equal to <a class="reference internal" href="#RMHP" title="RMHP"><code class="xref py py-func docutils literal notranslate"><span class="pre">RHMP</span></code></a>
with the exception that the mean is not subtracted from single amplitudes but
replaces them.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nv">RMHP</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>self-RM
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>timespan</strong> The timespan to measure the mean in seconds</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="RMHP">
<span class="sig-name descname"><span class="pre">RMHP</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timespan</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#RMHP" title="Permalink to this definition"></a></dt>
<dd><p>A high-pass filter realized as running mean high-pass filter. For a given time window in
seconds the running mean is subtracted from the single amplitude values. This is equivalent
to high-pass filtering the data.</p>
<p>Running mean high-pass of e.g. 10 seconds calculates the difference to the running mean of 10 seconds.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>timespan</strong> The timespan to measure the mean in seconds</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="RND">
<span class="sig-name descname"><span class="pre">RND</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mean</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stddev</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#RND" title="Permalink to this definition"></a></dt>
<dd><p>A random signal generator with Gaussian normal distribution. It replaces
input samples with the new signal. Use RND() with the operator + for adding
the random signal to some data. Example: (BW(3,0.7,2) + RND(0,10))&gt;&gt;STALTA(2,80)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>mean</strong> The mean value of the normal distribution</p></li>
<li><p><strong>stddev</strong> The standard deviation of the normal distribution</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="RUD">
<span class="sig-name descname"><span class="pre">RUD</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">minimum</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">maximum</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#RUD" title="Permalink to this definition"></a></dt>
<dd><p>A random signal generator with uniform distribution. It replaces input
samples with the new signal. Use RUD() with the operator + for adding the
random signal to some data. Example: (BW(3,0.7,2) + RUD(-10,10))&gt;&gt;STALTA(2,80)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>minimum</strong> The minimum value of the uniform distribution</p></li>
<li><p><strong>maximum</strong> The maximum value of the uniform distribution</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="self">
<span class="sig-name descname"><span class="pre">self</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#self" title="Permalink to this definition"></a></dt>
<dd><p>The original data itself.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="SM5">
<span class="sig-name descname"><span class="pre">SM5</span></span><span class="sig-paren">(</span><span class="optional">[</span><em class="sig-param"><span class="n"><span class="pre">type</span> <span class="pre">=</span> <span class="pre">1</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#SM5" title="Permalink to this definition"></a></dt>
<dd><p>A simulation of a 5-second seismometer.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>type</strong> The data type: either 0 (displacement), 1 (velocity) or 2 (acceleration)</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="SR">
<span class="sig-name descname"><span class="pre">SR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#SR" title="Permalink to this definition"></a></dt>
<dd><p>Replaces each input sample with the sampling rate of the current sample.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="STALTA">
<span class="sig-name descname"><span class="pre">STALTA</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sta</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lta</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#STALTA" title="Permalink to this definition"></a></dt>
<dd><p>A STA/LTA filter is the ratio of a short-time amplitude average (STA) to a
long-time amplitude average (LTA) calculated continuously in two consecutive
time windows. This method is the basis for many trigger algorithm. The
short-time window is for detection of transient signal onsets whereas the
long-time window provides information about the actual seismic noise at the
station.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sta</strong> Length of short-term time window in seconds</p></li>
<li><p><strong>lta</strong> Length of long-term time window in seconds. The time window ends
with the same sample as sta.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="STALTA2">
<span class="sig-name descname"><span class="pre">STALTA2</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sta</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lta</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">on</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">off</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#STALTA2" title="Permalink to this definition"></a></dt>
<dd><p>The <a class="reference internal" href="#STALTA" title="STALTA"><code class="xref py py-func docutils literal notranslate"><span class="pre">STALTA()</span></code></a> implementation where LTA time window is kept fixed
between the time the STA/LTA ratio exceeds <em>on</em> and falls below <em>off</em>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sta</strong> Length of short-term time window in seconds</p></li>
<li><p><strong>lta</strong> Long-term time window ending with the same sample as sta</p></li>
<li><p><strong>on</strong> STA/LTA ratio defining the start of the time window for fixing LTA.</p></li>
<li><p><strong>off</strong> STA/LTA ratio defining the end of the time window for fixing LTA.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="SUM">
<span class="sig-name descname"><span class="pre">SUM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timespan</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#SUM" title="Permalink to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>timespan</strong> The timespan to be summed up in seconds</p>
</dd>
</dl>
<p>Computes the amplitude sum of the timespan preceding the sample.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="WA">
<span class="sig-name descname"><span class="pre">WA</span></span><span class="sig-paren">(</span><span class="optional">[</span><em class="sig-param"><span class="n"><span class="pre">type</span> <span class="pre">=</span> <span class="pre">1</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">gain=2080</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">T0=0.8</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">h=0.7</span></span></em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#WA" title="Permalink to this definition"></a></dt>
<dd><p>The simulation filter of a <a class="reference internal" href="glossary.html#term-Wood-Anderson-seismometer"><span class="xref std std-term">Wood-Anderson seismometer</span></a>. The data format
of the waveforms has to be given for applying the simulation filter
(displacement = 0, velocity = 1, acceleration = 2), e.g., WA(1) is the
simulation on velocity data.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>type</strong> The data type: 0 (displacement), 1 (velocity) or 2 (acceleration)</p></li>
<li><p><strong>gain</strong> The gain of the Wood-Anderson response</p></li>
<li><p><strong>T0</strong> The eigen period in seconds</p></li>
<li><p><strong>h</strong> The damping constant</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="WWSSN_LP">
<span class="sig-name descname"><span class="pre">WWSSN_LP</span></span><span class="sig-paren">(</span><span class="optional">[</span><em class="sig-param"><span class="n"><span class="pre">type</span> <span class="pre">=</span> <span class="pre">1</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#WWSSN_LP" title="Permalink to this definition"></a></dt>
<dd><p>The instrument simulation filter of a
<a class="reference internal" href="glossary.html#term-WWSSN_LP"><span class="xref std std-term">World-Wide Standard Seismograph Network (WWSSN) long-period seismometer</span></a>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>type</strong> The data type: 0 (displacement), 1 (velocity) or 2 (acceleration)</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="WWSSN_SP">
<span class="sig-name descname"><span class="pre">WWSSN_SP</span></span><span class="sig-paren">(</span><span class="optional">[</span><em class="sig-param"><span class="n"><span class="pre">type</span> <span class="pre">=</span> <span class="pre">1</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#WWSSN_SP" title="Permalink to this definition"></a></dt>
<dd><p>Analog to the <a class="reference internal" href="#WWSSN_LP" title="WWSSN_LP"><code class="xref py py-func docutils literal notranslate"><span class="pre">WWSSN_LP()</span></code></a>, the simulation filter of the
<a class="reference internal" href="glossary.html#term-WWSSN_SP"><span class="xref std std-term">short-period seismometer of the WWSSN</span></a>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>type</strong> The data type: 0 (displacement), 1 (velocity) or 2 (acceleration)</p>
</dd>
</dl>
</dd></dl>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Filter Grammar</a><ul>
<li><a class="reference internal" href="#example">Example</a></li>
<li><a class="reference internal" href="#test-filter-strings">Test filter strings</a></li>
<li><a class="reference internal" href="#list-of-filters">List of filters</a><ul>
<li><a class="reference internal" href="#AVG"><code class="docutils literal notranslate"><span class="pre">AVG()</span></code></a></li>
<li><a class="reference internal" href="#BPENV"><code class="docutils literal notranslate"><span class="pre">BPENV()</span></code></a></li>
<li><a class="reference internal" href="#BW"><code class="docutils literal notranslate"><span class="pre">BW()</span></code></a></li>
<li><a class="reference internal" href="#BW_BP"><code class="docutils literal notranslate"><span class="pre">BW_BP()</span></code></a></li>
<li><a class="reference internal" href="#BW_BS"><code class="docutils literal notranslate"><span class="pre">BW_BS()</span></code></a></li>
<li><a class="reference internal" href="#BW_HP"><code class="docutils literal notranslate"><span class="pre">BW_HP()</span></code></a></li>
<li><a class="reference internal" href="#BW_HLP"><code class="docutils literal notranslate"><span class="pre">BW_HLP()</span></code></a></li>
<li><a class="reference internal" href="#BW_LP"><code class="docutils literal notranslate"><span class="pre">BW_LP()</span></code></a></li>
<li><a class="reference internal" href="#CUTOFF"><code class="docutils literal notranslate"><span class="pre">CUTOFF()</span></code></a></li>
<li><a class="reference internal" href="#DIFF"><code class="docutils literal notranslate"><span class="pre">DIFF()</span></code></a></li>
<li><a class="reference internal" href="#DT"><code class="docutils literal notranslate"><span class="pre">DT()</span></code></a></li>
<li><a class="reference internal" href="#DURATION"><code class="docutils literal notranslate"><span class="pre">DURATION()</span></code></a></li>
<li><a class="reference internal" href="#INT"><code class="docutils literal notranslate"><span class="pre">INT()</span></code></a></li>
<li><a class="reference internal" href="#ITAPER"><code class="docutils literal notranslate"><span class="pre">ITAPER()</span></code></a></li>
<li><a class="reference internal" href="#MAX"><code class="docutils literal notranslate"><span class="pre">MAX()</span></code></a></li>
<li><a class="reference internal" href="#MEDIAN"><code class="docutils literal notranslate"><span class="pre">MEDIAN()</span></code></a></li>
<li><a class="reference internal" href="#MIN"><code class="docutils literal notranslate"><span class="pre">MIN()</span></code></a></li>
<li><a class="reference internal" href="#RM"><code class="docutils literal notranslate"><span class="pre">RM()</span></code></a></li>
<li><a class="reference internal" href="#RMHP"><code class="docutils literal notranslate"><span class="pre">RMHP()</span></code></a></li>
<li><a class="reference internal" href="#RND"><code class="docutils literal notranslate"><span class="pre">RND()</span></code></a></li>
<li><a class="reference internal" href="#RUD"><code class="docutils literal notranslate"><span class="pre">RUD()</span></code></a></li>
<li><a class="reference internal" href="#self"><code class="docutils literal notranslate"><span class="pre">self()</span></code></a></li>
<li><a class="reference internal" href="#SM5"><code class="docutils literal notranslate"><span class="pre">SM5()</span></code></a></li>
<li><a class="reference internal" href="#SR"><code class="docutils literal notranslate"><span class="pre">SR()</span></code></a></li>
<li><a class="reference internal" href="#STALTA"><code class="docutils literal notranslate"><span class="pre">STALTA()</span></code></a></li>
<li><a class="reference internal" href="#STALTA2"><code class="docutils literal notranslate"><span class="pre">STALTA2()</span></code></a></li>
<li><a class="reference internal" href="#SUM"><code class="docutils literal notranslate"><span class="pre">SUM()</span></code></a></li>
<li><a class="reference internal" href="#WA"><code class="docutils literal notranslate"><span class="pre">WA()</span></code></a></li>
<li><a class="reference internal" href="#WWSSN_LP"><code class="docutils literal notranslate"><span class="pre">WWSSN_LP()</span></code></a></li>
<li><a class="reference internal" href="#WWSSN_SP"><code class="docutils literal notranslate"><span class="pre">WWSSN_SP()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="../apps/scm_ncurses.html"
title="previous chapter">ncurses</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="time-grammar.html"
title="next chapter">Time Formats</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/filter-grammar.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,540 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Getting Started with SeisComP &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="System management" href="management.html" />
<link rel="prev" title="SeisComP Installation" href="installation.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="management.html" title="System management"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="installation.html" title="SeisComP Installation"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="getting-started-with-scname">
<span id="getting-started"></span><h1>Getting Started with <cite>SeisComP</cite><a class="headerlink" href="#getting-started-with-scname" title="Permalink to this heading"></a></h1>
<p>Once the Linux system is installed the <cite>SeisComP</cite> modules need to be configured including
the <a class="reference internal" href="#getting-started-initial"><span class="std std-ref">initial configuration and the connection to the database</span></a>.
The central tool to configure and control the system is <strong class="program">seiscomp</strong> which
is explained more deeply in the <a class="reference internal" href="management.html#system-management"><span class="std std-ref">next chapter</span></a>. A user-friendly
graphical frontend to <strong class="program">seiscomp</strong> is <a class="reference internal" href="../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.</p>
<section id="database-configuration">
<span id="getting-started-initial"></span><h2>Database Configuration<a class="headerlink" href="#database-configuration" title="Permalink to this heading"></a></h2>
<p>Once the database server is defined and optimized as described in the section
<a class="reference internal" href="installation.html#database-configuration"><span class="std std-ref">Database Server Configuration</span></a> you may configure <cite>SeisComP</cite> with the database.
Initially execute the steps listed in this section. You will need to consider
differences in databases:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#getting-started-mysql"><span class="std std-ref">MySQL</span></a> (not recommended),</p></li>
<li><p><a class="reference internal" href="#getting-started-mariadb"><span class="std std-ref">MariaDB</span></a>,</p></li>
<li><p><a class="reference internal" href="#getting-started-postgresql"><span class="std std-ref">PostgreSQL</span></a>.</p></li>
</ul>
<section id="mysql">
<span id="getting-started-mysql"></span><h3>MySQL<a class="headerlink" href="#mysql" title="Permalink to this heading"></a></h3>
<p>The initial configuration by the <strong class="program">seiscomp</strong> script or the
wizard of <a class="reference internal" href="../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> allows to create and configure the MySQL database
for <cite>SeisComP</cite>. If you want to use MySQL continue with the
<a class="reference internal" href="#getting-started-setup"><span class="std std-ref">general setup</span></a>.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<ul>
<li><p>Using MySQL is currently not recommended. Preferably use MariaDB instead of MySQL
as MariaDB is the default SQL flavor of most supported Linux systems!</p></li>
<li><p>As of MySQL 8.0 the password encryption and policy has changed resulting in
errors when connecting to a MySQL server. In 04/2021 this
does not seem to be fully supported in <strong>Ubuntu 20.04</strong>. Therefore, you need
to use a native password on the MySQL server.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>mysql<span class="w"> </span>-u<span class="w"> </span>root<span class="w"> </span>-p
<span class="w"> </span>ALTER<span class="w"> </span>USER<span class="w"> </span><span class="s1">&#39;sysop&#39;</span>@<span class="s1">&#39;%%&#39;</span><span class="w"> </span>IDENTIFIED<span class="w"> </span>WITH<span class="w"> </span>mysql_native_password<span class="w"> </span>BY<span class="w"> </span><span class="s1">&#39;my_super_secret_password_matching_the_mysql_password_validation_policy&#39;</span><span class="p">;</span>
</pre></div>
</div>
</li>
</ul>
</div>
</section>
<section id="mariadb">
<span id="getting-started-mariadb"></span><h3>MariaDB<a class="headerlink" href="#mariadb" title="Permalink to this heading"></a></h3>
<p>The initial configuration by the <strong class="program">seiscomp</strong> script or the
wizard of <a class="reference internal" href="../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> allows to create and configure the MySQL database
for <cite>SeisComP</cite>.</p>
<p>For setting up the database manually with MariaDB follow the instructions
below.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>With <strong>Ubuntu 16.04</strong> MariaDB has become the standard flavor of MySQL in
Ubuntu and either MariaDB or MySQL can be installed. The implementation
of MariaDB in Ubuntu requires additional steps. They must be taken
<strong>before</strong> the initial configuration in order to allow <cite>SeisComP</cite> to make
use of MariaDB. Previously, the <a class="reference internal" href="../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> wizard and
<strong class="command">seiscomp setup</strong> could not be used to set up the MariaDB database.
<strong>The option “Create database” had to be unchecked or answered with “no”</strong>.
The issue is resolved in this release and both, <a class="reference internal" href="../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> wizard and
<strong class="command">seiscomp setup</strong> are now fully capable of the required actions.</p>
</div>
<p>The full procedure to create the seiscomp database:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>sudo<span class="w"> </span>mysql<span class="w"> </span>-u<span class="w"> </span>root<span class="w"> </span>-p
<span class="w"> </span>CREATE<span class="w"> </span>DATABASE<span class="w"> </span>seiscomp<span class="w"> </span>CHARACTER<span class="w"> </span>SET<span class="w"> </span>utf8mb4<span class="p">;</span>
<span class="w"> </span>grant<span class="w"> </span>usage<span class="w"> </span>on<span class="w"> </span>seiscomp.*<span class="w"> </span>to<span class="w"> </span>sysop@localhost<span class="w"> </span>identified<span class="w"> </span>by<span class="w"> </span><span class="s1">&#39;sysop&#39;</span><span class="p">;</span>
<span class="w"> </span>grant<span class="w"> </span>all<span class="w"> </span>privileges<span class="w"> </span>on<span class="w"> </span>seiscomp.*<span class="w"> </span>to<span class="w"> </span>sysop@localhost<span class="p">;</span>
<span class="w"> </span>grant<span class="w"> </span>usage<span class="w"> </span>on<span class="w"> </span>seiscomp.*<span class="w"> </span>to<span class="w"> </span>sysop@<span class="s1">&#39;%&#39;</span><span class="w"> </span>identified<span class="w"> </span>by<span class="w"> </span><span class="s1">&#39;sysop&#39;</span><span class="p">;</span>
<span class="w"> </span>grant<span class="w"> </span>all<span class="w"> </span>privileges<span class="w"> </span>on<span class="w"> </span>seiscomp.*<span class="w"> </span>to<span class="w"> </span>sysop@<span class="s1">&#39;%&#39;</span><span class="p">;</span>
<span class="w"> </span>flush<span class="w"> </span>privileges<span class="p">;</span>
<span class="w"> </span>quit
user@host:~$<span class="w"> </span>mysql<span class="w"> </span>-u<span class="w"> </span>sysop<span class="w"> </span>-p<span class="w"> </span>seiscomp<span class="w"> </span>&lt;<span class="w"> </span>~/seiscomp/share/db/mysql.sql
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If character set utf8mb4 is not supported by your specific database server
version then use the old utf8 format. For historical reasons, SeisComP
would use then the utf8_bin collation. The full statement looks as
follows: <code class="code docutils literal notranslate"><span class="pre">CREATE</span> <span class="pre">DATABASE</span> <span class="pre">seiscomp</span> <span class="pre">CHARACTER</span> <span class="pre">SET</span> <span class="pre">utf8</span> <span class="pre">COLLATE</span> <span class="pre">utf8_bin</span></code>.</p>
</div>
</section>
<section id="postgresql">
<span id="getting-started-postgresql"></span><h3>PostgreSQL<a class="headerlink" href="#postgresql" title="Permalink to this heading"></a></h3>
<p>The initial configuration allows configuring the PostgreSQL database parameters
for <cite>SeisComP</cite>.
It also allows <a class="reference internal" href="installation.html#database-configuration-postgresql"><span class="std std-ref">creating the database</span></a>
and the database tables.</p>
<p>For a manual setup of the PostgreSQL database first <a class="reference internal" href="installation.html#database-configuration-postgresql"><span class="std std-ref">setup the database
server</span></a>, then create the user, the database
and the tables.</p>
<ol class="arabic">
<li><p>Create the user and the database</p>
<p><strong class="program">CentOS</strong>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo@host:~$<span class="w"> </span>sudo<span class="w"> </span>su
root@host:~$<span class="w"> </span>sudo<span class="w"> </span>-i<span class="w"> </span>-u<span class="w"> </span>postgres
postgres@host:~$<span class="w"> </span>psql
<span class="w"> </span><span class="nv">postgres</span><span class="o">=</span><span class="c1"># create database seiscomp;</span>
<span class="w"> </span><span class="nv">postgres</span><span class="o">=</span><span class="c1"># create user sysop with encrypted password &#39;sysop&#39;;</span>
<span class="w"> </span><span class="nv">postgres</span><span class="o">=</span><span class="c1"># grant all privileges on database seiscomp to sysop;</span>
<span class="w"> </span><span class="nv">postgres</span><span class="o">=</span><span class="c1"># alter database seiscomp owner to sysop;</span>
<span class="w"> </span><span class="nv">postgres</span><span class="o">=</span><span class="c1"># exit</span>
root@host:~$<span class="w"> </span><span class="nb">exit</span>
</pre></div>
</div>
</li>
<li><p>Create the database tables</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>psql<span class="w"> </span>-f<span class="w"> </span>~/seiscomp/share/db/postgres.sql<span class="w"> </span>-t<span class="w"> </span>seiscomp<span class="w"> </span>-U<span class="w"> </span>sysop
</pre></div>
</div>
</li>
</ol>
<p>Continue with the <a class="reference internal" href="#getting-started-setup"><span class="std std-ref">general setup</span></a> considering the
created database but <strong>do not create the database again</strong>.</p>
</section>
</section>
<section id="general-scname-setup">
<span id="getting-started-setup"></span><h2>General <cite>SeisComP</cite> Setup<a class="headerlink" href="#general-scname-setup" title="Permalink to this heading"></a></h2>
<p>Use <strong class="command">seiscomp setup</strong> or the wizard from within <a class="reference internal" href="../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> (<kbd class="kbd compound docutils literal notranslate"><kbd class="kbd docutils literal notranslate">Ctrl</kbd>+<kbd class="kbd docutils literal notranslate">N</kbd></kbd>) for the
initial configuration including the database parameters. <strong class="command">seiscomp setup</strong> is the
successor of the former <strong class="program">./setup</strong> script.</p>
<p>In <strong class="command">seiscomp setup</strong> default values are given in brackets []:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>user@host:~$ seiscomp/bin/seiscomp setup
====================================================================
seiscomp setup
====================================================================
This initializes the configuration of your installation.
If you already made adjustments to the configuration files
be warned that this setup will overwrite existing parameters
with default values. This is not a configurator for all
options of your setup but helps to setup initial standard values.
--------------------------------------------------------------------
Hint: Entered values starting with a dot (.) are handled
as commands. Available commands are:
quit: Quit setup without modification to your configuration.
back: Go back to the previous parameter.
help: Show help about the current parameter (if available).
If you need to enter a value with a leading dot, escape it
with backslash, e.g. &quot;\.value&quot;.
--------------------------------------------------------------------
</pre></div>
</div>
<p>This will ask for initial settings as database (if package trunk is installed)
parameters and the logging backend.</p>
<hr class="docutils" />
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Organization name []:
</pre></div>
</div>
<p>Sets the organisation name printed e.g. when you say <em>hello</em> to Seedlink
or Arclink.</p>
<hr class="docutils" />
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Enable database storage [yes]:
</pre></div>
</div>
<p>Enables or disables the database for the system. This option should be left
enabled unless all modules should connect to remote processing machine which
is already available. The database is required to store inventory information
as well as processing results. The database is the central storage for all
trunk modules and the default request handler of Arclink.</p>
<hr class="docutils" />
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> 0) mysql
MySQL server.
1) postgresql
PostgreSQL server. There is currently no support in setup to create the
database for you. You have to setup the database and user accounts on
your own. The database schema is installed under share/db/postgresql.sql.
Database backend [0]:
</pre></div>
</div>
<p>If the database is enable the database backend can be selected. <cite>SeisComP</cite>
supports two main backends: MySQL and PostgreSQL. Select the backend to be used
here but be prepared that only for the MySQL backend the setup can help to
create the database and tables for you. If you are using PostgreSQL you have
to provide a working database with the correct schema. The schema files are
part of the distribution and can be found in <code class="file docutils literal notranslate"><span class="pre">seiscomp/share/db/postgresql.sql</span></code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>As of PostgreSQL version 9 the default output encoding has changed to hex.
In order to fix issues with seiscomp log in to your database and run the
following command.</p>
<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="k">ALTER</span><span class="w"> </span><span class="k">DATABASE</span><span class="w"> </span><span class="n">seiscomp</span><span class="w"> </span><span class="k">SET</span><span class="w"> </span><span class="n">bytea_output</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="s1">&#39;escape&#39;</span><span class="p">;</span>
</pre></div>
</div>
</div>
<hr class="docutils" />
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Create database [yes]:
</pre></div>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>If MySQL is selected it is possible to let <strong class="command">seiscomp setup</strong> to create
the database and all tables for you. Otherwise currently not and you need to set up the
database manually following the <a class="reference internal" href="#getting-started-mysql"><span class="std std-ref">given instructions</span></a>.
If the database has been created already, answer no here.</p>
</div>
<hr class="docutils" />
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>MYSQL root password (input not echoed) []:
</pre></div>
</div>
<p>Give the MySQL root password for your database server to create the database
tables. This is only required if the last question has been answered with yes.</p>
<hr class="docutils" />
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Drop existing database [no]:
</pre></div>
</div>
<p>If a database with the same name (to be selected later) exists already and the
database should be created for you, an error is raised. To delete an existing
database with the same name, say yes here.</p>
<hr class="docutils" />
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Database name [seiscomp]:
Database hostname [localhost]:
Database read-write user [sysop]:
Database read-write password [sysop]:
Database public hostname [localhost]:
Database read-only user [sysop]:
Database read-only password [sysop]:
</pre></div>
</div>
<p>Setup the various database options valid for all database backends. Give
<strong class="command">help</strong> for more information.</p>
<hr class="docutils" />
<p>If all question have been answered the final choice needs to be made to either
create the initial configuration, go back to the last question or to quit
without doing anything.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Finished setup
--------------
P) Proceed to apply configuration
B) Back to last parameter
Q) Quit without changes
Command? [P]:
</pre></div>
</div>
</section>
<section id="environment-variables">
<h2>Environment variables<a class="headerlink" href="#environment-variables" title="Permalink to this heading"></a></h2>
<p>Commands can be used along with the <strong class="program">seiscomp</strong> script located in <em>seiscomp/bin/seiscomp</em>.
Read the section <a class="reference internal" href="management.html#sec-management-commands"><span class="std std-ref">seiscomp Commands</span></a> for more details on <strong class="program">seiscomp</strong>.
E.g. <cite>SeisComP</cite> modules can be executed like</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>user@host:~$ seiscomp/bin/seiscomp exec scrttv
</pre></div>
</div>
<p>Calling <strong class="program">seiscomp</strong> with its full path, e.g.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>seiscomp/bin/seiscomp<span class="w"> </span><span class="o">[</span>command<span class="o">]</span>
</pre></div>
</div>
<p>will load the full <cite>SeisComP</cite> environment.
Providing the full path allows starting other <cite>SeisComP</cite> modules in a specific
<cite>SeisComP</cite> environment. Thus, multiple SeisComP installations can be maintained
and referred to on the same machine.</p>
<p><strong class="program">seiscomp</strong> can also be used for printing the considered <cite>SeisComP</cite> environment</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>user@host:~$ seiscomp/bin/seiscomp print env
</pre></div>
</div>
<p>resulting in</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">SEISCOMP_ROOT</span><span class="o">=</span><span class="s2">&quot;/home/sysop/seiscomp&quot;</span>
<span class="n">export</span> <span class="n">PATH</span><span class="o">=</span><span class="s2">&quot;/home/sysop/seiscomp/bin:$PATH&quot;</span>
<span class="n">export</span> <span class="n">LD_LIBRARY_PATH</span><span class="o">=</span><span class="s2">&quot;/home/sysop/seiscomp/lib:$LD_LIBRARY_PATH&quot;</span>
<span class="n">export</span> <span class="n">PYTHONPATH</span><span class="o">=</span><span class="s2">&quot;/home/sysop/seiscomp/lib/python:$PYTHONPATH&quot;</span>
<span class="n">export</span> <span class="n">MANPATH</span><span class="o">=</span><span class="s2">&quot;/home/sysop/seiscomp/share/man:$MANPATH&quot;</span>
<span class="n">source</span> <span class="s2">&quot;/home/sysop/seiscomp/share/shell-completion/seiscomp.bash&quot;</span>
</pre></div>
</div>
<p>For convenience, the default <cite>SeisComP</cite> installation can be referred to, when defining
the required system variables, e.g. in <code class="file docutils literal notranslate"><span class="pre">~/.bashrc</span></code>. Then, the <cite>SeisComP</cite> environment
is known to the logged in user and <cite>SeisComP</cite> modules can be
executed without the <strong class="program">seiscomp</strong> script.</p>
<p>For setting the environment</p>
<ol class="arabic">
<li><p>Use the <strong class="program">seiscomp</strong> script itself to generate the parameters and write
the parameters to <code class="file docutils literal notranslate"><span class="pre">~/.bashrc</span></code></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>user@host:~$ seiscomp/bin/seiscomp print env &gt;&gt; ~/.bashrc
</pre></div>
</div>
</li>
<li><p>Load the environment or log out and in again</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>user@host:~$ source ~/.bashrc
</pre></div>
</div>
</li>
</ol>
<p>Thereafter, modules can be executed by their names without involving <strong class="program">seiscomp</strong>,
e.g.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>user@host:~$ scrttv
</pre></div>
</div>
</section>
<section id="activate-enable-modules">
<h2>Activate/Enable Modules<a class="headerlink" href="#activate-enable-modules" title="Permalink to this heading"></a></h2>
<p>After the installation all module are disabled for auto start. If <strong class="command">seiscomp start</strong>
is called, nothing will happen until modules are enabled. To enable a set of modules,
<strong class="command">seiscomp enable</strong> needs to be called with a list of modules.
For example, for a processing system with SeedLink for data acquisition,
you may use:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>seiscomp/bin/seiscomp<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>seedlink<span class="w"> </span>slarchive<span class="w"> </span>scautopick<span class="w"> </span>scautoloc<span class="w"> </span>scamp<span class="w"> </span>scmag<span class="w"> </span>scevent
enabled<span class="w"> </span>seedlink
enabled<span class="w"> </span>slarchive
enabled<span class="w"> </span>scautopick
enabled<span class="w"> </span>scautoloc
enabled<span class="w"> </span>scamp
enabled<span class="w"> </span>scmag
enabled<span class="w"> </span>scevent
</pre></div>
</div>
<p>A successive call of <strong class="command">seiscomp start</strong> will then start all enabled
modules. This is also required to restart enabled modules with <strong class="command">seiscomp check</strong>.</p>
<p>Alternatively, <a class="reference internal" href="../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> can be used to enable/disable
and to start/stop/restart modules.</p>
<p>However, before starting seiscomp, station information (metadata) need to
be provided and the configuration needs to be updated.</p>
</section>
<section id="supply-station-metadata">
<h2>Supply Station Metadata<a class="headerlink" href="#supply-station-metadata" title="Permalink to this heading"></a></h2>
<p><cite>SeisComP</cite> requires the metadata from seismic network and stations including full responses
for data acquisition
and processing. The metadata can be obtained from network operators or
various other sources in different formats. The metadata include, e.g.:</p>
<ul class="simple">
<li><p>Network association</p></li>
<li><p>Operation times</p></li>
<li><p>Location</p></li>
<li><p>Sensor and data logger specifications with full response information</p></li>
<li><p>Data stream specifications</p></li>
</ul>
<p><cite>SeisComP</cite> comes with various importers to add metadata
for networks and stations including full response information.</p>
<p><a class="reference internal" href="../apps/import_inv.html#import-inv"><span class="std std-ref">import_inv</span></a> is the tool to import inventory data into <cite>SeisComP</cite>.
Alternatively can be used.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>seiscomp/bin/seiscomp<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>import_inv<span class="w"> </span>dlsv<span class="w"> </span>inventory.dataless
</pre></div>
</div>
<p>This will import a dataless SEED volume into <cite>etc/inventory/inventory.dataless.xml</cite>.</p>
<p>Repeat this step for all inventory data you want to import.</p>
</section>
<section id="configure-station-bindings">
<h2>Configure Station Bindings<a class="headerlink" href="#configure-station-bindings" title="Permalink to this heading"></a></h2>
<p>The configuration of modules and bindings is explained in <a class="reference internal" href="../apps/global.html#global"><span class="std std-ref">Global parameters</span></a>. To
add bindings in a more convenient way, start <a class="reference internal" href="../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>seiscomp/bin/seiscomp<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>scconfig
</pre></div>
</div>
<p>Typical binding profiles or station bindings involve bindings configurations for
data acquisition and processing modules:</p>
<ul class="simple">
<li><p><a class="reference internal" href="../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a>: Configure the plugin for the real-time data acquisition.</p></li>
<li><p><a class="reference internal" href="../apps/slarchive.html#slarchive"><span class="std std-ref">slarchive</span></a>: Configure the data archiving.</p></li>
<li><p><a class="reference internal" href="../apps/global.html#global"><span class="std std-ref">global</span></a>: Configure <a class="reference internal" href="../apps/global.html#confval-detecStream"><code class="xref std std-confval docutils literal notranslate"><span class="pre">detecStream</span></code></a> and <a class="reference internal" href="../apps/global.html#confval-detecLocid"><code class="xref std std-confval docutils literal notranslate"><span class="pre">detecLocid</span></code></a> to determine the
default streams for phase detection and for showing stations and streams in GUIs
like <a class="reference internal" href="../apps/scmv.html#scmv"><span class="std std-ref">scmv</span></a>, <a class="reference internal" href="../apps/scrttv.html#scrttv"><span class="std std-ref">scrttv</span></a> or <a class="reference internal" href="../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a>.</p></li>
<li><p><a class="reference internal" href="../apps/scautopick.html#scautopick"><span class="std std-ref">scautopick</span></a>: Configure the automatic phase detection. You may overwrite global
binding parameters.</p></li>
</ul>
</section>
<section id="update-configuration-start-everything">
<h2>Update Configuration, Start Everything<a class="headerlink" href="#update-configuration-start-everything" title="Permalink to this heading"></a></h2>
<p>To update the configuration when new stations have been added or modified,
<strong class="command">seiscomp update-config</strong> needs to be run. This creates configuration
files of modules that do not use the configuration directly, writes the trunk
bindings to the database and synchronizes the inventory with the database.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>seiscomp/bin/seiscomp<span class="w"> </span>update-config
<span class="o">[</span>output<span class="o">]</span>
</pre></div>
</div>
<p>After the configuration has been updated and the inventory has been synchronized,
call <strong class="command">seiscomp start</strong> to start all enabled modules:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>seiscomp/bin/seiscomp<span class="w"> </span>start
starting<span class="w"> </span>seedlink
starting<span class="w"> </span>slarchive
starting<span class="w"> </span>scautopick
starting<span class="w"> </span>scautoloc
starting<span class="w"> </span>scamp
starting<span class="w"> </span>scmag
starting<span class="w"> </span>scevent
</pre></div>
</div>
<p>Now the system should run. To check everything again, <strong class="command">seiscomp check</strong>
can be run which should print <em>is running</em> for all started modules.
If everything is working, the analysis tools can be started, e.g. MapView.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>seiscomp/bin/seiscomp<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>scmv
</pre></div>
</div>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Getting Started with <cite>SeisComP</cite></a><ul>
<li><a class="reference internal" href="#database-configuration">Database Configuration</a><ul>
<li><a class="reference internal" href="#mysql">MySQL</a></li>
<li><a class="reference internal" href="#mariadb">MariaDB</a></li>
<li><a class="reference internal" href="#postgresql">PostgreSQL</a></li>
</ul>
</li>
<li><a class="reference internal" href="#general-scname-setup">General <cite>SeisComP</cite> Setup</a></li>
<li><a class="reference internal" href="#environment-variables">Environment variables</a></li>
<li><a class="reference internal" href="#activate-enable-modules">Activate/Enable Modules</a></li>
<li><a class="reference internal" href="#supply-station-metadata">Supply Station Metadata</a></li>
<li><a class="reference internal" href="#configure-station-bindings">Configure Station Bindings</a></li>
<li><a class="reference internal" href="#update-configuration-start-everything">Update Configuration, Start Everything</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="installation.html"
title="previous chapter"><cite>SeisComP</cite> Installation</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="management.html"
title="next chapter">System management</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/getting-started.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,241 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Historical Information &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Concepts" href="concepts.html" />
<link rel="prev" title="Overview" href="overview.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="concepts.html" title="Concepts"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="overview.html" title="Overview"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="historical-information">
<span id="history"></span><h1>Historical Information<a class="headerlink" href="#historical-information" title="Permalink to this heading"></a></h1>
<p>The first version of SeisComP was developed for the
<a class="reference internal" href="glossary.html#term-GEOFON"><span class="xref std std-term">GEOFON</span></a> program operated by <a class="reference internal" href="glossary.html#term-GFZ"><span class="xref std std-term">GFZ</span></a>.</p>
<p>Originally, <cite>SeisComP</cite> was designed as a high-standard, fully automatic data
acquisition and (near-)real-time data processing tool including quality control,
event detection and location as well as dissemination of event alerts.</p>
<p>SeisComP was further extended within the MEREDIAN project under the lead of
GEOFON and <span id="id1"><em>Orfeus</em> [<a class="reference internal" href="references.html#id178" title="Orfeus. Observatories &amp; Research Facilities for European Seismology. URL: https://www.orfeus-eu.org/.">19</a>]</span>.</p>
<p>Following the devastating 2004 Indian Ocean earthquake and tsunami, the
<span id="id2"><em>GITEWS</em> [<a class="reference internal" href="references.html#id126" title="GITEWS. German-Indonesian Tsunami Early Warning System for the Indian Ocean. URL: https://www.gitews.org/en/homepage/.">10</a>]</span> (German Indian Ocean Tsunami Early Warning System) project led
to additional functionality being implemented to fulfill the requirements of
24/7 early warning control centers. Major changes in the architecture of SeisComP
were necessary and many new features resulted in the upgrade of SeisComP to
version 3.</p>
<p>Since 2008 SeisComP has been jointly developed by <a class="reference internal" href="glossary.html#term-gempa-GmbH"><span class="xref std std-term">gempa GmbH</span></a>, a spin-off
company of GFZ and GFZ. Nowadays, gempa GmbH is the main SeisComP developing and
service company.</p>
<p>Major SeisComP releases are shown below. The important changes as of version 4.0
are documented in the <a class="reference internal" href="changelog.html#sc-changelog"><span class="std std-ref">changelog</span></a>.</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Version</p></th>
<th class="head"><p>Name</p></th>
<th class="head"><p>Time</p></th>
<th class="head"></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>1.0</p></td>
<td></td>
<td><p>February 2001</p></td>
<td><p>SeedLink 2.0 (plugin interface) Plugins for
EarthData PS2400 and Lennartz M24</p></td>
</tr>
<tr class="row-odd"><td><p>1.1</p></td>
<td></td>
<td><p>August 2001</p></td>
<td><p>SeedLink 2.1 (streams.xml, improved buffer
structure); make conf/make key scripts LISS
plugin, SeedLink-Antelope connectivity</p></td>
</tr>
<tr class="row-even"><td><p>1.1.5</p></td>
<td></td>
<td><p>January 2002</p></td>
<td><p>SeedLink 2.5 (multi-station mode)</p></td>
</tr>
<tr class="row-odd"><td><p>1.16</p></td>
<td></td>
<td><p>March 2002</p></td>
<td><p>GIF live seismograms</p></td>
</tr>
<tr class="row-even"><td><p>2.0</p></td>
<td></td>
<td><p>October 2003</p></td>
<td><p>SeedLink 3.0 (INFO request, time window extraction)
libslink, chain plugin, Comserv-independence</p></td>
</tr>
<tr class="row-odd"><td><p>2.1</p></td>
<td></td>
<td><p>June 2004</p></td>
<td><p>Python add-on package (SeisPy) incl. AutoLoc2 chain
plugin extension interface, triggered streams</p></td>
</tr>
<tr class="row-even"><td><p>2.5</p></td>
<td></td>
<td><p>March 2006</p></td>
<td><p>Integration of add-on packages, modular config
script</p></td>
</tr>
<tr class="row-odd"><td><p>3.0</p></td>
<td><p>alpha</p></td>
<td><p>May 2007</p></td>
<td><p>new architecture, new magnitude types, GUI</p></td>
</tr>
<tr class="row-even"><td><p>3.0</p></td>
<td><p>Barcelona</p></td>
<td><p>May 2008</p></td>
<td><p>Stability and performance improvements, improved
GUI functionality</p></td>
</tr>
<tr class="row-odd"><td><p>3.0</p></td>
<td><p>Erice</p></td>
<td><p>May 2009</p></td>
<td><p>New Earthquake Schema and performance improvements,
improved GUI functionality</p></td>
</tr>
<tr class="row-even"><td><p>3.0</p></td>
<td><p>Potsdam</p></td>
<td><p>September 2010</p></td>
<td><p>New Inventory Schema and performance improvements,
improved GUI functionality</p></td>
</tr>
<tr class="row-odd"><td><p>3.0</p></td>
<td><p>Seattle</p></td>
<td><p>2012</p></td>
<td><p>New user friendly configuration GUI scconfig</p></td>
</tr>
<tr class="row-even"><td><p>3.0</p></td>
<td><p>Jakarta</p></td>
<td><p>2014</p></td>
<td><p>Completely Open Source, including all GUIs</p></td>
</tr>
<tr class="row-odd"><td><p>4.0.0</p></td>
<td></td>
<td><p>May 2020</p></td>
<td><p>Adopts the GNU Affero General Public License v. 3.0,
(AGPL), support for Python3 and QT5</p></td>
</tr>
</tbody>
</table>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="overview.html"
title="previous chapter">Overview</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="concepts.html"
title="next chapter">Concepts</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/history.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,577 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>SeisComP Installation &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Getting Started with SeisComP" href="getting-started.html" />
<link rel="prev" title="Change Log" href="changelog.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="getting-started.html" title="Getting Started with SeisComP"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="changelog.html" title="Change Log"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="scname-installation">
<span id="installation"></span><h1><cite>SeisComP</cite> Installation<a class="headerlink" href="#scname-installation" title="Permalink to this heading"></a></h1>
<p><cite>SeisComP</cite> requires a modern Linux operating system as it is developed and tested
only under Linux. For production systems we recommend Linux distributions with
long-term support (LTS). The Linux flavors under which <cite>SeisComP</cite> has been tested
are given along with the <cite>SeisComP</cite> package names on the download sites of
<span id="id1">Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH [<a class="reference internal" href="references.html#id257" title="Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH. The SeisComP seismological software package. GFZ Data Services. 2008. URL: https://www.seiscomp.de, doi:10.5880/GFZ.2.4.2020.003.">67</a>]</span> and <span id="id2"><em>gempa GmbH</em> [<a class="reference internal" href="references.html#id122" title="gempa GmbH. The SeisComP development and maintenance company. URL: https://www.gempa.de/.">28</a>]</span>.</p>
<p>The software can be obtained and installed from</p>
<ul class="simple">
<li><p>Officially released packages (TAR files) for different release versions,
Linux systems and architectures,</p></li>
<li><p><a class="reference internal" href="build.html#build"><span class="std std-ref">Source code available on GitHub</span></a>.</p></li>
</ul>
<p>Packages may include</p>
<ul class="simple">
<li><p>Software for data acquisition, processing and <a class="reference internal" href="glossary.html#term-GUI"><span class="xref std std-term">GUIs</span></a> for each
supported platform,</p></li>
<li><p>Maps. Maps from the <cite>SeisComP</cite> releases Seattle and Zurich also work
in later releases</p></li>
<li><p>Documentation,</p></li>
<li><p>Station configuration files (optional).</p></li>
</ul>
<p>Download these packages from <span id="id3">Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH [<a class="reference internal" href="references.html#id257" title="Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH. The SeisComP seismological software package. GFZ Data Services. 2008. URL: https://www.seiscomp.de, doi:10.5880/GFZ.2.4.2020.003.">67</a>]</span> or <span id="id4"><em>Public download site of gempa</em> [<a class="reference internal" href="references.html#id124" title="Public download site of gempa. URL: https://data.gempa.de/packages/Public/seiscomp/.">20</a>]</span>.</p>
<p>The next sections describe the installation of the binary packages of <cite>SeisComP</cite>
on</p>
<ul class="simple">
<li><p><strong class="program">Ubuntu 18</strong>, 64 bit system,</p></li>
<li><p><strong class="program">CentOS 7</strong>, 64 bit system.</p></li>
</ul>
<section id="hardware-requirements">
<h2>Hardware Requirements<a class="headerlink" href="#hardware-requirements" title="Permalink to this heading"></a></h2>
<p>The hardware requirements for a seismic system depend on the size of the
station network to be operated.</p>
<p>Minimum requirements are:</p>
<table class="docutils align-left">
<colgroup>
<col style="width: 10.0%" />
<col style="width: 90.0%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>CPU</p></td>
<td><p>2</p></td>
</tr>
<tr class="row-even"><td><p>RAM</p></td>
<td><p>4 GB</p></td>
</tr>
<tr class="row-odd"><td><p>HDD</p></td>
<td><p>20 GB</p></td>
</tr>
<tr class="row-even"><td><p>OS</p></td>
<td><p>Ubuntu last 3 major LTS versions, 64bit, Debian 8.0 64bit, RHEL 7, CentOS 7 64bit</p></td>
</tr>
</tbody>
</table>
<p>In case large networks (&gt;100 stations) are operated, a distributed system is
recommended. Normally a <cite>SeisComP</cite> system is separated in several subsystems.
A separation of data acquisition, processing and graphical user interfaces (GUI) is
useful to permit stable performance.</p>
<p>The minimum specifications of <cite>SeisComP</cite> systems depend on the setup and the
applications.</p>
<p>Data acquisition systems:</p>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>CPU</p></td>
<td><p>2</p></td>
</tr>
<tr class="row-even"><td><p>RAM</p></td>
<td><p>4 GB</p></td>
</tr>
<tr class="row-odd"><td><p>HDD</p></td>
<td><p>Raid1/5/0+1 with &gt;= 200GB</p></td>
</tr>
</tbody>
</table>
<p>Processing systems:</p>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>CPU</p></td>
<td><p>4</p></td>
</tr>
<tr class="row-even"><td><p>RAM</p></td>
<td><p>8 GB</p></td>
</tr>
<tr class="row-odd"><td><p>HDD</p></td>
<td><p>Raid1/5/0+1 with &gt;= 100GB</p></td>
</tr>
</tbody>
</table>
<p>GUI system:</p>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>CPU</p></td>
<td><p>2</p></td>
</tr>
<tr class="row-even"><td><p>RAM</p></td>
<td><p>4 GB</p></td>
</tr>
<tr class="row-odd"><td><p>HDD</p></td>
<td><p>&gt; 50 GB</p></td>
</tr>
</tbody>
</table>
</section>
<section id="installation-from-packages">
<span id="installation-packages"></span><h2>Installation from Packages<a class="headerlink" href="#installation-from-packages" title="Permalink to this heading"></a></h2>
<p>This section describes the installation of <cite>SeisComP</cite> from compiled <cite>SeisComP</cite>
packages which ship as <code class="file docutils literal notranslate"><span class="pre">*.tar.gz</span></code> files.</p>
<section id="steps-to-take">
<h3>Steps to take<a class="headerlink" href="#steps-to-take" title="Permalink to this heading"></a></h3>
<p>Simply follow a few steps to complete your installation of <cite>SeisComP</cite>:</p>
<ol class="arabic">
<li><p>Log in to your Linux system as user, e.g. sysop, the standard user in this
documentation.</p></li>
<li><p>Download the installation packages, e.g. from <span id="id5">Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH [<a class="reference internal" href="references.html#id257" title="Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH. The SeisComP seismological software package. GFZ Data Services. 2008. URL: https://www.seiscomp.de, doi:10.5880/GFZ.2.4.2020.003.">67</a>]</span> or
<span id="id6"><em>Public download site of gempa</em> [<a class="reference internal" href="references.html#id124" title="Public download site of gempa. URL: https://data.gempa.de/packages/Public/seiscomp/.">20</a>]</span>:</p>
<ul>
<li><p><code class="file docutils literal notranslate"><span class="pre">seiscomp-[version]-[OS]-[arch].tar.gz</span></code>: main <cite>SeisComP</cite> package with binaries, etc.
Ensure to download the right package matching your operating system (OS) and
hardware architecture (arch: 32 or 64-bit).</p></li>
<li><p><code class="file docutils literal notranslate"><span class="pre">seiscomp-[version]-doc.tar.gz</span></code>: <cite>SeisComP</cite> documentation.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>When receiving the packages from <span id="id7"><em>Public download site of gempa</em> [<a class="reference internal" href="references.html#id124" title="Public download site of gempa. URL: https://data.gempa.de/packages/Public/seiscomp/.">20</a>]</span>, the documentation is already
included in the main <cite>SeisComP</cite> package to match the installed version. In this
case, the documentation does not need to be downloaded and installed separately.</p>
</div>
</li>
<li><p><code class="file docutils literal notranslate"><span class="pre">seiscomp-maps.tar.gz</span></code>: standard <cite>SeisComP</cite> maps available on the
download site of <span id="id8">Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH [<a class="reference internal" href="references.html#id257" title="Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH. The SeisComP seismological software package. GFZ Data Services. 2008. URL: https://www.seiscomp.de, doi:10.5880/GFZ.2.4.2020.003.">67</a>]</span>.</p></li>
</ul>
</li>
<li><p>Copy the downloaded files to your $HOME directory.</p></li>
<li><p>Navigate to the $HOME directory or any other place where to install <cite>SeisComP</cite></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:$<span class="w"> </span><span class="nb">cd</span>
</pre></div>
</div>
</li>
<li><p>Install the main <cite>SeisComP</cite> package into <code class="file docutils literal notranslate"><span class="pre">seiscomp</span></code></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>tar<span class="w"> </span>xzf<span class="w"> </span>seiscomp-<span class="o">[</span>version<span class="o">]</span>-<span class="o">[</span>OS<span class="o">]</span>-<span class="o">[</span>arch<span class="o">]</span>.tar.gz
</pre></div>
</div>
</li>
<li><p>Install the <cite>SeisComP</cite> map package into <code class="file docutils literal notranslate"><span class="pre">seiscomp/share/maps</span></code></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>tar<span class="w"> </span>xzf<span class="w"> </span>seiscomp-<span class="o">[</span>release<span class="o">]</span>-maps.tar.gz
</pre></div>
</div>
</li>
<li><p>Optional: Install the documentation package into <code class="file docutils literal notranslate"><span class="pre">seiscomp/share/doc</span></code></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>tar<span class="w"> </span>xzf<span class="w"> </span>seiscomp-<span class="o">[</span>version<span class="o">]</span>-doc.tar.gz
</pre></div>
</div>
</li>
</ol>
<p>Unpacking these files creates the <cite>SeisComP</cite> <a class="reference internal" href="#directory-structure"><span class="std std-ref">directory structure</span></a>.</p>
</section>
<section id="directory-structure">
<span id="id9"></span><h3>Directory structure<a class="headerlink" href="#directory-structure" title="Permalink to this heading"></a></h3>
<p>All installed files and directories are found below the <em>seiscomp</em> directory.
The directory structure of the installed system is described the table below.</p>
<table class="docutils align-left">
<colgroup>
<col style="width: 10.0%" />
<col style="width: 90.0%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Directory</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><em>bin</em></p></td>
<td><p>The user module binaries.</p></td>
</tr>
<tr class="row-odd"><td><p><em>lib</em></p></td>
<td><p>The base library directory used by all modules.</p></td>
</tr>
<tr class="row-even"><td><p><em>lib/python</em></p></td>
<td><p>The Python library directory.</p></td>
</tr>
<tr class="row-odd"><td><p><em>man</em></p></td>
<td><p>The manual pages.</p></td>
</tr>
<tr class="row-even"><td><p><em>sbin</em></p></td>
<td><p>The system/service/server binaries such as <a class="reference internal" href="../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><em>var</em></p></td>
<td><p>Variable files whose content is expected to continually change.</p></td>
</tr>
<tr class="row-even"><td><p><em>var/log</em></p></td>
<td><p>Log files of started modules. Usually modules log either to syslog or ~/.seiscomp/log. This directory contains the logs of the start of each module.</p></td>
</tr>
<tr class="row-odd"><td><p><em>var/lib</em></p></td>
<td><p>Default directory for files created by modules such as the waveform ringbuffer of <a class="reference internal" href="../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a> or the waveform archive created by <a class="reference internal" href="../apps/slarchive.html#slarchive"><span class="std std-ref">slarchive</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><em>var/run</em></p></td>
<td><p>Contains the .run and .pid files of modules started by <strong class="program">seiscomp</strong>.</p></td>
</tr>
<tr class="row-odd"><td><p><em>include</em></p></td>
<td><p>SDK header files for all libraries.</p></td>
</tr>
<tr class="row-even"><td><p><em>share</em></p></td>
<td><p>Application data such as maps, cities.xml and others.</p></td>
</tr>
<tr class="row-odd"><td><p><em>share/templates</em></p></td>
<td><p>Template files used by e.g. <a class="reference internal" href="../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a> to create its native configuration.</p></td>
</tr>
<tr class="row-even"><td><p><em>etc</em></p></td>
<td><p>Configuration directory.</p></td>
</tr>
<tr class="row-odd"><td><p><em>etc/descriptions</em></p></td>
<td><p>Contains all XML module descriptions.</p></td>
</tr>
<tr class="row-even"><td><p><em>etc/defaults</em></p></td>
<td><p>The default configuration files. This directory is read as first when a module starts.</p></td>
</tr>
<tr class="row-odd"><td><p><em>etc/init</em></p></td>
<td><p>Module init scripts called by <strong class="program">seiscomp</strong>.</p></td>
</tr>
<tr class="row-even"><td><p><em>etc/key</em></p></td>
<td><p>Station configurations and module bindings.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="software-dependencies">
<span id="id10"></span><h3>Software dependencies<a class="headerlink" href="#software-dependencies" title="Permalink to this heading"></a></h3>
<p><cite>SeisComP</cite> depends on a number of additional software packages shipped with each
Linux distribution.
After installation of <cite>SeisComP</cite> these packages can be installed using the
<strong class="program">seiscomp</strong>.
The <strong class="program">seiscomp</strong> tool comes with
the command <strong class="command">install-deps</strong> which installs required packages.
Read the section <a class="reference internal" href="management.html#system-management"><span class="std std-ref">System management</span></a> for more detailed
instructions. For example, to install the dependencies for using the MariaDB
database, give mariadb-server as parameter.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>seiscomp/bin/seiscomp<span class="w"> </span>install-deps<span class="w"> </span>base<span class="w"> </span>mariadb-server
Distribution:<span class="w"> </span>Ubuntu<span class="w"> </span><span class="m">18</span>.04
<span class="o">[</span>sudo<span class="o">]</span><span class="w"> </span>password<span class="w"> </span><span class="k">for</span><span class="w"> </span>sysop:
Reading<span class="w"> </span>package<span class="w"> </span>lists...<span class="w"> </span>Done
Building<span class="w"> </span>dependency<span class="w"> </span>tree
Reading<span class="w"> </span>state<span class="w"> </span>information...<span class="w"> </span>Done
...
</pre></div>
</div>
<p>More options for systems with GUIs and FDSNWS are:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>user@host:~$ seiscomp/bin/seiscomp install-deps gui fdsnws
</pre></div>
</div>
<p>If your distribution is not supported by <strong class="command">install-deps</strong>,
install the above packages manually:</p>
<p><strong class="program">Ubuntu</strong> <cite>version</cite></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>seiscomp/share/deps/ubuntu/<span class="o">[</span>version<span class="o">]</span>
...
</pre></div>
</div>
<p><strong class="program">CentOS</strong> <cite>version</cite></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>seiscomp/share/deps/centos/<span class="o">[</span>version<span class="o">]</span>
...
</pre></div>
</div>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>su<span class="w"> </span>root
bash<span class="w"> </span>install-mariadb-server.sh
bash<span class="w"> </span>install-postgresql-server.sh
bash<span class="w"> </span>install-base.sh
bash<span class="w"> </span>install-gui.sh
bash<span class="w"> </span>install-fdsnws.sh
...
</pre></div>
</div>
<p>or contact the <cite>SeisComP</cite> developers to add support for your distribution.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Either the MariaDB <strong>or</strong> the MySQL server can be installed; not both at the
same time. When replacing on by the other, ensure that all related files are
removed before installing the alternative server. For MySQL instead of MariaDB
use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>root@host:~$ sh install-mysql-server.sh
</pre></div>
</div>
<p>Preferably use MariaDB instead of MySQL as MariaDB is the default for the
supported Linux distributions!</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Linux systems develop dynamically and the installation of the dependencies
may be incomplete. <cite>SeisComP</cite> modules will stop and indicate the missing software.
They can be installed manually.</p>
</div>
</section>
</section>
</section>
<section id="database-server-configuration">
<span id="database-configuration"></span><h1>Database Server Configuration<a class="headerlink" href="#database-server-configuration" title="Permalink to this heading"></a></h1>
<p><cite>SeisComP</cite> is typically operated with a <a class="reference internal" href="concepts/database.html#concepts-database"><span class="std std-ref">database</span></a> which
should be optimized. This section describes how to setup and optimize the
database server. For the setup of the database itself read the section
<a class="reference internal" href="getting-started.html#getting-started"><span class="std std-ref">Getting Started with SeisComP</span></a>.</p>
<section id="mariadb-mysql">
<span id="database-configuration-mysql"></span><h2>MariaDB / MySQL<a class="headerlink" href="#mariadb-mysql" title="Permalink to this heading"></a></h2>
<ul>
<li><p>For better performance with a MariaDB/MySQL database, adjust the memory pool size. Test
the default of the <strong>buffer_pool_size</strong> before making the change:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>mysql<span class="w"> </span>-u<span class="w"> </span>root<span class="w"> </span>-p
show<span class="w"> </span>variables<span class="w"> </span>like<span class="w"> </span><span class="s1">&#39;innodb_buffer_pool_size&#39;</span><span class="p">;</span>
</pre></div>
</div>
<p>The optimum <strong>buffer_pool_size</strong> depends on your system (RAM size) and only needs
to be set if required. Choose your preferred value:</p>
<ul class="simple">
<li><p>Recommended value: 512M or more</p></li>
<li><p>Minimum value: 64M</p></li>
</ul>
<p>Additionally, reduce the database hard drive synchronization and make both adjustments
in the section [mysqld]:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="o">[</span>mysqld<span class="o">]</span>
<span class="nv">innodb_buffer_pool_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>&lt;your<span class="w"> </span>value&gt;
<span class="nv">innodb_flush_log_at_trx_commit</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">2</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The location of the configuration file can differ between distributions.</p>
<p><strong class="program">Ubuntu</strong>:</p>
<p><code class="file docutils literal notranslate"><span class="pre">/etc/mysql/mariadb.conf.d/50-server.cnf</span></code></p>
<p><strong class="program">CentOS</strong>:</p>
<p><code class="file docutils literal notranslate"><span class="pre">/etc/my.cnf</span></code></p>
</div>
<p>Please read the documentation of your distribution. root privileges may
be required to make the changes.</p>
</li>
<li><p>To start MariaDB automatically during boot set</p>
<p><strong class="program">Ubuntu</strong></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>sudo<span class="w"> </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>mariadb
</pre></div>
</div>
<p><strong class="program">CentOS</strong></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>su<span class="w"> </span>root
root@host:~$<span class="w"> </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>mariadb
</pre></div>
</div>
</li>
<li><p>If you make a fresh installation of MariaDB/MySQL, secure the database and set
a password for the root user</p>
<p><strong class="program">Ubuntu</strong></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>user@host:~$ sudo mysql_secure_installation
</pre></div>
</div>
<p><strong class="program">CentOS</strong></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>user@host:~$ su root
root@host:~$ mysql_secure_installation
</pre></div>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>This step overrides database settings. Only execute the command</p>
<ul class="simple">
<li><p>After a fresh installation or</p></li>
<li><p>If you are sure about the procedure.</p></li>
</ul>
</div>
</li>
<li><p>After adjusting the parameters, MariaDB needs to be restarted. One can run</p>
<p><strong class="program">Ubuntu</strong>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>sudo<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>mariadb
</pre></div>
</div>
<p><strong class="program">CentOS</strong>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>su<span class="w"> </span>root
root@host:~$<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>mariadb
</pre></div>
</div>
</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Replace mariadb by mysql when using MySQL instead of MariaDB.</p>
</div>
</section>
<section id="postgresql">
<span id="database-configuration-postgresql"></span><h2>PostgreSQL<a class="headerlink" href="#postgresql" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>When using PostgreSQL, the database server must be initialized and secured.</p></li>
<li><p>By default PostgresSQL does not allow to login with username and password which
leads to the fact that <strong class="program">scmaster</strong> can not connect to the database
after <cite>SeisComP</cite> database initialization. Here an example how to enable
user/password authentication for local and remote connections.</p></li>
</ul>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># TYPE DATABASE USER ADDRESS METHOD</span>
<span class="w"> </span><span class="c1"># IPv4 local connections:</span>
<span class="w"> </span>host<span class="w"> </span>seiscomp<span class="w"> </span>sysop<span class="w"> </span><span class="m">0</span>.0.0.0/0<span class="w"> </span>md5
<span class="w"> </span>host<span class="w"> </span>all<span class="w"> </span>all<span class="w"> </span><span class="m">127</span>.0.0.1/32<span class="w"> </span>ident
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The order of the rules matters and the location of the configuration file
can differ between distributions.</p>
<p><strong class="program">Ubuntu</strong>:</p>
<p><code class="file docutils literal notranslate"><span class="pre">/etc/postgresql/10/main/pg_hba.conf</span></code></p>
<p><strong class="program">CentOS</strong>:</p>
<p><code class="file docutils literal notranslate"><span class="pre">/var/lib/pgsql/data/pg_hba.conf</span></code></p>
</div>
<ul>
<li><p>By default PostgresSQL accepts local connections only. If the database server
and clients are on different machines please change the listen address as
follows.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nv">listen_addresses</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span>.0.0.0/0
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The location of the configuration file can differ between distributions.</p>
<p><strong class="program">Ubuntu</strong>:</p>
<p><code class="file docutils literal notranslate"><span class="pre">/etc/postgresql/10/main/postgresql.conf</span></code></p>
<p><strong class="program">CentOS</strong>:</p>
<p><code class="file docutils literal notranslate"><span class="pre">/var/lib/pgsql/data/postgresql.conf</span></code></p>
</div>
</li>
</ul>
</section>
<section id="next-steps">
<h2>Next Steps<a class="headerlink" href="#next-steps" title="Permalink to this heading"></a></h2>
<p>Now everything is installed and the system can be configured. The
<a class="reference internal" href="getting-started.html#getting-started"><span class="std std-ref">next chapter</span></a> chapter explains the first steps.</p>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#"><cite>SeisComP</cite> Installation</a><ul>
<li><a class="reference internal" href="#hardware-requirements">Hardware Requirements</a></li>
<li><a class="reference internal" href="#installation-from-packages">Installation from Packages</a><ul>
<li><a class="reference internal" href="#steps-to-take">Steps to take</a></li>
<li><a class="reference internal" href="#directory-structure">Directory structure</a></li>
<li><a class="reference internal" href="#software-dependencies">Software dependencies</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#database-server-configuration">Database Server Configuration</a><ul>
<li><a class="reference internal" href="#mariadb-mysql">MariaDB / MySQL</a></li>
<li><a class="reference internal" href="#postgresql">PostgreSQL</a></li>
<li><a class="reference internal" href="#next-steps">Next Steps</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="changelog.html"
title="previous chapter">Change Log</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="getting-started.html"
title="next chapter">Getting Started with <cite>SeisComP</cite></a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/installation.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,242 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Introduction and Scope &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Overview" href="overview.html" />
<link rel="prev" title="Welcome" href="../index.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="overview.html" title="Overview"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="../index.html" title="Welcome"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="introduction-and-scope">
<span id="introduction"></span><h1>Introduction and Scope<a class="headerlink" href="#introduction-and-scope" title="Permalink to this heading"></a></h1>
<p>SeisComP is likely the most widely distributed software package for real-time monitoring
of earthquakes and other seismic events. It provides automatic and interactive
seismological data acquisition, processing and data exchange over the internet. Its
data transmission protocol SeedLink has become a de facto world standard.</p>
<p><cite>SeisComP</cite> convinces many seismologists and earthquake specialists at data and
research centers, companies and governmental agencies world-wide by:</p>
<ul class="simple">
<li><p>Powerful and reliable automatic data processing in real time or during post-processing</p></li>
<li><p>User-friendly and comprehensive graphical interfaces</p></li>
<li><p>Modern and well-maintained OpenSource software on GitHub
<span id="id1">[<a class="reference internal" href="references.html#id258" title="Seiscomp on github. URL: https://github.com/SeisComP.">1</a>]</span> welcoming community contributions.</p></li>
</ul>
<p>The first work on what became <cite>SeisComP</cite> today began nearly two decades ago
with developments at <a class="reference internal" href="glossary.html#term-GFZ"><span class="xref std std-term">GFZ</span></a> of plugins for digitizers.
It is now continued by <a class="reference internal" href="glossary.html#term-gempa-GmbH"><span class="xref std std-term">gempa GmbH</span></a> and GFZ.
The <a class="reference internal" href="history.html#history"><span class="std std-ref">section on historical information</span></a> provides details on the past
and current releases.</p>
<section id="features">
<h2>Features<a class="headerlink" href="#features" title="Permalink to this heading"></a></h2>
<p>Today <cite>SeisComP</cite> includes the following features:</p>
<ul class="simple">
<li><p>Data acquisition</p></li>
<li><p>Waveform archiving</p></li>
<li><p>Waveform data distribution</p></li>
<li><p>Data quality control</p></li>
<li><p>Data recording</p></li>
<li><p>Real-time data exchange</p></li>
<li><p>Network status monitoring</p></li>
<li><p>Real-time data processing</p></li>
<li><p>Automatic event detection and location</p></li>
<li><p>Interactive event detection and location</p></li>
<li><p>Automatic and interactive magnitude calculation</p></li>
<li><p>Interactive determination of focal mechanisms</p></li>
<li><p>Issuing event alerts</p></li>
<li><p>Event parameter archiving</p></li>
<li><p>Easy access to relevant information about stations, waveforms and recent
earthquakes through graphical user interface and command-line tools</p></li>
<li><p>Python interface for developing custom scripts and modules.</p></li>
</ul>
</section>
<section id="software-design">
<h2>Software Design<a class="headerlink" href="#software-design" title="Permalink to this heading"></a></h2>
<p>The guidelines for the design of <cite>SeisComP</cite> are:</p>
<ul class="simple">
<li><p>Implementation of critical functions as standalone modules to guarantee the
independence from other functions (e.g. picker, magnitude calculation,
interactive analysis)</p></li>
<li><p>Easy implementation of custom modules</p></li>
<li><p>Independence of hard- and software</p></li>
<li><p>Ability of data exchange between different automatic real-time systems</p></li>
<li><p>Distribution of modules on several systems</p></li>
<li><p>Robust system for rapid and reliable earthquake solutions (especially during
seismic crises)</p></li>
</ul>
<p>These design principles have given <cite>SeisComP</cite> much robustness and flexibility
to respond to new developments. The <cite>SeisComP</cite> community is encouraged to contribute
their <cite>SeisComP</cite> source code on GitHub <span id="id2">[<a class="reference internal" href="references.html#id258" title="Seiscomp on github. URL: https://github.com/SeisComP.">1</a>]</span>. Examples and
guidelines for generating
code are given in the <a class="reference internal" href="../index.html#sec-index-developers"><span class="std std-ref">developer section</span></a>.</p>
</section>
<section id="this-documentation">
<h2>This Documentation<a class="headerlink" href="#this-documentation" title="Permalink to this heading"></a></h2>
<p>This documentation begins with an <a class="reference internal" href="overview.html#overview"><span class="std std-ref">Overview</span></a> and a <a class="reference internal" href="concepts.html#concepts"><span class="std std-ref">Concepts</span></a> section
necessary for understanding and using <cite>SeisComP</cite> successfully.
The <a class="reference internal" href="glossary.html#glossary"><span class="std std-ref">Glossary section</span></a> introduces technical terms.
All important code changes are listed in the <a class="reference internal" href="changelog.html#sc-changelog"><span class="std std-ref">change log</span></a>.
When using <cite>SeisComP</cite> or contributing source code, you should understand the
<a class="reference internal" href="license.html#license"><span class="std std-ref">license terms</span></a>.
If you actually make use of <cite>SeisComP</cite> and publish the results, we ask you to give
appropriate reference as set out on the <a class="reference internal" href="citation.html#citation"><span class="std std-ref">Citation section</span></a>.</p>
<p>In the following section the documentation covers the <a class="reference internal" href="installation.html#installation"><span class="std std-ref">installation</span></a>
and how to configure and operate a working <cite>SeisComP</cite> system.
A few <a class="reference internal" href="tutorials.html#tutorials"><span class="std std-ref">Tutorials</span></a> will guide you through a first example set up and further
operations.</p>
<p>The tutorials are followed by <a class="reference internal" href="../index.html#sec-index-modules"><span class="std std-ref">detailed technical descriptions</span></a>
of each individual <cite>SeisComP</cite> module, grouped by their general functionality:</p>
<ul class="simple">
<li><p>Interactive analysis</p></li>
<li><p>Data acquisition</p></li>
<li><p>Inventory management</p></li>
<li><p>Automatic processing</p></li>
<li><p>Utilities</p></li>
</ul>
<p>and many more <a class="reference internal" href="../index.html#sec-index-extensions"><span class="std std-ref">extensions</span></a> like descriptions of the
<a class="reference internal" href="glossary.html#term-RecordStream"><span class="xref std std-term">RecordStream</span></a>, magnitude types, locators, GUI customizations, waveform
filters or plugins.</p>
<p>The final part of the documentation relates to
<a class="reference internal" href="../index.html#sec-index-developers"><span class="std std-ref">contributing your own source code</span></a> to <cite>SeisComP</cite>.
This requires a deeper knowledge of the <cite>SeisComP</cite> <a class="reference internal" href="api-python.html#api-datamodel-python"><span class="std std-ref">data model</span></a>
and other details.
This part also includes guidelines for developers such as
<a class="reference internal" href="coding-conventions.html#coding-conventions"><span class="std std-ref">coding conventions</span></a>, <a class="reference internal" href="tests.html#unittests"><span class="std std-ref">unit tests</span></a>
and a <a class="reference internal" href="contributing-docs.html#contributing-documentation"><span class="std std-ref">guide for contributing documentation</span></a>.
<a class="reference internal" href="sdk-python-examples.html#sdk-python-examples"><span class="std std-ref">Some Python examples</span></a> help you to get started
quickly with programming for <cite>SeisComP</cite>.</p>
<p><cite>SeisComP</cite> is developed and distributed under the terms of the GNU
<span id="id3"><em>Affero General Public License</em> [<a class="reference internal" href="references.html#id89" title="Affero General Public License. GNU. URL: https://www.gnu.org/licenses/agpl-3.0.html.">2</a>]</span>, as set out in the <a class="reference internal" href="license.html#license"><span class="std std-ref">License</span></a> section.</p>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Introduction and Scope</a><ul>
<li><a class="reference internal" href="#features">Features</a></li>
<li><a class="reference internal" href="#software-design">Software Design</a></li>
<li><a class="reference internal" href="#this-documentation">This Documentation</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="../index.html"
title="previous chapter">Welcome</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="overview.html"
title="next chapter">Overview</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/introduction.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,805 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>License &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Citation" href="citation.html" />
<link rel="prev" title="Glossary" href="glossary.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="citation.html" title="Citation"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="glossary.html" title="Glossary"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="license">
<span id="id1"></span><h1>License<a class="headerlink" href="#license" title="Permalink to this heading"></a></h1>
<section id="in-a-nutshell">
<h2>In a nutshell<a class="headerlink" href="#in-a-nutshell" title="Permalink to this heading"></a></h2>
<p>You can use the entire SeisComP software collection under
the terms of the GNU AGPL, non-commercially or commercially. You can talk
about the software, you can give training sessions with the software, you
can install the software wherever you like regardless of whether
you are doing it for profit or not.
You can operate the software and do your business with it.</p>
<p>If you want to modify the software then you must publish all the changes
you made. Even if you only run it on your servers and expose it to the public.
If you build software applications linking against SeisComP libraries you have
to publish them under the GNU AGPL/GPL if they are for use by others.</p>
<p>If you want to write closed-source software with SeisComP you can apply for
a Commercial License. It is your decision whether you want to use the
libraries under the GNU AGPL or the Commercial License. You cant do both!</p>
</section>
<section id="gnu-affero-general-public-license-usage">
<h2>GNU AFFERO GENERAL PUBLIC LICENSE Usage<a class="headerlink" href="#gnu-affero-general-public-license-usage" title="Permalink to this heading"></a></h2>
<p>This Software may be used under the terms of the GNU
Affero General Public License version 3.0 as published by the Free Software
Foundation. Please review the following information to ensure the
GNU Affero General Public License version 3.0 requirements will be met.</p>
<p>The SeisComP application package is licensed exclusively under the GNU AGPL.</p>
</section>
<section id="commercial-license-usage">
<h2>Commercial License Usage<a class="headerlink" href="#commercial-license-usage" title="Permalink to this heading"></a></h2>
<p>Licensees holding valid commercial SeisComP licenses may use the Software in
accordance with the commercial license agreement between you and gempa GmbH.
For further information use the contact form at <a class="reference external" href="https://www.gempa.de/contact">https://www.gempa.de/contact</a>.</p>
</section>
<section id="gnu-affero-general-public-license">
<h2>GNU AFFERO GENERAL PUBLIC LICENSE<a class="headerlink" href="#gnu-affero-general-public-license" title="Permalink to this heading"></a></h2>
<p>Version 3, 19 November 2007</p>
<p>Copyright (C) 2007 Free Software Foundation, Inc.
<a class="reference external" href="https://fsf.org/">https://fsf.org/</a></p>
<p>Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.</p>
<section id="preamble">
<h3>Preamble<a class="headerlink" href="#preamble" title="Permalink to this heading"></a></h3>
<p>The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.</p>
<p>The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a programto make sure it remains
free software for all its users.</p>
<p>When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.</p>
<p>Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.</p>
<p>A secondary benefit of defending all users freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.</p>
<p>The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.</p>
<p>An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing
under this license.</p>
<p>The precise terms and conditions for copying, distribution and
modification follow.</p>
</section>
<section id="terms-and-conditions">
<h3>TERMS AND CONDITIONS<a class="headerlink" href="#terms-and-conditions" title="Permalink to this heading"></a></h3>
<section id="definitions">
<h4>0. Definitions.<a class="headerlink" href="#definitions" title="Permalink to this heading"></a></h4>
<p>“This License” refers to version 3 of the GNU Affero General Public
License.</p>
<p>“Copyright” also means copyright-like laws that apply to other kinds
of works, such as semiconductor masks.</p>
<p>“The Program” refers to any copyrightable work licensed under this
License. Each licensee is addressed as “you”. “Licensees” and
“recipients” may be individuals or organizations.</p>
<p>To “modify” a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of
an exact copy. The resulting work is called a “modified version” of
the earlier work or a work “based on” the earlier work.</p>
<p>A “covered work” means either the unmodified Program or a work based
on the Program.</p>
<p>To “propagate” a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.</p>
<p>To “convey” a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user
through a computer network, with no transfer of a copy, is not
conveying.</p>
<p>An interactive user interface displays “Appropriate Legal Notices” to
the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.</p>
</section>
<section id="source-code">
<h4>1. Source Code.<a class="headerlink" href="#source-code" title="Permalink to this heading"></a></h4>
<p>The “source code” for a work means the preferred form of the work for
making modifications to it. “Object code” means any non-source form of
a work.</p>
<p>A “Standard Interface” means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.</p>
<p>The “System Libraries” of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
“Major Component”, in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.</p>
<p>The “Corresponding Source” for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the works
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.</p>
<p>The Corresponding Source need not include anything that users can
regenerate automatically from other parts of the Corresponding Source.</p>
<p>The Corresponding Source for a work in source code form is that same
work.</p>
</section>
<section id="basic-permissions">
<h4>2. Basic Permissions.<a class="headerlink" href="#basic-permissions" title="Permalink to this heading"></a></h4>
<p>All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.</p>
<p>You may make, run and propagate covered works that you do not convey,
without conditions so long as your license otherwise remains in force.
You may convey covered works to others for the sole purpose of having
them make modifications exclusively for you, or provide you with
facilities for running those works, provided that you comply with the
terms of this License in conveying all material for which you do not
control copyright. Those thus making or running the covered works for
you must do so exclusively on your behalf, under your direction and
control, on terms that prohibit them from making any copies of your
copyrighted material outside their relationship with you.</p>
<p>Conveying under any other circumstances is permitted solely under the
conditions stated below. Sublicensing is not allowed; section 10 makes
it unnecessary.</p>
</section>
<section id="protecting-users-legal-rights-from-anti-circumvention-law">
<h4>3. Protecting Users Legal Rights From Anti-Circumvention Law.<a class="headerlink" href="#protecting-users-legal-rights-from-anti-circumvention-law" title="Permalink to this heading"></a></h4>
<p>No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.</p>
<p>When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such
circumvention is effected by exercising rights under this License with
respect to the covered work, and you disclaim any intention to limit
operation or modification of the work as a means of enforcing, against
the works users, your or third parties legal rights to forbid
circumvention of technological measures.</p>
</section>
<section id="conveying-verbatim-copies">
<h4>4. Conveying Verbatim Copies.<a class="headerlink" href="#conveying-verbatim-copies" title="Permalink to this heading"></a></h4>
<p>You may convey verbatim copies of the Programs source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.</p>
<p>You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.</p>
</section>
<section id="conveying-modified-source-versions">
<h4>5. Conveying Modified Source Versions.<a class="headerlink" href="#conveying-modified-source-versions" title="Permalink to this heading"></a></h4>
<p>You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these
conditions:</p>
<ul class="simple">
<li><p>a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.</p></li>
<li><p>b) The work must carry prominent notices stating that it is
released under this License and any conditions added under
section 7. This requirement modifies the requirement in section 4
to “keep intact all notices”.</p></li>
<li><p>c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.</p></li>
<li><p>d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.</p></li>
</ul>
<p>A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
“aggregate” if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilations users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.</p>
</section>
<section id="conveying-non-source-forms">
<h4>6. Conveying Non-Source Forms.<a class="headerlink" href="#conveying-non-source-forms" title="Permalink to this heading"></a></h4>
<p>You may convey a covered work in object code form under the terms of
sections 4 and 5, provided that you also convey the machine-readable
Corresponding Source under the terms of this License, in one of these
ways:</p>
<ul class="simple">
<li><p>a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.</p></li>
<li><p>b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the Corresponding
Source from a network server at no charge.</p></li>
<li><p>c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.</p></li>
<li><p>d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.</p></li>
<li><p>e) Convey the object code using peer-to-peer transmission,
provided you inform other peers where the object code and
Corresponding Source of the work are being offered to the general
public at no charge under subsection 6d.</p></li>
</ul>
<p>A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.</p>
<p>A “User Product” is either (1) a “consumer product”, which means any
tangible personal property which is normally used for personal,
family, or household purposes, or (2) anything designed or sold for
incorporation into a dwelling. In determining whether a product is a
consumer product, doubtful cases shall be resolved in favor of
coverage. For a particular product received by a particular user,
“normally used” refers to a typical or common use of that class of
product, regardless of the status of the particular user or of the way
in which the particular user actually uses, or expects or is expected
to use, the product. A product is a consumer product regardless of
whether the product has substantial commercial, industrial or
non-consumer uses, unless such uses represent the only significant
mode of use of the product.</p>
<p>“Installation Information” for a User Product means any methods,
procedures, authorization keys, or other information required to
install and execute modified versions of a covered work in that User
Product from a modified version of its Corresponding Source. The
information must suffice to ensure that the continued functioning of
the modified object code is in no case prevented or interfered with
solely because modification has been made.</p>
<p>If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).</p>
<p>The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or
updates for a work that has been modified or installed by the
recipient, or for the User Product in which it has been modified or
installed. Access to a network may be denied when the modification
itself materially and adversely affects the operation of the network
or violates the rules and protocols for communication across the
network.</p>
<p>Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.</p>
</section>
<section id="additional-terms">
<h4>7. Additional Terms.<a class="headerlink" href="#additional-terms" title="Permalink to this heading"></a></h4>
<p>“Additional permissions” are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.</p>
<p>When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.</p>
<p>Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders
of that material) supplement the terms of this License with terms:</p>
<ul class="simple">
<li><p>a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or</p></li>
<li><p>b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or</p></li>
<li><p>c) Prohibiting misrepresentation of the origin of that material,
or requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or</p></li>
<li><p>d) Limiting the use for publicity purposes of names of licensors
or authors of the material; or</p></li>
<li><p>e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or</p></li>
<li><p>f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions
of it) with contractual assumptions of liability to the recipient,
for any liability that these contractual assumptions directly
impose on those licensors and authors.</p></li>
</ul>
<p>All other non-permissive additional terms are considered “further
restrictions” within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.</p>
<p>If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.</p>
<p>Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions; the
above requirements apply either way.</p>
</section>
<section id="termination">
<h4>8. Termination.<a class="headerlink" href="#termination" title="Permalink to this heading"></a></h4>
<p>You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).</p>
<p>However, if you cease all violation of this License, then your license
from a particular copyright holder is reinstated (a) provisionally,
unless and until the copyright holder explicitly and finally
terminates your license, and (b) permanently, if the copyright holder
fails to notify you of the violation by some reasonable means prior to
60 days after the cessation.</p>
<p>Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.</p>
<p>Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.</p>
</section>
<section id="acceptance-not-required-for-having-copies">
<h4>9. Acceptance Not Required for Having Copies.<a class="headerlink" href="#acceptance-not-required-for-having-copies" title="Permalink to this heading"></a></h4>
<p>You are not required to accept this License in order to receive or run
a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.</p>
</section>
<section id="automatic-licensing-of-downstream-recipients">
<h4>10. Automatic Licensing of Downstream Recipients.<a class="headerlink" href="#automatic-licensing-of-downstream-recipients" title="Permalink to this heading"></a></h4>
<p>Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.</p>
<p>An “entity transaction” is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the partys predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.</p>
<p>You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.</p>
</section>
<section id="patents">
<h4>11. Patents.<a class="headerlink" href="#patents" title="Permalink to this heading"></a></h4>
<p>A “contributor” is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributors “contributor version”.</p>
<p>A contributors “essential patent claims” are all patent claims owned
or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, “control” includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.</p>
<p>Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributors essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.</p>
<p>In the following three paragraphs, a “patent license” is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To “grant” such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.</p>
<p>If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. “Knowingly relying” means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipients use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.</p>
<p>If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.</p>
<p>A patent license is “discriminatory” if it does not include within the
scope of its coverage, prohibits the exercise of, or is conditioned on
the non-exercise of one or more of the rights that are specifically
granted under this License. You may not convey a covered work if you
are a party to an arrangement with a third party that is in the
business of distributing software, under which you make payment to the
third party based on the extent of your activity of conveying the
work, and under which the third party grants, to any of the parties
who would receive the covered work from you, a discriminatory patent
license (a) in connection with copies of the covered work conveyed by
you (or copies made from those copies), or (b) primarily for and in
connection with specific products or compilations that contain the
covered work, unless you entered into that arrangement, or that patent
license was granted, prior to 28 March 2007.</p>
<p>Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.</p>
</section>
<section id="no-surrender-of-others-freedom">
<h4>12. No Surrender of Others Freedom.<a class="headerlink" href="#no-surrender-of-others-freedom" title="Permalink to this heading"></a></h4>
<p>If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under
this License and any other pertinent obligations, then as a
consequence you may not convey it at all. For example, if you agree to
terms that obligate you to collect a royalty for further conveying
from those to whom you convey the Program, the only way you could
satisfy both those terms and this License would be to refrain entirely
from conveying the Program.</p>
</section>
<section id="remote-network-interaction-use-with-the-gnu-general-public-license">
<h4>13. Remote Network Interaction; Use with the GNU General Public License.<a class="headerlink" href="#remote-network-interaction-use-with-the-gnu-general-public-license" title="Permalink to this heading"></a></h4>
<p>Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your
version supports such interaction) an opportunity to receive the
Corresponding Source of your version by providing access to the
Corresponding Source from a network server at no charge, through some
standard or customary means of facilitating copying of software. This
Corresponding Source shall include the Corresponding Source for any
work covered by version 3 of the GNU General Public License that is
incorporated pursuant to the following paragraph.</p>
<p>Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.</p>
</section>
<section id="revised-versions-of-this-license">
<h4>14. Revised Versions of this License.<a class="headerlink" href="#revised-versions-of-this-license" title="Permalink to this heading"></a></h4>
<p>The Free Software Foundation may publish revised and/or new versions
of the GNU Affero General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.</p>
<p>Each version is given a distinguishing version number. If the Program
specifies that a certain numbered version of the GNU Affero General
Public License “or any later version” applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever
published by the Free Software Foundation.</p>
<p>If the Program specifies that a proxy can decide which future versions
of the GNU Affero General Public License can be used, that proxys
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.</p>
<p>Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.</p>
</section>
<section id="disclaimer-of-warranty">
<h4>15. Disclaimer of Warranty.<a class="headerlink" href="#disclaimer-of-warranty" title="Permalink to this heading"></a></h4>
<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.</p>
</section>
<section id="limitation-of-liability">
<h4>16. Limitation of Liability.<a class="headerlink" href="#limitation-of-liability" title="Permalink to this heading"></a></h4>
<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
</section>
<section id="interpretation-of-sections-15-and-16">
<h4>17. Interpretation of Sections 15 and 16.<a class="headerlink" href="#interpretation-of-sections-15-and-16" title="Permalink to this heading"></a></h4>
<p>If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.</p>
<p>END OF TERMS AND CONDITIONS</p>
</section>
</section>
<section id="how-to-apply-these-terms-to-your-new-programs">
<h3>How to Apply These Terms to Your New Programs<a class="headerlink" href="#how-to-apply-these-terms-to-your-new-programs" title="Permalink to this heading"></a></h3>
<p>If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.</p>
<p>To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively state
the exclusion of warranty; and each file should have at least the
“copyright” line and a pointer to where the full notice is found.</p>
<blockquote>
<div><p>&lt;one line to give the programs name and a brief idea of what it does.&gt;
Copyright (C) &lt;year&gt; &lt;name of author&gt;</p>
<p>This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.</p>
<p>This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.</p>
<p>You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <a class="reference external" href="https://www.gnu.org/licenses/">https://www.gnu.org/licenses/</a>.</p>
</div></blockquote>
<p>Also add information on how to contact you by electronic and paper
mail.</p>
<p>If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a “Source” link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for
the specific requirements.</p>
<p>You should also get your employer (if you work as a programmer) or
school, if any, to sign a “copyright disclaimer” for the program, if
necessary. For more information on this, and how to apply and follow
the GNU AGPL, see <a class="reference external" href="https://www.gnu.org/licenses/">https://www.gnu.org/licenses/</a>.</p>
</section>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">License</a><ul>
<li><a class="reference internal" href="#in-a-nutshell">In a nutshell</a></li>
<li><a class="reference internal" href="#gnu-affero-general-public-license-usage">GNU AFFERO GENERAL PUBLIC LICENSE Usage</a></li>
<li><a class="reference internal" href="#commercial-license-usage">Commercial License Usage</a></li>
<li><a class="reference internal" href="#gnu-affero-general-public-license">GNU AFFERO GENERAL PUBLIC LICENSE</a><ul>
<li><a class="reference internal" href="#preamble">Preamble</a></li>
<li><a class="reference internal" href="#terms-and-conditions">TERMS AND CONDITIONS</a><ul>
<li><a class="reference internal" href="#definitions">0. Definitions.</a></li>
<li><a class="reference internal" href="#source-code">1. Source Code.</a></li>
<li><a class="reference internal" href="#basic-permissions">2. Basic Permissions.</a></li>
<li><a class="reference internal" href="#protecting-users-legal-rights-from-anti-circumvention-law">3. Protecting Users Legal Rights From Anti-Circumvention Law.</a></li>
<li><a class="reference internal" href="#conveying-verbatim-copies">4. Conveying Verbatim Copies.</a></li>
<li><a class="reference internal" href="#conveying-modified-source-versions">5. Conveying Modified Source Versions.</a></li>
<li><a class="reference internal" href="#conveying-non-source-forms">6. Conveying Non-Source Forms.</a></li>
<li><a class="reference internal" href="#additional-terms">7. Additional Terms.</a></li>
<li><a class="reference internal" href="#termination">8. Termination.</a></li>
<li><a class="reference internal" href="#acceptance-not-required-for-having-copies">9. Acceptance Not Required for Having Copies.</a></li>
<li><a class="reference internal" href="#automatic-licensing-of-downstream-recipients">10. Automatic Licensing of Downstream Recipients.</a></li>
<li><a class="reference internal" href="#patents">11. Patents.</a></li>
<li><a class="reference internal" href="#no-surrender-of-others-freedom">12. No Surrender of Others Freedom.</a></li>
<li><a class="reference internal" href="#remote-network-interaction-use-with-the-gnu-general-public-license">13. Remote Network Interaction; Use with the GNU General Public License.</a></li>
<li><a class="reference internal" href="#revised-versions-of-this-license">14. Revised Versions of this License.</a></li>
<li><a class="reference internal" href="#disclaimer-of-warranty">15. Disclaimer of Warranty.</a></li>
<li><a class="reference internal" href="#limitation-of-liability">16. Limitation of Liability.</a></li>
<li><a class="reference internal" href="#interpretation-of-sections-15-and-16">17. Interpretation of Sections 15 and 16.</a></li>
</ul>
</li>
<li><a class="reference internal" href="#how-to-apply-these-terms-to-your-new-programs">How to Apply These Terms to Your New Programs</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="glossary.html"
title="previous chapter">Glossary</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="citation.html"
title="next chapter">Citation</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/license.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,536 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>System management &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Tutorials" href="tutorials.html" />
<link rel="prev" title="Getting Started with SeisComP" href="getting-started.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="tutorials.html" title="Tutorials"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="getting-started.html" title="Getting Started with SeisComP"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="system-management">
<span id="id1"></span><h1>System management<a class="headerlink" href="#system-management" title="Permalink to this heading"></a></h1>
<p>The installation contains modules for data acquisition, data
archiving, processing, distribution and much more. To control all these
modules and to update their configuration the central program <strong class="program">seiscomp</strong>
is used with commands and options.</p>
<p><strong class="program">seiscomp</strong> is a Python script installed in
<code class="file docutils literal notranslate"><span class="pre">seiscomp/bin/seiscomp</span></code>.
The graphical tool <a class="reference internal" href="../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> is a user-friendly wrapper
tool for many commands in <strong class="program">seiscomp</strong>.</p>
<p>The entire management framework is built upon Python which is portable to different
platforms. To make <strong class="program">seiscomp</strong> work, ensure that Python is installed on
your system.</p>
<p><strong class="program">seiscomp</strong> of a particular installation can be called from anywhere in
the file system with its full path. It will source the environment of the
installation automatically. Thus, it is possible to control different
installations on one computer.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>seiscomp should never run with root privileges unless you know exactly what
you are doing.</p>
<p><strong class="program">seiscomp</strong> refuses to work when run with root privileges and issues
an error. To run it with root privileges the command-line option
<code class="docutils literal notranslate"><span class="pre">--asroot</span></code> must be given as first parameter, e.g.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">seiscomp</span> <span class="o">--</span><span class="n">asroot</span> <span class="n">start</span> <span class="n">seedlink</span>
</pre></div>
</div>
</div>
<p>To get an overview of all available commands, issue</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp/bin/seiscomp<span class="w"> </span><span class="nb">help</span>
</pre></div>
</div>
<p>This will print all commands. To get help for a particular command, append
it to the <code class="docutils literal notranslate"><span class="pre">help</span></code> command.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp/bin/seiscomp<span class="w"> </span><span class="nb">help</span><span class="w"> </span><span class="o">[</span>command<span class="o">]</span>
</pre></div>
</div>
<section id="seiscomp-commands">
<span id="sec-management-commands"></span><h2>seiscomp Commands<a class="headerlink" href="#seiscomp-commands" title="Permalink to this heading"></a></h2>
<p>The <em>seiscomp</em> script can be executed with additional commands:</p>
<ul>
<li><p><strong>alias</strong> create|remove [new-name] [module name]</p>
<p>Manages module aliases.</p>
</li>
<li><p><strong>check</strong> [module list]</p>
<p>Checks if all passed modules are still running if they have been started.
If no modules are listed, all modules are checked.</p>
</li>
<li><p><strong>disable</strong> [module list]</p>
<p>The opposite of enable. Removes the file <code class="file docutils literal notranslate"><span class="pre">etc/init/[module].auto</span></code> for
each module passed.</p>
</li>
<li><p><strong>enable</strong> [module list]</p>
<p>Enables a module to be started and checked automatically when either <strong class="command">start</strong>
or <strong class="command">check</strong> is called without arguments. This creates a file <code class="file docutils literal notranslate"><span class="pre">etc/init/[module].auto</span></code>
for each module passed.</p>
</li>
<li><p><strong>exec</strong> [cmd]</p>
<p>Executes a module.</p>
</li>
<li><p><strong>help</strong> [command]</p>
<p>Prints help on commands.</p>
</li>
<li><p><strong>install-deps</strong> [packages]</p>
<p>Installs 3rd party packages on which <cite>SeisComP</cite> depends such as MariaDB or MySQL.
This is currently only supported for major Linux distributions. A list of packages
needs to be given. Available packages are: <strong>base</strong>, <strong>GUI</strong>,
<strong>mariadb-server</strong>, <strong>postgresql-server</strong>, <strong>fdsnws</strong>.</p>
<ol class="arabic">
<li><p>Install only base system dependencies:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>install-deps<span class="w"> </span>base
</pre></div>
</div>
</li>
<li><p>Install base system dependencies and MariaDB/MySQL/PostgreSQL server:</p>
<p>MariaDB</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">seiscomp</span> <span class="n">install</span><span class="o">-</span><span class="n">deps</span> <span class="n">base</span> <span class="n">mariadb</span><span class="o">-</span><span class="n">server</span>
</pre></div>
</div>
<p>MySQL. Install either MariaDB or MySQL, not both at the same time!</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">seiscomp</span> <span class="n">install</span><span class="o">-</span><span class="n">deps</span> <span class="n">base</span> <span class="n">mysql</span><span class="o">-</span><span class="n">server</span>
</pre></div>
</div>
<p>PostgreSQL:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">seiscomp</span> <span class="n">install</span><span class="o">-</span><span class="n">deps</span> <span class="n">base</span> <span class="n">postgresql</span><span class="o">-</span><span class="n">server</span>
</pre></div>
</div>
</li>
<li><p>Install also gui and fdsnws dependencies:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>install-deps<span class="w"> </span>gui<span class="w"> </span>fdsnws
</pre></div>
</div>
</li>
</ol>
</li>
<li><p><strong>list</strong> modules|aliases|enabled|disabled</p>
<p>Lists items.</p>
</li>
<li><p><strong>print</strong> crontab|env</p>
<p>Prints pre-defined parameters.</p>
</li>
<li><p><strong>restart</strong> [module list]</p>
<p>Restarts all the given modules. If no module is passed, all running and enabled modules
are first stopped and then restarted.</p>
</li>
<li><p><strong>setup</strong></p>
<p>Initializes the configuration of all available modules. Each module implements
its own setup handler which is called at this point. The initialization takes
the installation directory into account and should be repeated when copying
the system to another directory.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>setup might overwrite previous settings with default values.</p>
</div>
</li>
<li><p><strong>shell</strong></p>
<p>Starts the interactive <cite>SeisComP</cite> <a class="reference internal" href="#system-management-shell"><span class="std std-ref">shell</span></a>, an
approach to make configuration and manipulation of bindings more easy on the
command line.</p>
</li>
<li><p><strong>start</strong> [module list]</p>
<p>Starts all modules in [module list]. If no module is named, all enabled modules are
started.</p>
</li>
<li><p><strong>status</strong> [module list]</p>
<p>Prints the status of some, started, enabled or all modules.</p>
</li>
<li><p><strong>stop</strong> [module list]</p>
<p>Stops all modules in [module list]. If no module name is given, all running modules are
stopped.</p>
</li>
<li><p><strong>update-config</strong> [module list]</p>
<p>Updates the configuration. Modules should be able to read the configuration
files in <code class="file docutils literal notranslate"><span class="pre">etc</span></code> directly, but some modules such as Seedlink need an additional
step to convert the configuration to their native format. Furthermore all
trunk station bindings and the inventory need to be synchronized with the
database. If no module list is given, update-config is called for all available
modules. Otherwise only the modules passed are updated.</p>
</li>
</ul>
</section>
<section id="seiscomp-shell">
<span id="system-management-shell"></span><h2>SeisComP Shell<a class="headerlink" href="#seiscomp-shell" title="Permalink to this heading"></a></h2>
<p>The <cite>SeisComP</cite> shell can be started with</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>user@host:~$<span class="w"> </span>seiscomp/bin/seiscomp<span class="w"> </span>shell
</pre></div>
</div>
<p>which will open a command prompt. The shell is a helper to manage module station
bindings. Instead of manipulating hundreds of files using difficult commands
such as <strong class="command">sed</strong> in Bash scripts, shell can be used. It supports:</p>
<ul class="simple">
<li><p>list available stations</p></li>
<li><p>list available profiles of a module</p></li>
<li><p>list modules to which a station is bound</p></li>
<li><p>bind stations to modules</p></li>
<li><p>delete bindings</p></li>
<li><p>track configuration of a station</p></li>
</ul>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="o">================================================================================</span>
seiscomp<span class="w"> </span><span class="nv">shell</span>
<span class="o">================================================================================</span>
Welcome<span class="w"> </span>to<span class="w"> </span>the<span class="w"> </span>SeisComP<span class="w"> </span>interactive<span class="w"> </span>shell.<span class="w"> </span>You<span class="w"> </span>can<span class="w"> </span>get<span class="w"> </span><span class="nb">help</span><span class="w"> </span>about
available<span class="w"> </span>commands<span class="w"> </span>with<span class="w"> </span><span class="s1">&#39;help&#39;</span>.<span class="w"> </span><span class="s1">&#39;exit&#39;</span><span class="w"> </span>leaves<span class="w"> </span>the<span class="w"> </span>shell.
$
</pre></div>
</div>
<p>Enter <strong class="command">help</strong> to get a list of supported commands. The results of all
commands issued are written to disk immediately and <strong>not buffered</strong>.</p>
<section id="examples">
<h3>Examples<a class="headerlink" href="#examples" title="Permalink to this heading"></a></h3>
<ol class="arabic">
<li><p>Assigning the scautopick global profile to all GE stations</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">set</span><span class="w"> </span>profile<span class="w"> </span>scautopick<span class="w"> </span>global<span class="w"> </span>GE.*
</pre></div>
</div>
</li>
<li><p>Replace all profiles with station configuration for scautopick from GE
network</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>remove<span class="w"> </span>profile<span class="w"> </span>scautopick<span class="w"> </span>global<span class="w"> </span>GE.*
</pre></div>
</div>
</li>
<li><p>Show bindings for station GE.MORC</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>print<span class="w"> </span>station<span class="w"> </span>GE.MORC
<span class="o">[</span>global<span class="o">]</span>
/home/sysop/seiscomp/etc/key/global/profile_BH
--------------------------------------------------------------------------------
<span class="nv">detecStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>BH
--------------------------------------------------------------------------------
<span class="o">[</span>seedlink<span class="o">]</span>
/home/sysop/seiscomp/etc/key/seedlink/profile_geofon
--------------------------------------------------------------------------------
<span class="nv">sources</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>chain
sources.chain.address<span class="w"> </span><span class="o">=</span><span class="w"> </span>geofon.gfz-potsdam.de
sources.chain.port<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">18000</span>
--------------------------------------------------------------------------------
<span class="o">[</span>scautopick<span class="o">]</span>
/home/sysop/seiscomp/etc/key/scautopick/profile_default
--------------------------------------------------------------------------------
<span class="nv">detecEnable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="nv">detecFilter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;RMHP(10)&gt;&gt;ITAPER(30)&gt;&gt;BW(4,0.7,2)&gt;&gt;STALTA(2,80)&quot;</span>
<span class="nv">trigOn</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">3</span>
<span class="nv">trigOff</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span>.5
<span class="nv">timeCorr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>-0.8
--------------------------------------------------------------------------------
<span class="o">[</span>slarchive<span class="o">]</span>
/home/sysop/seiscomp/etc/key/slarchive/profile_1day
--------------------------------------------------------------------------------
<span class="nv">selectors</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>BHZ.D
<span class="nv">keep</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span>
--------------------------------------------------------------------------------
</pre></div>
</div>
<p>This helps to see immediately in which file a certain parameter is
defined and what module the station is bound to.</p>
</li>
</ol>
</section>
</section>
<section id="module-init-scripts">
<span id="system-management-init"></span><h2>Module Init Scripts<a class="headerlink" href="#module-init-scripts" title="Permalink to this heading"></a></h2>
<p>All modules which can run in the background as daemon modules have init scripts.
The init scripts are placed in <code class="file docutils literal notranslate"><span class="pre">etc/init</span></code>. <strong class="program">seiscomp</strong>
loads all .py files and tries to find a class called Module. This class is
then instantiated with the environment object passed as only parameter
to the constructor. If no error occurred then the module is registered.</p>
<p>The name of the init script is ignored and not used furthermore. Only the
name in the Module object is important. It is important to note that only
one module can be placed in one init script.</p>
<p>The Module class must implement the interface used by <strong class="program">seiscomp</strong>.
See <a class="reference internal" href="#seiscomp.Kernel.Module" title="seiscomp.Kernel.Module"><code class="xref py py-class docutils literal notranslate"><span class="pre">seiscomp.Kernel.Module</span></code></a> for more details.</p>
<p>A simple default implementation looks like this which is available as a
template and can be used directly by using the same name as the modules
name. The modules name in this template is derived from the filename, but this
isnt a general rule as stated before.</p>
<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">seiscomp.Kernel</span>
<span class="k">class</span> <span class="nc">Module</span><span class="p">(</span><span class="n">seiscomp</span><span class="o">.</span><span class="n">Kernel</span><span class="o">.</span><span class="n">Module</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">env</span><span class="p">):</span>
<span class="n">seiscomp</span><span class="o">.</span><span class="n">Kernel</span><span class="o">.</span><span class="n">Module</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">env</span><span class="p">,</span> <span class="n">env</span><span class="o">.</span><span class="n">moduleName</span><span class="p">(</span><span class="vm">__file__</span><span class="p">))</span>
</pre></div>
</div>
<p><cite>SeisComP</cite> provides a Python module (<a class="reference internal" href="#module-seiscomp.Kernel" title="seiscomp.Kernel"><code class="xref py py-mod docutils literal notranslate"><span class="pre">seiscomp.Kernel</span></code></a>) that allows to
write init scripts in an easy way.</p>
<section id="python-kernel-module">
<h3>Python kernel module<a class="headerlink" href="#python-kernel-module" title="Permalink to this heading"></a></h3>
<p>The <cite>SeisComP</cite> setup kernel module provides interfaces to write init handlers
for modules used by <strong class="program">seiscomp</strong> in Python.</p>
<span class="target" id="module-seiscomp.Kernel"></span><dl class="py class">
<dt class="sig sig-object py" id="seiscomp.Kernel.Module">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">seiscomp.Kernel.</span></span><span class="sig-name descname"><span class="pre">Module</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">env</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#seiscomp.Kernel.Module" title="Permalink to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>env</strong> The passes environment from <strong class="program">seiscomp</strong> which is
stored in self.env.</p></li>
<li><p><strong>name</strong> The module name which must be passed by derived classes.
It is stored in self.name.</p></li>
</ul>
</dd>
</dl>
<p>The module interface which implements the basic default operations.
Each script can define its own handlers to customize the behaviour.</p>
<dl class="py method">
<dt class="sig sig-object py" id="seiscomp.Kernel.Module.isRunning">
<span class="sig-name descname"><span class="pre">isRunning</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#seiscomp.Kernel.Module.isRunning" title="Permalink to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>Boolean</p>
</dd>
</dl>
<p>Checks if a module is running. The default implementation returns True
if the lockfile if not locked.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="seiscomp.Kernel.Module.start">
<span class="sig-name descname"><span class="pre">start</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#seiscomp.Kernel.Module.start" title="Permalink to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>Integer</p>
</dd>
</dl>
<p>Starts a module and returns 0 if no error occured and 1 otherwise. This
method is called from <strong class="program">seiscomp start</strong>.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="seiscomp.Kernel.Module.stop">
<span class="sig-name descname"><span class="pre">stop</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#seiscomp.Kernel.Module.stop" title="Permalink to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>Integer</p>
</dd>
</dl>
<p>Stops a module and returns 0 if no error occured and 1 otherwise. This
method is called from <strong class="program">seiscomp stop</strong>.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="seiscomp.Kernel.Module.check">
<span class="sig-name descname"><span class="pre">check</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#seiscomp.Kernel.Module.check" title="Permalink to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>Integer</p>
</dd>
</dl>
<p>Check is the same as start. The decision whether to check a module
or not is made <strong class="program">seiscomp</strong> which check the existence
of the corresponding run file. Returns 1 is case of error, 0 otherwise.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="seiscomp.Kernel.Module.status">
<span class="sig-name descname"><span class="pre">status</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">shouldRun</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#seiscomp.Kernel.Module.status" title="Permalink to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>shouldRun</strong> Boolean parameter that indicates if the module should
run or not. This is evaluated by <strong class="program">seiscomp</strong>.</p>
</dd>
</dl>
<p>Prints the status of the module to stdout. Either is CSV format or as free
text. This depends on self.env._csv. The default implementations calls</p>
<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">logStatus</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="bp">self</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">isRunning</span><span class="p">(),</span> <span class="n">shouldRun</span><span class="p">,</span>\
<span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">isModuleEnabled</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">)</span> <span class="ow">or</span> \
<span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">CoreModule</span><span class="p">))</span>
</pre></div>
</div>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="seiscomp.Kernel.Module.updateConfig">
<span class="sig-name descname"><span class="pre">updateConfig</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#seiscomp.Kernel.Module.updateConfig" title="Permalink to this definition"></a></dt>
<dd><p>Updates the configuration and bindings based on the modules .cfg files
and <code class="file docutils literal notranslate"><span class="pre">etc/key/[modname]</span></code>. A <a class="reference internal" href="glossary.html#term-trunk"><span class="xref std std-term">trunk</span></a> module does not need to
do anything here. Stand-alone modules need to implement this method to
convert the configuration to their native format.</p>
<p>This is called from <strong class="program">seiscomp update-config</strong>.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="seiscomp.Kernel.Module.printCrontab">
<span class="sig-name descname"><span class="pre">printCrontab</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#seiscomp.Kernel.Module.printCrontab" title="Permalink to this definition"></a></dt>
<dd><p>Prints crontab entries to stdout. The default implementation does not
print anything.</p>
<p>This is called from <strong class="program">seiscomp print crontab</strong>.</p>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="seiscomp.Kernel.CoreModule">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">seiscomp.Kernel.</span></span><span class="sig-name descname"><span class="pre">CoreModule</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">seiscomp.Kernel.Module</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#seiscomp.Kernel.CoreModule" title="Permalink to this definition"></a></dt>
<dd><p>The core module interface. A core module is a normal module but is started
before all modules and stopped afterwards. Core modules are always enabled
and will be started with <strong class="program">seiscomp start</strong> unless a CoreModule
implementation applies additional checks in <a class="reference internal" href="#seiscomp.Kernel.Module.start" title="seiscomp.Kernel.Module.start"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Module.start()</span></code></a>.</p>
<p><a class="reference internal" href="../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> is a core module which is a requirement for all <a class="reference internal" href="glossary.html#term-trunk"><span class="xref std std-term">trunk</span></a>
modules.</p>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="seiscomp.Kernel.Environment">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">seiscomp.Kernel.</span></span><span class="sig-name descname"><span class="pre">Environment</span></span><a class="headerlink" href="#seiscomp.Kernel.Environment" title="Permalink to this definition"></a></dt>
<dd><p>Access to the setup environment.</p>
</dd></dl>
</section>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">System management</a><ul>
<li><a class="reference internal" href="#seiscomp-commands">seiscomp Commands</a></li>
<li><a class="reference internal" href="#seiscomp-shell">SeisComP Shell</a><ul>
<li><a class="reference internal" href="#examples">Examples</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-init-scripts">Module Init Scripts</a><ul>
<li><a class="reference internal" href="#python-kernel-module">Python kernel module</a><ul>
<li><a class="reference internal" href="#seiscomp.Kernel.Module"><code class="docutils literal notranslate"><span class="pre">Module</span></code></a><ul>
<li><a class="reference internal" href="#seiscomp.Kernel.Module.isRunning"><code class="docutils literal notranslate"><span class="pre">Module.isRunning()</span></code></a></li>
<li><a class="reference internal" href="#seiscomp.Kernel.Module.start"><code class="docutils literal notranslate"><span class="pre">Module.start()</span></code></a></li>
<li><a class="reference internal" href="#seiscomp.Kernel.Module.stop"><code class="docutils literal notranslate"><span class="pre">Module.stop()</span></code></a></li>
<li><a class="reference internal" href="#seiscomp.Kernel.Module.check"><code class="docutils literal notranslate"><span class="pre">Module.check()</span></code></a></li>
<li><a class="reference internal" href="#seiscomp.Kernel.Module.status"><code class="docutils literal notranslate"><span class="pre">Module.status()</span></code></a></li>
<li><a class="reference internal" href="#seiscomp.Kernel.Module.updateConfig"><code class="docutils literal notranslate"><span class="pre">Module.updateConfig()</span></code></a></li>
<li><a class="reference internal" href="#seiscomp.Kernel.Module.printCrontab"><code class="docutils literal notranslate"><span class="pre">Module.printCrontab()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#seiscomp.Kernel.CoreModule"><code class="docutils literal notranslate"><span class="pre">CoreModule</span></code></a></li>
<li><a class="reference internal" href="#seiscomp.Kernel.Environment"><code class="docutils literal notranslate"><span class="pre">Environment</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="getting-started.html"
title="previous chapter">Getting Started with <cite>SeisComP</cite></a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="tutorials.html"
title="next chapter">Tutorials</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/management.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,386 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Overview &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Historical Information" href="history.html" />
<link rel="prev" title="Introduction and Scope" href="introduction.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="history.html" title="Historical Information"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="introduction.html" title="Introduction and Scope"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="overview">
<span id="id1"></span><h1>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h1>
<p>This overview section is intended to quickly introduce the reader into
key aspect of <cite>SeisComP</cite> and to provide the access points for further reading.</p>
<section id="modular-structure">
<h2>Modular structure<a class="headerlink" href="#modular-structure" title="Permalink to this heading"></a></h2>
<p>A <cite>SeisComP</cite> system is not a single piece of software but it involves automatic and
interactive modules working
separately to process data and to analyze seismicity.
Read the <a class="reference internal" href="concepts/modules.html#concepts-modules"><span class="std std-ref">concepts section on modules</span></a> for more conceptional details.</p>
<p>Each module has a particular task, such as:</p>
<ul class="simple">
<li><p>Acquisition of waveform data from one or more providers</p></li>
<li><p>Waveform archiving</p></li>
<li><p>Waveform processing to identify phase arrivals</p></li>
<li><p>Processing of phase picks to detect events and compute locations</p></li>
<li><p>Providing a user interface for manually reviewing events</p></li>
</ul>
<p>and many more. Key features are summarized in the <a class="reference internal" href="introduction.html#introduction"><span class="std std-ref">introduction</span></a>.</p>
<figure class="align-center" id="id9">
<a class="reference internal image-reference" href="../_images/sc-interaction.png"><img alt="../_images/sc-interaction.png" src="../_images/sc-interaction.png" style="width: 16cm;" /></a>
<figcaption>
<p><span class="caption-text">Real-time data acquisition, archiving and automatic processing combined with manual analysis.</span><a class="headerlink" href="#id9" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<section id="data-acquisition-modules">
<h3>Data acquisition modules<a class="headerlink" href="#data-acquisition-modules" title="Permalink to this heading"></a></h3>
<p>Data acquisition modules allow to provide and store waveform data in real-time.
They are described in the acquisition section of the modules documentation.</p>
</section>
<section id="automatic-processing-modules">
<h3>Automatic processing modules<a class="headerlink" href="#automatic-processing-modules" title="Permalink to this heading"></a></h3>
<p>Automatic processing modules allow real-time or offline processing of waveforms and event parameters.
They are described in the processing section of the modules documentation.</p>
</section>
<section id="interactive-modules">
<h3>Interactive modules<a class="headerlink" href="#interactive-modules" title="Permalink to this heading"></a></h3>
<p>Interactive <a class="reference internal" href="glossary.html#term-GUI"><span class="xref std std-term">GUI</span></a> modules show waveforms and processing results and allow user interactions:</p>
<ul class="simple">
<li><p><a class="reference internal" href="../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a>: processing waveforms, locating events and determining magnitudes and focal mechnisms</p></li>
<li><dl class="simple">
<dt><a class="reference internal" href="../apps/scrttv.html#scrttv"><span class="std std-ref">scrttv</span></a>: view waveforms and phase picks, select events for processing in scolv, enable or disable stations</dt><dd><p>for automatic processing</p>
</dd>
</dl>
</li>
<li><p><a class="reference internal" href="../apps/scmv.html#scmv"><span class="std std-ref">scmv</span></a>: view station locations on a map with status information and waveforms, select events for processing in scolv</p></li>
<li><p><a class="reference internal" href="../apps/scesv.html#scesv"><span class="std std-ref">scesv</span></a>: view the latest events on a map and relevant event parameters</p></li>
<li><p><a class="reference internal" href="../apps/scheli.html#scheli"><span class="std std-ref">scheli</span></a>: view the seismogram of a station in a helicorder plot, save images automatically</p></li>
<li><dl class="simple">
<dt><a class="reference internal" href="../apps/scqcv.html#scqcv"><span class="std std-ref">scqcv</span></a>: view waveform quality control (QC) parameters, enable or disable stations</dt><dd><p>for automatic processing</p>
</dd>
</dl>
</li>
<li><p><a class="reference internal" href="../apps/scmm.html#scmm"><span class="std std-ref">scmm</span></a>: the messaging system monitor</p></li>
</ul>
<p>The GUI modules are described in the Interactive analysis section of this documentation.</p>
</section>
<section id="inventory-modules">
<h3>Inventory modules<a class="headerlink" href="#inventory-modules" title="Permalink to this heading"></a></h3>
<p>Inventory modules allow to manipulate inventories, e.g. to convert different formats
or to write information to the database.
They are described in the inventory section of the modules documentation.</p>
</section>
<section id="utility-modules">
<h3>Utility modules<a class="headerlink" href="#utility-modules" title="Permalink to this heading"></a></h3>
<p>Utility modules provide access to waveforms, the data base and much more.
They are described in the utilities section of the modules documentation.</p>
</section>
</section>
<section id="communication-and-database-access">
<h2>Communication and database access<a class="headerlink" href="#communication-and-database-access" title="Permalink to this heading"></a></h2>
<p>As modules run, they produce objects corresponding to geophysical concepts
such as <a class="reference internal" href="glossary.html#term-pick"><span class="xref std std-term">picks</span></a> and <a class="reference internal" href="glossary.html#term-origin"><span class="xref std std-term">origins</span></a>.
These objects are exchanged with, and stored for later use by, other modules.
Communication between these modules happens in two ways:</p>
<ol class="arabic simple">
<li><p>Via objects stored in, and retrieved from, a shared database.</p></li>
<li><p>Via messages exchanged between modules.</p></li>
</ol>
<p>Managing the communication between the modules in <cite>SeisComP</cite> is the job of the <a class="reference internal" href="concepts/messaging.html#concepts-messaging"><span class="std std-ref">messaging
system</span></a>.
The messaging system is controlled by <a class="reference internal" href="../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a>. It acts as gatekeeper to the database,
and only the module <a class="reference internal" href="../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> is allowed
write access to the database.
Additional details are found under <a class="reference internal" href="concepts/messaging.html#concepts-messaging"><span class="std std-ref">Messaging system</span></a> in the <a class="reference internal" href="concepts.html#concepts"><span class="std std-ref">Concepts</span></a> chapter.</p>
<figure class="align-center" id="id10">
<a class="reference internal image-reference" href="../_images/sc_system_standard.jpg"><img alt="../_images/sc_system_standard.jpg" src="../_images/sc_system_standard.jpg" style="width: 10cm;" /></a>
<figcaption>
<p><span class="caption-text">Modular organization of <cite>SeisComP</cite> with messaging system, RecordStream interface and database.</span><a class="headerlink" href="#id10" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</section>
<section id="waveform-data">
<h2>Waveform data<a class="headerlink" href="#waveform-data" title="Permalink to this heading"></a></h2>
<p>Internally in <cite>SeisComP</cite>. most waveform data is currently handled as <a class="reference internal" href="glossary.html#term-miniSeed"><span class="xref std std-term">miniSEED</span></a> data (Data Only
<a class="reference internal" href="glossary.html#term-SEED"><span class="xref std std-term">SEED</span></a> records).
A time series of records is identified by its stream identifier,
following the SEED naming convention,</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">NET</span><span class="o">.</span><span class="n">STA</span><span class="o">.</span><span class="n">LOC</span><span class="o">.</span><span class="n">CHA</span>
</pre></div>
</div>
<p>where:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">NET</span> <span class="o">-</span> <span class="n">two</span> <span class="ow">or</span> <span class="n">three</span> <span class="n">letter</span> <span class="n">alphanumeric</span> <span class="n">network</span> <span class="n">code</span>
<span class="n">STA</span> <span class="o">-</span> <span class="mi">1</span><span class="o">-</span><span class="mi">5</span> <span class="n">letter</span> <span class="n">alphanumeric</span> <span class="n">station</span> <span class="n">code</span>
<span class="n">LOC</span> <span class="o">-</span> <span class="mi">0</span> <span class="ow">or</span> <span class="mi">2</span><span class="o">-</span><span class="n">letter</span> <span class="n">alphanumeric</span> <span class="n">location</span> <span class="n">code</span>
<span class="n">CHA</span> <span class="o">-</span> <span class="mi">3</span><span class="o">-</span><span class="n">letter</span> <span class="n">channel</span> <span class="ow">or</span> <span class="n">stream</span> <span class="n">code</span>
</pre></div>
</div>
<p>Here <em>alphanumeric</em> means the digits 0 to 9, and uppercase letters A-Z.</p>
<p>For publicly-available seismic stations these are typically supplied
by external servers such as <a class="reference internal" href="../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a> or <span id="id2"><em>CAPS</em> [<a class="reference internal" href="references.html#id91" title="CAPS. gempa module. URL: https://docs.gempa.de/caps/current/index.html.">3</a>]</span> servers.
For example, the <span id="id3"><em>GEOFON</em> [<a class="reference internal" href="references.html#id123" title="GEOFON. GFZ German Resarch Center for Geosciences. URL: https://geofon.gfz-potsdam.de/.">9</a>]</span> seismic network makes data available at port 18000
at geofon.gfz-potsdam.de which you may query and test using <a class="reference internal" href="../apps/slinktool.html#slinktool"><span class="std std-ref">slinktool</span></a>.</p>
<p>If you operate your own seismic network, you may collect data directly
from your stations digitizer using one of the many plugins included with
the <a class="reference internal" href="../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a> module.
You can configure <cite>SeisComP</cite> to obtain data for each station via <a class="reference internal" href="glossary.html#term-binding"><span class="xref std std-term">bindings</span></a>.
This configuration is described in the <a class="reference internal" href="tutorials/geofon_waveforms.html#tutorials-geofon-waveforms"><span class="std std-ref">tutorial on seedlink</span></a>.</p>
<p>Waveform data can be saved locally, using <cite>SeisComP</cite>s <a class="reference internal" href="../apps/slarchive.html#slarchive"><span class="std std-ref">slarchive</span></a> module.
The waveform archive is organized in a structured way on your local file system,
with one file for each channel and day, known as the <a class="reference internal" href="glossary.html#term-SDS"><span class="xref std std-term">SDS</span></a> archive.
Thanks to <cite>SeisComP</cite>s <a class="reference internal" href="concepts/recordstream.html#concepts-recordstream"><span class="std std-ref">RecordStream</span></a> concept, its modules
can be reconfigured to use the local data from an archive, a server or from files, allowing <em>playbacks</em>.
This ability to replay old waveforms and re-analyze them, is very
important for exploring your system configuration, and developing
<cite>SeisComP</cite>.</p>
<p>Finally, being both a collector and a server of waveform data,
<a class="reference internal" href="../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a> allows you to chain <cite>SeisComP</cite> installations together to
obtain waveform data from upstream sources and relay it to other data users.</p>
<figure class="align-center" id="id11">
<a class="reference internal image-reference" href="../_images/sc-acquisition-server.png"><img alt="../_images/sc-acquisition-server.png" src="../_images/sc-acquisition-server.png" style="width: 10cm;" /></a>
<figcaption>
<p><span class="caption-text">Data flow from data centers and stations via plugins to seedlink and the waveform archive
both providing the data to local or remote <cite>SeisComP</cite> modules or other clients.</span><a class="headerlink" href="#id11" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</section>
<section id="access-to-waveform-data">
<h2>Access to Waveform Data<a class="headerlink" href="#access-to-waveform-data" title="Permalink to this heading"></a></h2>
<p><cite>SeisComP</cite> modules can access waveform data from many difference sources,
such as a Seedlink server or an FDSN web service.</p>
<p>In <cite>SeisComP</cite> terminology, the data from these sources are <em>record streams</em>.
Access to the waveform data can be configured by setting an appropriate <a class="reference internal" href="glossary.html#term-RecordStream"><span class="xref std std-term">RecordStream</span></a>.
Read the <a class="reference internal" href="concepts/recordstream.html#concepts-recordstream"><span class="std std-ref">concept description of the RecordStream</span></a>
and <a class="reference internal" href="../apps/global_recordstream.html#global-recordstream"><span class="std std-ref">technical documentation of the various implementations</span></a> for many more details.</p>
<figure class="align-center" id="id12">
<a class="reference internal image-reference" href="../_images/recordstream.png"><img alt="../_images/recordstream.png" src="../_images/recordstream.png" style="width: 10cm;" /></a>
<figcaption>
<p><span class="caption-text">The RecordStream interface provides flexible access to waveform data.</span><a class="headerlink" href="#id12" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Taken together, this design gives <cite>SeisComP</cite> operators much flexibility.
Since messages can be exchanged between different computers, and
waveform data can be obtained from many sources, the different modules
do not all have to be on a single computer.
Multiple operators can connect to a single <cite>SeisComP</cite> installation from their own computers.</p>
</section>
<section id="station-metadata">
<h2>Station metadata<a class="headerlink" href="#station-metadata" title="Permalink to this heading"></a></h2>
<p>By <a class="reference internal" href="glossary.html#term-inventory"><span class="xref std std-term">inventory</span></a> we mean all information about seismic streams and stations
that is needed for processing the raw data obtained from sensors.
They are therefore also referred to as <em>station metadata</em>.
Read the <a class="reference internal" href="concepts/inventory.html#concepts-inventory"><span class="std std-ref">concepts section on inventory</span></a> for more details
on formats and configuration in <cite>SeisComP</cite>.</p>
<p>Inventories include</p>
<ul class="simple">
<li><p>Names and time periods of networks, stations, locations and streams (epochs)</p></li>
<li><p>Sample rates</p></li>
<li><p>Instrument responses (sensor and data logger)</p></li>
<li><p>Station and sensor coordinates</p></li>
</ul>
<p>and other essential information.
Today there are some common formats to store metadata:</p>
<ul class="simple">
<li><p>FDSN StationXML</p></li>
<li><p><cite>SeisComP</cite> inventory</p></li>
<li><p>Dataless SEED - the old <em>de facto</em> standard</p></li>
<li><p>ArcLink XML.</p></li>
</ul>
<p>Dataless SEED can be imported to, and exported from, <cite>SeisComP</cite> if needed.</p>
<p>You can get inventory information from various public sources including
<span id="id4"><em>EIDA</em> [<a class="reference internal" href="references.html#id103" title="EIDA. European Integrated Data Archive, Orfeus. URL: https://www.orfeus-eu.org/data/eida/.">4</a>]</span> or <span id="id5"><em>IRIS</em> [<a class="reference internal" href="references.html#id138" title="IRIS. Incorporated Research Institutions for Seismology. URL: https://www.iris.edu.">13</a>]</span> and many more. <span id="id6"><em>SMP</em> [<a class="reference internal" href="references.html#id268" title="SMP. Station Management Portal by gempa GmbH. URL: https://smp.gempa.de/.">22</a>]</span> allows you to
create and share meta data from your own
station network and to export an inventory in <a class="reference internal" href="glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> format.</p>
<p>Inventories for all considered recording stations need to be imported
into <cite>SeisComP</cite>. and loaded into its database, before data can be processed.
There are various tools to do this.
The tools are described in the inventory section of this documentation.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>In order to process data streams, the inventory must provide complete response information
for all the streams AND must match the <a class="reference internal" href="glossary.html#term-binding"><span class="xref std std-term">bindings</span></a> configuration.</p>
</div>
</section>
<section id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this heading"></a></h2>
<p>The basics of configuring a <cite>SeisComP</cite> system are described in the
<a class="reference internal" href="concepts/configuration.html#concepts-configuration"><span class="std std-ref">concepts section</span></a>. The <a class="reference internal" href="tutorials.html#tutorials"><span class="std std-ref">Tutorials</span></a> of this
documentation provide step-by-step recipes. The modules documentation explains
the modules functioning, their configuration and command-line parameters and
give additional examples and links to related topics.</p>
</section>
<section id="what-next">
<h2>What next?<a class="headerlink" href="#what-next" title="Permalink to this heading"></a></h2>
<p>The following <a class="reference internal" href="installation.html#installation"><span class="std std-ref">SeisComP Installation</span></a> section of this manual will help you install <cite>SeisComP</cite>.
You will then need to obtain some inventory and a source of waveform data.
Configure bindings, enable the processing modules, and restart <cite>SeisComP</cite>.
If all has gone well, you should see some stations as colorful triangles in
<a class="reference internal" href="../apps/scmv.html#scmv"><span class="std std-ref">scmv</span></a>,
and their traces in
<a class="reference internal" href="../apps/scrttv.html#scrttv"><span class="std std-ref">scrttv</span></a>.</p>
<p>Eventually, your new <cite>SeisComP</cite> system will pick and create origins,
should a locatable <a class="reference internal" href="glossary.html#term-event"><span class="xref std std-term">seismic event</span></a> take place while it
is running.</p>
</section>
<section id="where-to-go-for-more-help">
<h2>Where to Go for More Help<a class="headerlink" href="#where-to-go-for-more-help" title="Permalink to this heading"></a></h2>
<p>The <a class="reference internal" href="tutorials/help.html#tutorials-help"><span class="std std-ref">tutorial on help</span></a> provides comprehensive list of options
to get help on <cite>SeisComP</cite>.
Most <cite>SeisComP</cite> modules have built-in help messages and descriptive HTML
documentation. Read the <a class="reference internal" href="tutorials/help.html#tutorials-help"><span class="std std-ref">tutorial on help</span></a> for a neat
introduction.</p>
<p>There are other sources of information beyond this documentation. The
<span id="id7"><em>SeisComP forum</em> [<a class="reference internal" href="references.html#id256" title="SeisComP forum. GFZ. URL: https://forum.seiscomp.de/.">24</a>]</span> has many useful contributions from the community.
You are encouraged to register and post your own questions and comments there.</p>
<p>Professional support including installation, training courses, maintenance,
module development and modification is provided world-wide by
<a class="reference external" href="https://www.gempa.de/">gempa GmbH</a> <span id="id8">[<a class="reference internal" href="references.html#id122" title="gempa GmbH. The SeisComP development and maintenance company. URL: https://www.gempa.de/.">28</a>]</span>, a
software company out-sourced from GFZ and founded by the main <cite>SeisComP</cite>
developers.</p>
<p>Enjoy <cite>SeisComP</cite>!</p>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Overview</a><ul>
<li><a class="reference internal" href="#modular-structure">Modular structure</a><ul>
<li><a class="reference internal" href="#data-acquisition-modules">Data acquisition modules</a></li>
<li><a class="reference internal" href="#automatic-processing-modules">Automatic processing modules</a></li>
<li><a class="reference internal" href="#interactive-modules">Interactive modules</a></li>
<li><a class="reference internal" href="#inventory-modules">Inventory modules</a></li>
<li><a class="reference internal" href="#utility-modules">Utility modules</a></li>
</ul>
</li>
<li><a class="reference internal" href="#communication-and-database-access">Communication and database access</a></li>
<li><a class="reference internal" href="#waveform-data">Waveform data</a></li>
<li><a class="reference internal" href="#access-to-waveform-data">Access to Waveform Data</a></li>
<li><a class="reference internal" href="#station-metadata">Station metadata</a></li>
<li><a class="reference internal" href="#configuration">Configuration</a></li>
<li><a class="reference internal" href="#what-next">What next?</a></li>
<li><a class="reference internal" href="#where-to-go-for-more-help">Where to Go for More Help</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="introduction.html"
title="previous chapter">Introduction and Scope</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="history.html"
title="next chapter">Historical Information</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/overview.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,464 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>References &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Change Log" href="changelog.html" />
<link rel="prev" title="Citation" href="citation.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="changelog.html" title="Change Log"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="citation.html" title="Citation"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="references">
<span id="sec-references"></span><h1>References<a class="headerlink" href="#references" title="Permalink to this heading"></a></h1>
<div class="docutils container" id="id1">
<div role="list" class="citation-list">
<div class="citation" id="id258" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></span>
<p>Seiscomp on github. URL: <a class="reference external" href="https://github.com/SeisComP">https://github.com/SeisComP</a>.</p>
</div>
<div class="citation" id="id89" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></span>
<p>Affero General Public License. GNU. URL: <a class="reference external" href="https://www.gnu.org/licenses/agpl-3.0.html">https://www.gnu.org/licenses/agpl-3.0.html</a>.</p>
</div>
<div class="citation" id="id91" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></span>
<p>CAPS. gempa module. URL: <a class="reference external" href="https://docs.gempa.de/caps/current/index.html">https://docs.gempa.de/caps/current/index.html</a>.</p>
</div>
<div class="citation" id="id103" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>4<span class="fn-bracket">]</span></span>
<p>EIDA. European Integrated Data Archive, Orfeus. URL: <a class="reference external" href="https://www.orfeus-eu.org/data/eida/">https://www.orfeus-eu.org/data/eida/</a>.</p>
</div>
<div class="citation" id="id111" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></span>
<p>FDSN Web Service Specifications. International Federation of Digital Seismograph Networks. URL: <a class="reference external" href="http://www.fdsn.org/webservices/FDSN-WS-Specifications-1.2.pdf">http://www.fdsn.org/webservices/FDSN-WS-Specifications-1.2.pdf</a>.</p>
</div>
<div class="citation" id="id112" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>6<span class="fn-bracket">]</span></span>
<p>FDSN data centers. International Federation of Digital Seismograph Networks. URL: <a class="reference external" href="https://www.fdsn.org/webservices/datacenters/">https://www.fdsn.org/webservices/datacenters/</a>.</p>
</div>
<div class="citation" id="id115" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>7<span class="fn-bracket">]</span></span>
<p>FDSNWS scripts. SeisComP. URL: <a class="reference external" href="https://www.seiscomp.de/seiscomp3/doc/applications/fdsnws_scripts.html">https://www.seiscomp.de/seiscomp3/doc/applications/fdsnws_scripts.html</a>.</p>
</div>
<div class="citation" id="id110" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>8<span class="fn-bracket">]</span></span>
<p>FDSNWS. International Federation of Digital Seismograph Networks. URL: <a class="reference external" href="http://www.fdsn.org/webservices/">http://www.fdsn.org/webservices/</a>.</p>
</div>
<div class="citation" id="id123" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>9<span class="fn-bracket">]</span></span>
<p>GEOFON. GFZ German Resarch Center for Geosciences. URL: <a class="reference external" href="https://geofon.gfz-potsdam.de/">https://geofon.gfz-potsdam.de/</a>.</p>
</div>
<div class="citation" id="id126" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>10<span class="fn-bracket">]</span></span>
<p>GITEWS. German-Indonesian Tsunami Early Warning System for the Indian Ocean. URL: <a class="reference external" href="https://www.gitews.org/en/homepage/">https://www.gitews.org/en/homepage/</a>.</p>
</div>
<div class="citation" id="id142" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>11<span class="fn-bracket">]</span></span>
<p>IPGP. URL: <a class="reference external" href="http://www.ipgp.fr">http://www.ipgp.fr</a>.</p>
</div>
<div class="citation" id="id139" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>12<span class="fn-bracket">]</span></span>
<p>IRIS DMC. FDSNWS availability Web Service Documentation. URL: <a class="reference external" href="https://service.iris.edu/fdsnws/availability/1/">https://service.iris.edu/fdsnws/availability/1/</a>.</p>
</div>
<div class="citation" id="id138" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>13<span class="fn-bracket">]</span></span>
<p>IRIS. Incorporated Research Institutions for Seismology. URL: <a class="reference external" href="https://www.iris.edu">https://www.iris.edu</a>.</p>
</div>
<div class="citation" id="id140" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>14<span class="fn-bracket">]</span></span>
<p>ISC. International Seismological Centre. URL: <a class="reference external" href="http://www.isc.ac.uk/">http://www.isc.ac.uk/</a>.</p>
</div>
<div class="citation" id="id152" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>15<span class="fn-bracket">]</span></span>
<p>Installing SeisComP on MacOS. Gilles' sysadmin &amp; dev blog for Earth Science. URL: <a class="reference external" href="https://gilles.ecgs.lu/seiscomp-for-mac-compilation-instructions/">https://gilles.ecgs.lu/seiscomp-for-mac-compilation-instructions/</a>.</p>
</div>
<div class="citation" id="id148" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>16<span class="fn-bracket">]</span></span>
<p>Libslink. SeedLink client library written in C. URL: <a class="reference external" href="https://ds.iris.edu/ds/nodes/dmc/software/downloads/libslink/">https://ds.iris.edu/ds/nodes/dmc/software/downloads/libslink/</a>.</p>
</div>
<div class="citation" id="id173" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>17<span class="fn-bracket">]</span></span>
<p>Natural Resources Canada (NRCAN), Earthquakes Canada. URL: <a class="reference external" href="https://earthquakescanada.nrcan.gc.ca/index-en.php">https://earthquakescanada.nrcan.gc.ca/index-en.php</a>.</p>
</div>
<div class="citation" id="id179" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>18<span class="fn-bracket">]</span></span>
<p>OVSM, Interreg Caraibes. URL: <a class="reference external" href="https://www.interreg-caraibes.com">https://www.interreg-caraibes.com</a>.</p>
</div>
<div class="citation" id="id178" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>19<span class="fn-bracket">]</span></span>
<p>Orfeus. Observatories &amp; Research Facilities for European Seismology. URL: <a class="reference external" href="https://www.orfeus-eu.org/">https://www.orfeus-eu.org/</a>.</p>
</div>
<div class="citation" id="id124" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>20<span class="fn-bracket">]</span></span>
<p>Public download site of gempa. URL: <a class="reference external" href="https://data.gempa.de/packages/Public/seiscomp/">https://data.gempa.de/packages/Public/seiscomp/</a>.</p>
</div>
<div class="citation" id="id186" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>21<span class="fn-bracket">]</span></span>
<p>Publishsubscribe pattern. Wikipedia. URL: <a class="reference external" href="https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern">https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern</a>.</p>
</div>
<div class="citation" id="id268" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>22<span class="fn-bracket">]</span></span>
<p>SMP. Station Management Portal by gempa GmbH. URL: <a class="reference external" href="https://smp.gempa.de/">https://smp.gempa.de/</a>.</p>
</div>
<div class="citation" id="id280" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>23<span class="fn-bracket">]</span></span>
<p>SeisComP UML diagram. GEOFON. URL: <a class="reference external" href="https://geofon.gfz-potsdam.de/_uml_new/">https://geofon.gfz-potsdam.de/_uml_new/</a>.</p>
</div>
<div class="citation" id="id256" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>24<span class="fn-bracket">]</span></span>
<p>SeisComP forum. GFZ. URL: <a class="reference external" href="https://forum.seiscomp.de/">https://forum.seiscomp.de/</a>.</p>
</div>
<div class="citation" id="id274" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>25<span class="fn-bracket">]</span></span>
<p>TauP. Toolkit for seismic travel times. URL: <a class="reference external" href="https://www.seis.sc.edu/taup/">https://www.seis.sc.edu/taup/</a>.</p>
</div>
<div class="citation" id="id287" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>26<span class="fn-bracket">]</span></span>
<p>WebDC3. Documentation. URL: <a class="reference external" href="https://webdc3.readthedocs.io/">https://webdc3.readthedocs.io/</a>.</p>
</div>
<div class="citation" id="id94" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>27<span class="fn-bracket">]</span></span>
<p>capstool. gempa plugin. URL: <a class="reference external" href="https://docs.gempa.de/caps/current/apps/capstool.html">https://docs.gempa.de/caps/current/apps/capstool.html</a>.</p>
</div>
<div class="citation" id="id122" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>28<span class="fn-bracket">]</span></span>
<p>gempa GmbH. The SeisComP development and maintenance company. URL: <a class="reference external" href="https://www.gempa.de/">https://www.gempa.de/</a>.</p>
</div>
<div class="citation" id="id129" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>29<span class="fn-bracket">]</span></span>
<p>gsm - gempa software management tool. gempa solution. URL: <a class="reference external" href="https://data.gempa.de/packages/Public/gsm/">https://data.gempa.de/packages/Public/gsm/</a>.</p>
</div>
<div class="citation" id="id253" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>30<span class="fn-bracket">]</span></span>
<p>seedlink. Real-time waveform server. URL: <a class="reference external" href="https://docs.gempa.de/seiscomp/current/apps/seedlink.html">https://docs.gempa.de/seiscomp/current/apps/seedlink.html</a>.</p>
</div>
<div class="citation" id="id252" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>31<span class="fn-bracket">]</span></span>
<p>SEED Reference Manual. USGS, 2012. URL: <a class="reference external" href="http://www.fdsn.org/pdf/SEEDManual_V2.4.pdf">http://www.fdsn.org/pdf/SEEDManual_V2.4.pdf</a>.</p>
</div>
<div class="citation" id="id147" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>32<span class="fn-bracket">]</span></span>
<p>libmseed - The miniSEED data format library. GitHub, 2017. URL: <a class="reference external" href="https://github.com/EarthScope/libmseed/wiki">https://github.com/EarthScope/libmseed/wiki</a>.</p>
</div>
<div class="citation" id="id9" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>33<span class="fn-bracket">]</span></span>
<p>M.K. Bolton, D.A. Storchak, and J. Harris. Updating default depth in the isc bulletin. <em>Phys. Earth Planet. Int.</em>, 1:27 45, 2006. <a class="reference external" href="https://doi.org/10.1016/j.pepi.2006.03.004">doi:10.1016/j.pepi.2006.03.004</a>.</p>
</div>
<div class="citation" id="id12" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>34<span class="fn-bracket">]</span></span>
<p>I. Bondár and K.L. McLaughlin. A new ground truth data set for seismic studies. <em>Seismol. Res. Lett.</em>, 3:465 472, 2009. <a class="reference external" href="https://doi.org/10.1785/gssrl.80.3.465">doi:10.1785/gssrl.80.3.465</a>.</p>
</div>
<div class="citation" id="id13" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>35<span class="fn-bracket">]</span></span>
<p>I. Bondár and K.L. McLaughlin. Seismic location bias and uncertainty in the presence of correlated and non-gaussian travel-time errors. <em>Bull. Seismol. Soc. Am.</em>, 1:172 193, 2009. <a class="reference external" href="https://doi.org/10.1785/0120080922">doi:10.1785/0120080922</a>.</p>
</div>
<div class="citation" id="id16" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>36<span class="fn-bracket">]</span></span>
<p>I. Bondár, P. Mónus, C. Czanik, M. Kiszely, Z. Gráczer, Z. Wéber, and the AlpArrayWorking Group. Relocation of Seismicity in the Pannonian Basin Using a Global 3D Velocity Model. <em>Seismol. Res. Lett.</em>, 6:2284 2293, 2018. <a class="reference external" href="https://doi.org/10.1785/0220180143">doi:10.1785/0220180143</a>.</p>
</div>
<div class="citation" id="id14" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>37<span class="fn-bracket">]</span></span>
<p>I. Bondár and D. Storchak. Improved location procedures at the International Seismological Centre. <em>Geophys. J. Int.</em>, 3:1220 1244, 2011. <a class="reference external" href="https://doi.org/10.1111/j.1365-246X.2011.05107.x">doi:10.1111/j.1365-246X.2011.05107.x</a>.</p>
</div>
<div class="citation" id="id18" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>38<span class="fn-bracket">]</span></span>
<p>P. Bormann and J. Saul. The new iaspei standard broadband magnitude mb. <em>Seismol. Res. Lett.</em>, 5:698 705, 2008. <a class="reference external" href="https://doi.org/10.1785/gssrl.79.5.698">doi:10.1785/gssrl.79.5.698</a>.</p>
</div>
<div class="citation" id="id19" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>39<span class="fn-bracket">]</span></span>
<p>P. Bormann and J. Saul. A Fast, Non-saturating Magnitude Estimator for Great Earthquakes. <em>Seismol. Res. Lett.</em>, 80(5):808 816, 2009. <a class="reference external" href="https://doi.org/10.1785/gssrl.80.5.808">doi:10.1785/gssrl.80.5.808</a>.</p>
</div>
<div class="citation" id="id17" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>40<span class="fn-bracket">]</span></span>
<p>P. Bormann and K. Wylegalla. Quick estimator of the size of great earthquakes. <em>EOS</em>, 86(46):464, 2005.</p>
</div>
<div class="citation" id="id20" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>41<span class="fn-bracket">]</span></span>
<p>S.R. Bratt and T.C. Bache. Locating events with a sparse network of regional arrays. <em>Bull. Seismol. Soc. Am.</em>, 78(2):780 798, 1988. URL: <a class="reference external" href="https://pubs.geoscienceworld.org/ssa/bssa/article-pdf/78/2/780/5334120/bssa0780020780.pdf">https://pubs.geoscienceworld.org/ssa/bssa/article-pdf/78/2/780/5334120/bssa0780020780.pdf</a>, <a class="reference external" href="https://doi.org/10.1785/BSSA0780020780">doi:10.1785/BSSA0780020780</a>.</p>
</div>
<div class="citation" id="id21" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>42<span class="fn-bracket">]</span></span>
<p>S.R. Bratt and W. Nagy. The LocSAT Program. <em>Science Applications International Corporation (SAIC), San Diego</em>, 1991.</p>
</div>
<div class="citation" id="id36" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>43<span class="fn-bracket">]</span></span>
<p>B. Gutenberg and C.F. Richter. Magnitude and Energy of Earthquakes. <em>Annals of Geophysics</em>, 9(1):1 15, 1956. URL: <a class="reference external" href="https://resolver.caltech.edu/CaltechAUTHORS:20140130-105324849">https://resolver.caltech.edu/CaltechAUTHORS:20140130-105324849</a>, <a class="reference external" href="https://doi.org/10.4401/ag-5590">doi:10.4401/ag-5590</a>.</p>
</div>
<div class="citation" id="id38" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>44<span class="fn-bracket">]</span></span>
<p>S. Hiemer and D. Roessler. Monitoring the West Bohemian earthquake swarm in 2008/2009 by a temporary small-aperture seismic array. <em>J. Seismol.</em>, 16:169182, 2012. <a class="reference external" href="https://doi.org/10.1007/s10950-011-9256-5">doi:10.1007/s10950-011-9256-5</a>.</p>
</div>
<div class="citation" id="id39" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>45<span class="fn-bracket">]</span></span>
<p>L.K. Hutton and D.M. Boore. The ML scale in southern California. <em>Bull. Seismol. Soc. Am,</em>, 77(6):20742094, 1987. URL: <a class="reference external" href="https://resolver.caltech.edu/CaltechAUTHORS:20140905-113510505">https://resolver.caltech.edu/CaltechAUTHORS:20140905-113510505</a>.</p>
</div>
<div class="citation" id="id40" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>46<span class="fn-bracket">]</span></span>
<p>IASPEI. Summary of magnitude working group recommendations on standard procedures for determining earthquake magnitudes from digital data. <em>IASPEI Website</em>, 2013. URL: <a class="reference external" href="http://www.iaspei.org/commissions/commission-on-seismological-observation-and-interpretation/Summary_WG_recommendations_20130327.pdf">http://www.iaspei.org/commissions/commission-on-seismological-observation-and-interpretation/Summary_WG_recommendations_20130327.pdf</a>.</p>
</div>
<div class="citation" id="id41" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>47<span class="fn-bracket">]</span></span>
<p>T.H. Jordan and K.A. Sverdrup. Teleseismic location techniques and their application to earthquake clusters in the south-central pacific. <em>Bull. Seismol. Soc. Am.</em>, 4:1105 1130, 1981. <a class="reference external" href="https://doi.org/10.1785/BSSA0710041105">doi:10.1785/BSSA0710041105</a>.</p>
</div>
<div class="citation" id="id42" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>48<span class="fn-bracket">]</span></span>
<p>A. Jurkevics. Polarization analysis of three-component array data. <em>Bull. Seismol. Soc. Am.</em>, 78(5):17251743, 1988. <a class="reference external" href="https://doi.org/10.1785/BSSA0710041105">doi:10.1785/BSSA0710041105</a>.</p>
</div>
<div class="citation" id="id44" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>49<span class="fn-bracket">]</span></span>
<p>A. Katsumata. Comparison of Magnitudes Estimated by the Japan Meteorological Agency with Moment Magnitudes for Intermediate and Deep Earthquakes. <em>Bull. Seism. Soc.</em>, 86(3):832 842, 1996.</p>
</div>
<div class="citation" id="id47" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>50<span class="fn-bracket">]</span></span>
<p>F.W. Klein. Users guide to HYPOINVERSE-2000, a Fortran program to solve for earthquake locations and magnitudes. <em>US Geological Survey</em>, 2002-171:, 2002. URL: <a class="reference external" href="https://www.usgs.gov/node/279394">https://www.usgs.gov/node/279394</a>, <a class="reference external" href="https://doi.org/10.3133/ofr02171">doi:10.3133/ofr02171</a>.</p>
</div>
<div class="citation" id="id51" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>51<span class="fn-bracket">]</span></span>
<p>W.H. Lee and J.C. Lahr. Hypo71 (revised): a computer program for determining local earthquake hypocentral parameters, magnitude, and first motion pattern of local earthquakes. <em>US Geol. Survey Open-file Report 75-311</em>, 1975. URL: <a class="reference external" href="https://pubs.er.usgs.gov/publication/ofr75311">https://pubs.er.usgs.gov/publication/ofr75311</a>, <a class="reference external" href="https://doi.org/10.3133/ofr75311">doi:10.3133/ofr75311</a>.</p>
</div>
<div class="citation" id="id171" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>52<span class="fn-bracket">]</span></span>
<p>A. Lomax. The NonLinLoc Software Guide. Manual. URL: <a class="reference external" href="http://alomax.free.fr/nlloc/">http://alomax.free.fr/nlloc/</a>.</p>
</div>
<div class="citation" id="id58" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>53<span class="fn-bracket">]</span></span>
<p>O.W. Nuttli. Seismic wave attenuation and magnitude relations for eastern north america. <em>J. Geophys. Res.</em>, 5:876 885, 1973. <a class="reference external" href="https://doi.org/10.1029/JB078i005p00876">doi:10.1029/JB078i005p00876</a>.</p>
</div>
<div class="citation" id="id59" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>54<span class="fn-bracket">]</span></span>
<p>C. Paige and M. Saunders. Lsqr: an algorithm for sparse linear equations and sparse least squares. <em>ACM Transactions on Mathematical Software</em>, 1:43 71, 1982. <a class="reference external" href="https://doi.org/10.1145/355984.355989">doi:10.1145/355984.355989</a>.</p>
</div>
<div class="citation" id="id60" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>55<span class="fn-bracket">]</span></span>
<p>G.L. Pavlis, F. Vernon, D. Harvey, and D. Quinlan. Lsqr: an algorithm for sparse linear equations and sparse least squares. <em>ACM Transactions on Mathematical Software</em>, 1:43 71, 1982. <a class="reference external" href="https://doi.org/10.1145/355984.355989">doi:10.1145/355984.355989</a>.</p>
</div>
<div class="citation" id="id72" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>56<span class="fn-bracket">]</span></span>
<p>D.A. Rhoades, A. Christophersen, S. Bourguignon, J. Ristau, and J. Salichon. A DepthDependent Local Magnitude Scale for New Zealand Earthquakes Consistent with Moment Magnitude. <em>Bull. Seismol. Soc. Am.</em>, 111(2):10561066, 2020. <a class="reference external" href="https://doi.org/10.1785/0120200252">doi:10.1785/0120200252</a>.</p>
</div>
<div class="citation" id="id62" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>57<span class="fn-bracket">]</span></span>
<p>C.F. Richter. An instrumental earthquake magnitude scale. <em>Bull. Seismol. Soc. Am.</em>, 1:1 32, 1935. URL: <a class="reference external" href="https://resolver.caltech.edu/CaltechAUTHORS:20140804-143558638">https://resolver.caltech.edu/CaltechAUTHORS:20140804-143558638</a>, <a class="reference external" href="https://doi.org/10.1785/BSSA0250010001">doi:10.1785/BSSA0250010001</a>.</p>
</div>
<div class="citation" id="id64" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>58<span class="fn-bracket">]</span></span>
<p>J. Ristau, D. Harte, and J. Salichon. A Revised Local Magnitude (ML) Scale for New Zealand Earthquakes. <em>Bull. Seismol. Soc. Am.</em>, 106(2):, 2016. <a class="reference external" href="https://doi.org/10.1785/0120150293">doi:10.1785/0120150293</a>.</p>
</div>
<div class="citation" id="id70" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>59<span class="fn-bracket">]</span></span>
<p>J.L. Rosenberger and M. Gasko. Comparing location estimators: trimmed means, medians, and trimean. In D.C. Hoaglin, F. Mosteller, and J.W. Tukey, editors, <em>Understanding Robust and Exploratory Data Analysis</em>, pages 297336. Wiley, New York, NY, 1983.</p>
</div>
<div class="citation" id="id73" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>60<span class="fn-bracket">]</span></span>
<p>M. Sambridge. Geophysical inversion with a neighbourhood algorithm. I. Searching the parameter space. <em>Geophys. J. Int.</em>, 2:479 494, 1999. <a class="reference external" href="https://doi.org/10.1046/j.1365-246X.1999.00876.x">doi:10.1046/j.1365-246X.1999.00876.x</a>.</p>
</div>
<div class="citation" id="id74" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>61<span class="fn-bracket">]</span></span>
<p>M. Sambridge and B.L.N. Kennett. Seismic event location: non-linear inversion using a neighbourhood algorithm. <em>Pure and Applied Geophysics</em>, 151(1):241 257, 2001. <a class="reference external" href="https://doi.org/10.1007/PL00001158">doi:10.1007/PL00001158</a>.</p>
</div>
<div class="citation" id="id78" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>62<span class="fn-bracket">]</span></span>
<p>S. Stange. ML determination for local and regional events using a sparse network in Southwestern Germany. <em>J. Seismol.</em>, 10:247 257, 2006. <a class="reference external" href="https://doi.org/10.1007/s10950-006-9010-6">doi:10.1007/s10950-006-9010-6</a>.</p>
</div>
<div class="citation" id="id79" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>63<span class="fn-bracket">]</span></span>
<p>S. Tsuboi, K. Abe, K. Takano, and Y. Yamanaka. Rapid determination of Mw from broadband P waveforms. <em>Bull. Seismol. Soc. Am.</em>, 1995. <a class="reference external" href="https://doi.org/10.1785/BSSA0850020606">doi:10.1785/BSSA0850020606</a>.</p>
</div>
<div class="citation" id="id81" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>64<span class="fn-bracket">]</span></span>
<p>R.A. Uhrhammer and E.R. Collins. Synthesis of Wood-Anderson seismograms from broadband digital records. <em>Bull. Seismol. Soc. Am.</em>, 80(3):702716, 1990. <a class="reference external" href="https://doi.org/10.1785/BSSA0800030702">doi:10.1785/BSSA0800030702</a>.</p>
</div>
<div class="citation" id="id85" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>65<span class="fn-bracket">]</span></span>
<p>P.M. Whitmore, S. Tsuboi, B. Hirshorn, and T.J. Sokolowski. Magnitude dependent correction for Mwp. <em>Science of Tsunami Hazards</em>, 20(4):, 2002.</p>
</div>
<div class="citation" id="id86" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>66<span class="fn-bracket">]</span></span>
<p>J.B. Young, B.W. Presgrave, H. Aichele, D.A. Wiens, and E.A. Flinn. The Flinn-Engdahl Regionalisation Scheme: The 1995 revision. <em>Phys. Earth Planet. Int.</em>, 96:223 297, 1996. <a class="reference external" href="https://doi.org/10.1016/0031-9201(96)03141-X">doi:10.1016/0031-9201(96)03141-X</a>.</p>
</div>
<div class="citation" id="id257" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>67<span class="fn-bracket">]</span></span>
<p>Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH. The SeisComP seismological software package. GFZ Data Services. 2008. URL: <a class="reference external" href="https://www.seiscomp.de">https://www.seiscomp.de</a>, <a class="reference external" href="https://doi.org/10.5880/GFZ.2.4.2020.003">doi:10.5880/GFZ.2.4.2020.003</a>.</p>
</div>
</div>
</div>
<p>Potentially uncited but relevant sources of information include:</p>
<section id="iloc">
<h2><a class="reference internal" href="../apps/global_iloc.html#global-iloc"><span class="std std-ref">iLoc</span></a><a class="headerlink" href="#iloc" title="Permalink to this heading"></a></h2>
<ol class="arabic simple">
<li><p>Bondár, I., K. McLaughlin and H. Israelsson, Improved event location uncertainty
estimates, Science Applications International Corp., Final Report,
AFRL-RV-HA-TR-2008-1074, 2008.</p></li>
<li><p>Bondár, I. and K. McLaughlin, Seismic location bias and uncertainty in the presence
of correlated and non-Gaussian travel-time errors, Bull. Seism. Soc. Am., 99,
172-193, doi:10.1785/0120080922, 2009.</p></li>
<li><p>Bondár, I., E.R. Engdahl, A. Villasenor, J.Harris and D. Storchak, ISC-GEM:
Global instrumental earthquake catalogue (1900-2009), II. Location and seismicity
patterns, Phys. Earth. Planet. Int., doi: 10.1016/j.pepi.2014.06.002, 239, 2-13, 2015.</p></li>
<li><p>Buland, R. and C.H. Chapman, 1983. The computation of seismic travel times,
Bull. Seism. Soc. Am., 73, 1271-1302.</p></li>
<li><p>Dziewonski, A.M. and F. Gilbert, 1976, The effect of small, aspherical perturbations
on travel times and a re-examination of the correction for ellipticity,
Geophys., J. R. Astr. Soc., 44, 7-17.</p></li>
<li><p>Engdahl, E.R., R. van der Hilst, and R. Buland, 1998. Global teleseismic earthquake
relocation with improved travel times and procedures for depth determination,
Bull. Seism. Soc. Am., 88, 722-743.</p></li>
<li><p>Kennett, B. and Engdahl, E.R., 1991. Travel times for global earthquake location
and phase identification, Geophys. J. Int., 105, 429465.</p></li>
<li><p>Kennett, B.L.N., E.R. Engdahl, and R. Buland, 1995. Constraints on seismic velocities
in the Earth from traveltimes, Geophys. J. Int., 122, 108-124.</p></li>
<li><p>Kennett, B.L.N. and O. Gudmundsson, 1996, Ellipticity corrections for seismic
phases, Geophys. J. Int., 127, 40-48.</p></li>
<li><p>Myers, S.C, M.L. Begnaud, S. Ballard, M.E. Pasyanos, W.S. Phillips, A.L. Ramirez,
M.S. Antolik, K.D. Hutchenson, J. Dwyer, C. A. Rowe, and G. S. Wagner, 2010,
A crust and upper mantle model of Eurasia and North Africa for Pn travel time
calculation, Bull. Seism. Soc. Am., 100, 640-656.</p></li>
<li><p>Weber, B., Bondár, I., Roessler, D., Becker, J., SeisComP3 iLoc Integration
Applied to Array Processing, SnT conference, Abstract: T3.5-P54, Vienna/Austria,
2019,
<a class="reference external" href="https://events.ctbto.org/sites/default/files/2020-05/20190614-2019%20Book%20Of%20Abstracts%20Web%20Version%20with%20front%20cover%20-%20edited.pdf">abstract: T3.5-P54</a></p></li>
</ol>
</section>
<section id="fixedhypocenter">
<h2><a class="reference internal" href="../apps/global_fixedhypocenter.html#global-fixedhypocenter"><span class="std std-ref">FixedHypocenter</span></a><a class="headerlink" href="#fixedhypocenter" title="Permalink to this heading"></a></h2>
<ol class="arabic simple">
<li><p>R. Le Bras, J. Wuster (2002). IDC Processing of Seismic, Hydroacoustic,
and Infrasonic Data [IDC5.2.1Rev1]. Angewandte Wissenschaft, Software und
Technologie GmbH.</p></li>
<li><p>J.F. Evernden (1969). Precision of epicenters obtained by small numbers of
world-wide stations. Bull. Seism. Soc. Am., 59(3), 1365-1398.</p></li>
<li><p>E.A. Flinn (1965). Confidence regions and error determinations for seismic
event location. Rev. Geophys., 3(1), 157-185.</p></li>
</ol>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">References</a><ul>
<li><a class="reference internal" href="#iloc"><span class="xref std std-ref">iLoc</span></a></li>
<li><a class="reference internal" href="#fixedhypocenter"><span class="xref std std-ref">FixedHypocenter</span></a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="citation.html"
title="previous chapter">Citation</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="changelog.html"
title="next chapter">Change Log</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/references.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,758 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Examples &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Getting the Source Code" href="build.html" />
<link rel="prev" title="seiscomp.client" href="api-python-client.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="build.html" title="Getting the Source Code"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="api-python-client.html" title="seiscomp.client"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="sdk.html" >Software Development Kit</a>
</li>
<li class="nav-item nav-item-2">
<a href="sdk-python.html" accesskey="U">Python</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="examples">
<span id="sdk-python-examples"></span><h1>Examples<a class="headerlink" href="#examples" title="Permalink to this heading"></a></h1>
<section id="simple-messaging-client">
<h2>Simple messaging client<a class="headerlink" href="#simple-messaging-client" title="Permalink to this heading"></a></h2>
<section id="summary">
<h3>Summary<a class="headerlink" href="#summary" title="Permalink to this heading"></a></h3>
<p>Example client that connects to the messaging, listens for event
objects and dumps the event IDs.</p>
</section>
<section id="goal">
<h3>Goal<a class="headerlink" href="#goal" title="Permalink to this heading"></a></h3>
<p>Illustrate the basic messaging concepts.</p>
</section>
<section id="script">
<h3>Script<a class="headerlink" href="#script" title="Permalink to this heading"></a></h3>
<p>This script was demonstrated at the <cite>SeisComP</cite> workshop in Erice. It should be
relatively self-explanatory, but full understanding does require certain knowlege
of Python.</p>
<p>The script does nothing but</p>
<ul class="simple">
<li><p>connect to a <cite>SeisComP</cite> messaging server</p></li>
<li><p>subscribe to messages sent to messaging group “EVENT”</p></li>
<li><p>listen to these messages</p></li>
<li><p>dump the event IDs to the screen</p></li>
</ul>
<section id="event-listener-py">
<h4>event-listener.py<a class="headerlink" href="#event-listener-py" title="Permalink to this heading"></a></h4>
<p>No actual real-world use case but a truly minimum example for a <cite>SeisComP</cite> application.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env seiscomp-python</span>
<span class="c1"># -*- coding: utf-8 -*-</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">traceback</span>
<span class="kn">from</span> <span class="nn">seiscomp</span> <span class="kn">import</span> <span class="n">client</span><span class="p">,</span> <span class="n">datamodel</span>
<span class="kn">from</span> <span class="nn">seiscomp.client</span> <span class="kn">import</span> <span class="n">Protocol</span>
<span class="k">class</span> <span class="nc">EventListener</span><span class="p">(</span><span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">):</span>
<span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setMessagingEnabled</span><span class="p">(</span><span class="kc">True</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setDatabaseEnabled</span><span class="p">(</span><span class="kc">False</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setPrimaryMessagingGroup</span><span class="p">(</span><span class="n">Protocol</span><span class="o">.</span><span class="n">LISTENER_GROUP</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">addMessagingSubscription</span><span class="p">(</span><span class="s2">&quot;EVENT&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setLoggingToStdErr</span><span class="p">(</span><span class="kc">True</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">doSomethingWithEvent</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
<span class="k">try</span><span class="p">:</span>
<span class="c1">#################################</span>
<span class="c1"># Include your custom code here #</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;event.publicID = </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">publicID</span><span class="p">()))</span>
<span class="c1">#################################</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="n">traceback</span><span class="o">.</span><span class="n">print_exc</span><span class="p">()</span>
<span class="k">def</span> <span class="nf">updateObject</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parentID</span><span class="p">,</span> <span class="n">scobject</span><span class="p">):</span>
<span class="c1"># called if an updated object is received</span>
<span class="n">event</span> <span class="o">=</span> <span class="n">datamodel</span><span class="o">.</span><span class="n">Event</span><span class="o">.</span><span class="n">Cast</span><span class="p">(</span><span class="n">scobject</span><span class="p">)</span>
<span class="k">if</span> <span class="n">event</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;received update for event </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">publicID</span><span class="p">()))</span>
<span class="bp">self</span><span class="o">.</span><span class="n">doSomethingWithEvent</span><span class="p">(</span><span class="n">event</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">addObject</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parentID</span><span class="p">,</span> <span class="n">scobject</span><span class="p">):</span>
<span class="c1"># called if a new object is received</span>
<span class="n">event</span> <span class="o">=</span> <span class="n">datamodel</span><span class="o">.</span><span class="n">Event</span><span class="o">.</span><span class="n">Cast</span><span class="p">(</span><span class="n">scobject</span><span class="p">)</span>
<span class="k">if</span> <span class="n">event</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;received new event </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">publicID</span><span class="p">()))</span>
<span class="bp">self</span><span class="o">.</span><span class="n">doSomethingWithEvent</span><span class="p">(</span><span class="n">event</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="c1"># does not need to be reimplemented. it is just done to illustrate</span>
<span class="c1"># how to override methods</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Hi! The EventListener is now running.&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
<span class="n">app</span> <span class="o">=</span> <span class="n">EventListener</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">),</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">)</span>
<span class="k">return</span> <span class="n">app</span><span class="p">()</span>
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="n">main</span><span class="p">())</span>
</pre></div>
</div>
<p>Note that the EventListener class is derived from the application class
seiscomp.client.Application from which it inherits most of the functionality.
For instance the ability to connect to the messaging and to the database are
both provided by seiscomp.client.Application; the EventListener only has to
enable messaging and database usage in the __init__ routine. The real action
takes place in the doSomethingWithEvent routine, which is called by both
updateObject and addObject, depending on whether the event object received is a
newly added or just and updated event.</p>
</section>
</section>
</section>
<section id="inventory-examples">
<h2>Inventory examples<a class="headerlink" href="#inventory-examples" title="Permalink to this heading"></a></h2>
<section id="id1">
<h3>Summary<a class="headerlink" href="#id1" title="Permalink to this heading"></a></h3>
<p>Various Python example scripts that retrieve inventory information from the
database.</p>
</section>
<section id="id2">
<h3>Goal<a class="headerlink" href="#id2" title="Permalink to this heading"></a></h3>
<p>Illustrate the usefulness of simple Python scripts to retrieve inventory
information.</p>
</section>
<section id="scripts">
<h3>Scripts<a class="headerlink" href="#scripts" title="Permalink to this heading"></a></h3>
<p>The scripts in this section all deal with inventory access. All need to be
invoked with the command-line <code class="docutils literal notranslate"><span class="pre">-d</span></code> option to specify the <cite>SeisComP</cite> database
from which the information is to be read. For example:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>configured-streams.py<span class="w"> </span>-d<span class="w"> </span>localhost
</pre></div>
</div>
<section id="configured-streams-py">
<h4>configured-streams.py<a class="headerlink" href="#configured-streams-py" title="Permalink to this heading"></a></h4>
<p>Print a list of all streams configured on a <cite>SeisComP</cite> system.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env seiscomp-python</span>
<span class="c1"># -*- coding: utf-8 -*-</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">traceback</span>
<span class="kn">from</span> <span class="nn">seiscomp</span> <span class="kn">import</span> <span class="n">core</span><span class="p">,</span> <span class="n">client</span><span class="p">,</span> <span class="n">datamodel</span>
<span class="k">class</span> <span class="nc">ListStreamsApp</span><span class="p">(</span><span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">):</span>
<span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setMessagingEnabled</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setDatabaseEnabled</span><span class="p">(</span><span class="kc">True</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setLoggingToStdErr</span><span class="p">(</span><span class="kc">True</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setDaemonEnabled</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
<span class="c1"># self.setLoadInventoryEnabled(True)</span>
<span class="k">def</span> <span class="nf">validateParameters</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="o">.</span><span class="n">validateParameters</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="n">traceback</span><span class="o">.</span><span class="n">print_exc</span><span class="p">()</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">dbr</span> <span class="o">=</span> <span class="n">datamodel</span><span class="o">.</span><span class="n">DatabaseReader</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">database</span><span class="p">())</span>
<span class="n">now</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">Time</span><span class="o">.</span><span class="n">GMT</span><span class="p">()</span>
<span class="n">inv</span> <span class="o">=</span> <span class="n">datamodel</span><span class="o">.</span><span class="n">Inventory</span><span class="p">()</span>
<span class="n">dbr</span><span class="o">.</span><span class="n">loadNetworks</span><span class="p">(</span><span class="n">inv</span><span class="p">)</span>
<span class="n">result</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">inet</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">inv</span><span class="o">.</span><span class="n">networkCount</span><span class="p">()):</span>
<span class="n">network</span> <span class="o">=</span> <span class="n">inv</span><span class="o">.</span><span class="n">network</span><span class="p">(</span><span class="n">inet</span><span class="p">)</span>
<span class="n">dbr</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">network</span><span class="p">)</span>
<span class="k">for</span> <span class="n">ista</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">network</span><span class="o">.</span><span class="n">stationCount</span><span class="p">()):</span>
<span class="n">station</span> <span class="o">=</span> <span class="n">network</span><span class="o">.</span><span class="n">station</span><span class="p">(</span><span class="n">ista</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">start</span> <span class="o">=</span> <span class="n">station</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="k">continue</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">end</span> <span class="o">=</span> <span class="n">station</span><span class="o">.</span><span class="n">end</span><span class="p">()</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">start</span> <span class="o">&lt;=</span> <span class="n">now</span> <span class="o">&lt;=</span> <span class="n">end</span><span class="p">:</span>
<span class="k">continue</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="k">pass</span>
<span class="k">for</span> <span class="n">iloc</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">station</span><span class="o">.</span><span class="n">sensorLocationCount</span><span class="p">()):</span>
<span class="n">location</span> <span class="o">=</span> <span class="n">station</span><span class="o">.</span><span class="n">sensorLocation</span><span class="p">(</span><span class="n">iloc</span><span class="p">)</span>
<span class="k">for</span> <span class="n">istr</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">location</span><span class="o">.</span><span class="n">streamCount</span><span class="p">()):</span>
<span class="n">stream</span> <span class="o">=</span> <span class="n">location</span><span class="o">.</span><span class="n">stream</span><span class="p">(</span><span class="n">istr</span><span class="p">)</span>
<span class="n">result</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">network</span><span class="o">.</span><span class="n">code</span><span class="p">(),</span> <span class="n">station</span><span class="o">.</span><span class="n">code</span><span class="p">(),</span>
<span class="n">location</span><span class="o">.</span><span class="n">code</span><span class="p">(),</span> <span class="n">stream</span><span class="o">.</span><span class="n">code</span><span class="p">()))</span>
<span class="k">for</span> <span class="n">net</span><span class="p">,</span> <span class="n">sta</span><span class="p">,</span> <span class="n">loc</span><span class="p">,</span> <span class="n">cha</span> <span class="ow">in</span> <span class="n">result</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">{:2}</span><span class="s2"> </span><span class="si">{:5}</span><span class="s2"> </span><span class="si">{:2}</span><span class="s2"> </span><span class="si">{:3}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">net</span><span class="p">,</span> <span class="n">sta</span><span class="p">,</span> <span class="n">loc</span><span class="p">,</span> <span class="n">cha</span><span class="p">))</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="n">traceback</span><span class="o">.</span><span class="n">print_exc</span><span class="p">()</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
<span class="n">app</span> <span class="o">=</span> <span class="n">ListStreamsApp</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">),</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">)</span>
<span class="k">return</span> <span class="n">app</span><span class="p">()</span>
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="n">main</span><span class="p">())</span>
</pre></div>
</div>
</section>
<section id="station-coordinates-py">
<h4>station-coordinates.py<a class="headerlink" href="#station-coordinates-py" title="Permalink to this heading"></a></h4>
<p>Print the coordinates of all stations configured on a <cite>SeisComP</cite> system.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env seiscomp-python</span>
<span class="c1"># -*- coding: utf-8 -*-</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">traceback</span>
<span class="kn">from</span> <span class="nn">seiscomp</span> <span class="kn">import</span> <span class="n">core</span><span class="p">,</span> <span class="n">client</span><span class="p">,</span> <span class="n">datamodel</span>
<span class="k">class</span> <span class="nc">InvApp</span><span class="p">(</span><span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">):</span>
<span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setMessagingEnabled</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setDatabaseEnabled</span><span class="p">(</span><span class="kc">True</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setLoggingToStdErr</span><span class="p">(</span><span class="kc">True</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">validateParameters</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="o">.</span><span class="n">validateParameters</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">False</span><span class="p">:</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="n">traceback</span><span class="o">.</span><span class="n">print_exc</span><span class="p">()</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">now</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">Time</span><span class="o">.</span><span class="n">GMT</span><span class="p">()</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">lines</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">dbr</span> <span class="o">=</span> <span class="n">datamodel</span><span class="o">.</span><span class="n">DatabaseReader</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">database</span><span class="p">())</span>
<span class="n">inv</span> <span class="o">=</span> <span class="n">datamodel</span><span class="o">.</span><span class="n">Inventory</span><span class="p">()</span>
<span class="n">dbr</span><span class="o">.</span><span class="n">loadNetworks</span><span class="p">(</span><span class="n">inv</span><span class="p">)</span>
<span class="n">nnet</span> <span class="o">=</span> <span class="n">inv</span><span class="o">.</span><span class="n">networkCount</span><span class="p">()</span>
<span class="k">for</span> <span class="n">inet</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">nnet</span><span class="p">):</span>
<span class="n">net</span> <span class="o">=</span> <span class="n">inv</span><span class="o">.</span><span class="n">network</span><span class="p">(</span><span class="n">inet</span><span class="p">)</span>
<span class="n">dbr</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">net</span><span class="p">)</span>
<span class="n">nsta</span> <span class="o">=</span> <span class="n">net</span><span class="o">.</span><span class="n">stationCount</span><span class="p">()</span>
<span class="k">for</span> <span class="n">ista</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">nsta</span><span class="p">):</span>
<span class="n">sta</span> <span class="o">=</span> <span class="n">net</span><span class="o">.</span><span class="n">station</span><span class="p">(</span><span class="n">ista</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">elev</span> <span class="o">=</span> <span class="n">sta</span><span class="o">.</span><span class="n">elevation</span><span class="p">()</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="n">elev</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="s2">&quot;NaN&quot;</span><span class="p">)</span>
<span class="n">line</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">{:2}</span><span class="s2"> </span><span class="si">{:5}</span><span class="s2"> </span><span class="si">{:9.4f}</span><span class="s2"> </span><span class="si">{:9.4f}</span><span class="s2"> </span><span class="si">{:6.1f}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
<span class="n">net</span><span class="o">.</span><span class="n">code</span><span class="p">(),</span> <span class="n">sta</span><span class="o">.</span><span class="n">code</span><span class="p">(),</span> <span class="n">sta</span><span class="o">.</span><span class="n">latitude</span><span class="p">(),</span> <span class="n">sta</span><span class="o">.</span><span class="n">longitude</span><span class="p">(),</span> <span class="n">elev</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">start</span> <span class="o">=</span> <span class="n">sta</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="k">continue</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">end</span> <span class="o">=</span> <span class="n">sta</span><span class="o">.</span><span class="n">end</span><span class="p">()</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">start</span> <span class="o">&lt;=</span> <span class="n">now</span> <span class="o">&lt;=</span> <span class="n">end</span><span class="p">:</span>
<span class="k">continue</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="k">pass</span>
<span class="n">lines</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
<span class="n">lines</span><span class="o">.</span><span class="n">sort</span><span class="p">()</span>
<span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">line</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">lines</span><span class="p">):</span>
<span class="nb">print</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">line</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="n">traceback</span><span class="o">.</span><span class="n">print_exc</span><span class="p">()</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
<span class="n">app</span> <span class="o">=</span> <span class="n">InvApp</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">),</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">)</span>
<span class="k">return</span> <span class="n">app</span><span class="p">()</span>
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="n">main</span><span class="p">())</span>
</pre></div>
</div>
</section>
<section id="channel-gains-py">
<h4>channel-gains.py<a class="headerlink" href="#channel-gains-py" title="Permalink to this heading"></a></h4>
<p>Print channel gains for all streams configured on a <cite>SeisComP</cite> system.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env seiscomp-python</span>
<span class="c1"># -*- coding: utf-8 -*-</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">traceback</span>
<span class="kn">from</span> <span class="nn">seiscomp</span> <span class="kn">import</span> <span class="n">core</span><span class="p">,</span> <span class="n">client</span><span class="p">,</span> <span class="n">datamodel</span>
<span class="k">class</span> <span class="nc">InvApp</span><span class="p">(</span><span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">):</span>
<span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setMessagingEnabled</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setDatabaseEnabled</span><span class="p">(</span><span class="kc">True</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setLoggingToStdErr</span><span class="p">(</span><span class="kc">True</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">validateParameters</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">client</span><span class="o">.</span><span class="n">Application</span><span class="o">.</span><span class="n">validateParameters</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="n">traceback</span><span class="o">.</span><span class="n">print_exc</span><span class="p">()</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">now</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">Time</span><span class="o">.</span><span class="n">GMT</span><span class="p">()</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">lines</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">dbq</span> <span class="o">=</span> <span class="n">datamodel</span><span class="o">.</span><span class="n">DatabaseQuery</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">database</span><span class="p">())</span>
<span class="n">inv</span> <span class="o">=</span> <span class="n">datamodel</span><span class="o">.</span><span class="n">Inventory</span><span class="p">()</span>
<span class="n">dbq</span><span class="o">.</span><span class="n">loadNetworks</span><span class="p">(</span><span class="n">inv</span><span class="p">)</span>
<span class="n">nnet</span> <span class="o">=</span> <span class="n">inv</span><span class="o">.</span><span class="n">networkCount</span><span class="p">()</span>
<span class="k">for</span> <span class="n">inet</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">nnet</span><span class="p">):</span>
<span class="n">network</span> <span class="o">=</span> <span class="n">inv</span><span class="o">.</span><span class="n">network</span><span class="p">(</span><span class="n">inet</span><span class="p">)</span>
<span class="n">sys</span><span class="o">.</span><span class="n">stderr</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\r</span><span class="s2">working on network </span><span class="si">{:2}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">network</span><span class="o">.</span><span class="n">code</span><span class="p">()))</span>
<span class="n">dbq</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">network</span><span class="p">)</span>
<span class="n">nsta</span> <span class="o">=</span> <span class="n">network</span><span class="o">.</span><span class="n">stationCount</span><span class="p">()</span>
<span class="k">for</span> <span class="n">ista</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">nsta</span><span class="p">):</span>
<span class="n">station</span> <span class="o">=</span> <span class="n">network</span><span class="o">.</span><span class="n">station</span><span class="p">(</span><span class="n">ista</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">start</span> <span class="o">=</span> <span class="n">station</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="k">continue</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">end</span> <span class="o">=</span> <span class="n">station</span><span class="o">.</span><span class="n">end</span><span class="p">()</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">start</span> <span class="o">&lt;=</span> <span class="n">now</span> <span class="o">&lt;=</span> <span class="n">end</span><span class="p">:</span>
<span class="k">continue</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="k">pass</span>
<span class="c1"># now we know that this is an operational station</span>
<span class="k">for</span> <span class="n">iloc</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">station</span><span class="o">.</span><span class="n">sensorLocationCount</span><span class="p">()):</span>
<span class="n">location</span> <span class="o">=</span> <span class="n">station</span><span class="o">.</span><span class="n">sensorLocation</span><span class="p">(</span><span class="n">iloc</span><span class="p">)</span>
<span class="k">for</span> <span class="n">istr</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">location</span><span class="o">.</span><span class="n">streamCount</span><span class="p">()):</span>
<span class="n">stream</span> <span class="o">=</span> <span class="n">location</span><span class="o">.</span><span class="n">stream</span><span class="p">(</span><span class="n">istr</span><span class="p">)</span>
<span class="n">line</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">{:2}</span><span class="s2"> </span><span class="si">{:5}</span><span class="s2"> </span><span class="si">{:2}</span><span class="s2"> </span><span class="si">{:3}</span><span class="s2"> </span><span class="si">{:g}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
<span class="n">network</span><span class="o">.</span><span class="n">code</span><span class="p">(),</span> <span class="n">station</span><span class="o">.</span><span class="n">code</span><span class="p">(),</span> <span class="n">location</span><span class="o">.</span><span class="n">code</span><span class="p">(),</span>
<span class="n">stream</span><span class="o">.</span><span class="n">code</span><span class="p">(),</span> <span class="n">stream</span><span class="o">.</span><span class="n">gain</span><span class="p">())</span>
<span class="n">lines</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
<span class="n">lines</span><span class="o">.</span><span class="n">sort</span><span class="p">()</span>
<span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">lines</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="n">traceback</span><span class="o">.</span><span class="n">print_exc</span><span class="p">()</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
<span class="n">app</span> <span class="o">=</span> <span class="n">InvApp</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">),</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">)</span>
<span class="k">return</span> <span class="n">app</span><span class="p">()</span>
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="n">main</span><span class="p">())</span>
</pre></div>
</div>
</section>
</section>
</section>
<section id="simple-waveform-client">
<h2>Simple waveform client<a class="headerlink" href="#simple-waveform-client" title="Permalink to this heading"></a></h2>
<section id="id3">
<h3>Summary<a class="headerlink" href="#id3" title="Permalink to this heading"></a></h3>
<p>Example client that connects to a RecordStream service and dumps the content
to stdout.</p>
</section>
<section id="id4">
<h3>Goal<a class="headerlink" href="#id4" title="Permalink to this heading"></a></h3>
<p>Illustrate the basic RecordStream concepts.</p>
</section>
<section id="id5">
<h3>Script<a class="headerlink" href="#id5" title="Permalink to this heading"></a></h3>
<section id="waveform-client-py">
<h4>waveform-client.py<a class="headerlink" href="#waveform-client-py" title="Permalink to this heading"></a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env seiscomp-python</span>
<span class="c1"># -*- coding: utf-8 -*-</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">from</span> <span class="nn">seiscomp</span> <span class="kn">import</span> <span class="n">core</span><span class="p">,</span> <span class="n">client</span>
<span class="k">class</span> <span class="nc">App</span><span class="p">(</span><span class="n">client</span><span class="o">.</span><span class="n">StreamApplication</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">):</span>
<span class="n">client</span><span class="o">.</span><span class="n">StreamApplication</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">)</span>
<span class="c1"># Do not connect to messaging and do not use database at all</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setMessagingEnabled</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setDatabaseEnabled</span><span class="p">(</span><span class="kc">False</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">init</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">client</span><span class="o">.</span><span class="n">StreamApplication</span><span class="o">.</span><span class="n">init</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="c1"># For testing purposes we subscribe to the last 5 minutes of data.</span>
<span class="c1"># To use real-time data, do not define an end time and configure</span>
<span class="c1"># a real-time capable backend such as Seedlink.</span>
<span class="c1"># First, query now</span>
<span class="n">now</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">Time</span><span class="o">.</span><span class="n">GMT</span><span class="p">()</span>
<span class="c1"># Substract 5 minutes for the start time</span>
<span class="n">start</span> <span class="o">=</span> <span class="n">now</span> <span class="o">-</span> <span class="n">core</span><span class="o">.</span><span class="n">TimeSpan</span><span class="p">(</span><span class="mi">300</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="c1"># Set the start time in our RecordStream</span>
<span class="bp">self</span><span class="o">.</span><span class="n">recordStream</span><span class="p">()</span><span class="o">.</span><span class="n">setStartTime</span><span class="p">(</span><span class="n">start</span><span class="p">)</span>
<span class="c1"># And the end time</span>
<span class="bp">self</span><span class="o">.</span><span class="n">recordStream</span><span class="p">()</span><span class="o">.</span><span class="n">setEndTime</span><span class="p">(</span><span class="n">now</span><span class="p">)</span>
<span class="c1"># Now add some streams to fetch</span>
<span class="bp">self</span><span class="o">.</span><span class="n">recordStream</span><span class="p">()</span><span class="o">.</span><span class="n">addStream</span><span class="p">(</span><span class="s2">&quot;GE&quot;</span><span class="p">,</span> <span class="s2">&quot;MORC&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="s2">&quot;BHZ&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">recordStream</span><span class="p">()</span><span class="o">.</span><span class="n">addStream</span><span class="p">(</span><span class="s2">&quot;GE&quot;</span><span class="p">,</span> <span class="s2">&quot;MORC&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="s2">&quot;BHN&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="c1"># handleRecord is called when a new record is being read from the</span>
<span class="c1"># RecordStream</span>
<span class="k">def</span> <span class="nf">handleRecord</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">rec</span><span class="p">):</span>
<span class="c1"># Print the streamID which is a join of NSLC separated with &#39;.&#39;</span>
<span class="nb">print</span><span class="p">(</span><span class="n">rec</span><span class="o">.</span><span class="n">streamID</span><span class="p">())</span>
<span class="c1"># Print the records start time in ISO format</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">{:s}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">rec</span><span class="o">.</span><span class="n">startTime</span><span class="p">()</span><span class="o">.</span><span class="n">iso</span><span class="p">()))</span>
<span class="c1"># Print the sampling frequency</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">{:f}</span><span class="s2"> Hz&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">rec</span><span class="o">.</span><span class="n">samplingFrequency</span><span class="p">()))</span>
<span class="c1"># If data is available</span>
<span class="k">if</span> <span class="n">rec</span><span class="o">.</span><span class="n">data</span><span class="p">():</span>
<span class="c1"># Print the number of samples</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot; </span><span class="si">{:d}</span><span class="s2"> samples&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">rec</span><span class="o">.</span><span class="n">data</span><span class="p">()</span><span class="o">.</span><span class="n">size</span><span class="p">()))</span>
<span class="c1"># Try to extract a float array. If the samples are of other</span>
<span class="c1"># data types, use rec.dataType() to query the type and use</span>
<span class="c1"># the appropriate array classes.</span>
<span class="n">data</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">FloatArray</span><span class="o">.</span><span class="n">Cast</span><span class="p">(</span><span class="n">rec</span><span class="o">.</span><span class="n">data</span><span class="p">())</span>
<span class="c1"># Print the samples</span>
<span class="k">if</span> <span class="n">data</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot; data: </span><span class="si">{:s}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="nb">str</span><span class="p">([</span><span class="n">data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">data</span><span class="o">.</span><span class="n">size</span><span class="p">())])))</span>
<span class="k">else</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot; no data&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
<span class="n">app</span> <span class="o">=</span> <span class="n">App</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">),</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">)</span>
<span class="k">return</span> <span class="n">app</span><span class="p">()</span>
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="n">main</span><span class="p">())</span>
</pre></div>
</div>
<p>The command-line option <code class="docutils literal notranslate"><span class="pre">-I</span></code> can be used to configure the record
stream backend when running the test application.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>testrec.py<span class="w"> </span>-I<span class="w"> </span>slink://localhost:18000
</pre></div>
</div>
<p>or to ask Arclink for data</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>testrec.py<span class="w"> </span>-I<span class="w"> </span>arclink://localhost:18001
</pre></div>
</div>
</section>
</section>
</section>
<section id="waveform-client-and-record-filtering">
<h2>Waveform client and record filtering<a class="headerlink" href="#waveform-client-and-record-filtering" title="Permalink to this heading"></a></h2>
<section id="id6">
<h3>Summary<a class="headerlink" href="#id6" title="Permalink to this heading"></a></h3>
<p>Example client that connects to a RecordStream service, filters the records
with a given <cite>SeisComP</cite> filter and dumps the content to stdout.</p>
</section>
<section id="id7">
<h3>Goal<a class="headerlink" href="#id7" title="Permalink to this heading"></a></h3>
<p>Illustrate the recordfilter concepts.</p>
</section>
<section id="id8">
<h3>Script<a class="headerlink" href="#id8" title="Permalink to this heading"></a></h3>
<section id="waveform-filter-py">
<h4>waveform-filter.py<a class="headerlink" href="#waveform-filter-py" title="Permalink to this heading"></a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env seiscomp-python</span>
<span class="c1"># -*- coding: utf-8 -*-</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">from</span> <span class="nn">seiscomp</span> <span class="kn">import</span> <span class="n">core</span><span class="p">,</span> <span class="n">client</span><span class="p">,</span> <span class="n">io</span><span class="p">,</span> <span class="n">math</span><span class="p">,</span> <span class="n">logging</span>
<span class="k">class</span> <span class="nc">App</span><span class="p">(</span><span class="n">client</span><span class="o">.</span><span class="n">StreamApplication</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">):</span>
<span class="n">client</span><span class="o">.</span><span class="n">StreamApplication</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">)</span>
<span class="c1"># Do not connect to messaging and do not use database at all</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setMessagingEnabled</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setDatabaseEnabled</span><span class="p">(</span><span class="kc">False</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">init</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">client</span><span class="o">.</span><span class="n">StreamApplication</span><span class="o">.</span><span class="n">init</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="c1"># For testing purposes we subscribe to the last 5 minutes of data.</span>
<span class="c1"># To use real-time data, do not define an end time and configure</span>
<span class="c1"># a real-time capable backend such as Seedlink.</span>
<span class="c1"># First, query now</span>
<span class="n">now</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">Time</span><span class="o">.</span><span class="n">GMT</span><span class="p">()</span>
<span class="c1"># Substract 5 minutes for the start time</span>
<span class="n">start</span> <span class="o">=</span> <span class="n">now</span> <span class="o">-</span> <span class="n">core</span><span class="o">.</span><span class="n">TimeSpan</span><span class="p">(</span><span class="mi">300</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="c1"># Set the start time in our RecordStream</span>
<span class="bp">self</span><span class="o">.</span><span class="n">recordStream</span><span class="p">()</span><span class="o">.</span><span class="n">setStartTime</span><span class="p">(</span><span class="n">start</span><span class="p">)</span>
<span class="c1"># And the end time</span>
<span class="bp">self</span><span class="o">.</span><span class="n">recordStream</span><span class="p">()</span><span class="o">.</span><span class="n">setEndTime</span><span class="p">(</span><span class="n">now</span><span class="p">)</span>
<span class="c1"># Now add some streams to fetch</span>
<span class="bp">self</span><span class="o">.</span><span class="n">recordStream</span><span class="p">()</span><span class="o">.</span><span class="n">addStream</span><span class="p">(</span><span class="s2">&quot;GE&quot;</span><span class="p">,</span> <span class="s2">&quot;MORC&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="s2">&quot;BHZ&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">recordStream</span><span class="p">()</span><span class="o">.</span><span class="n">addStream</span><span class="p">(</span><span class="s2">&quot;GE&quot;</span><span class="p">,</span> <span class="s2">&quot;MORC&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="s2">&quot;BHN&quot;</span><span class="p">)</span>
<span class="c1"># Create IIR filter instance that deals with data (samples)</span>
<span class="n">filterIIR</span> <span class="o">=</span> <span class="n">math</span><span class="o">.</span><span class="n">InPlaceFilterF</span><span class="o">.</span><span class="n">Create</span><span class="p">(</span><span class="s2">&quot;BW(4,1,10&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">filterIIR</span><span class="p">:</span>
<span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;Failed to create filter&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="c1"># Create a record filter that applies the given IIR filter to</span>
<span class="c1"># each record fed. Deals with gaps and sps changes on record basis.</span>
<span class="bp">self</span><span class="o">.</span><span class="n">recordFilter</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">RecordIIRFilterF</span><span class="p">(</span><span class="n">filterIIR</span><span class="p">)</span>
<span class="c1"># Demultiplexes record volumes and runs the passed filter</span>
<span class="c1"># on each stream.</span>
<span class="bp">self</span><span class="o">.</span><span class="n">demuxer</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">RecordDemuxFilter</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">recordFilter</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="c1"># handleRecord is called when a new record is being read from the</span>
<span class="c1"># RecordStream</span>
<span class="k">def</span> <span class="nf">handleRecord</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">raw_rec</span><span class="p">):</span>
<span class="c1"># Feed the raw record into the demuxer and filter it</span>
<span class="n">rec</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">demuxer</span><span class="o">.</span><span class="n">feed</span><span class="p">(</span><span class="n">raw_rec</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">rec</span><span class="p">:</span>
<span class="k">return</span>
<span class="c1"># Print the streamID which is a join of NSLC separated with &#39;.&#39;</span>
<span class="nb">print</span><span class="p">(</span><span class="n">rec</span><span class="o">.</span><span class="n">streamID</span><span class="p">())</span>
<span class="c1"># Print the records start time in ISO format</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot; </span><span class="si">{:s}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">rec</span><span class="o">.</span><span class="n">startTime</span><span class="p">()</span><span class="o">.</span><span class="n">iso</span><span class="p">()))</span>
<span class="c1"># Print the sampling frequency</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot; </span><span class="si">{:f}</span><span class="s2"> Hz&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">rec</span><span class="o">.</span><span class="n">samplingFrequency</span><span class="p">()))</span>
<span class="c1"># If data is available</span>
<span class="k">if</span> <span class="n">rec</span><span class="o">.</span><span class="n">data</span><span class="p">():</span>
<span class="c1"># Print the number of samples</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot; </span><span class="si">{:d}</span><span class="s2"> samples&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">rec</span><span class="o">.</span><span class="n">data</span><span class="p">()</span><span class="o">.</span><span class="n">size</span><span class="p">()))</span>
<span class="c1"># Try to extract a float array. If the samples are of other</span>
<span class="c1"># data types, use rec.dataType() to query the type and use</span>
<span class="c1"># the appropriate array classes.</span>
<span class="n">data</span> <span class="o">=</span> <span class="n">core</span><span class="o">.</span><span class="n">FloatArray</span><span class="o">.</span><span class="n">Cast</span><span class="p">(</span><span class="n">rec</span><span class="o">.</span><span class="n">data</span><span class="p">())</span>
<span class="c1"># Print the samples</span>
<span class="k">if</span> <span class="n">data</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot; data: </span><span class="si">{:s}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="nb">str</span><span class="p">([</span><span class="n">data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">data</span><span class="o">.</span><span class="n">size</span><span class="p">())])))</span>
<span class="k">else</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot; no data&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
<span class="n">app</span> <span class="o">=</span> <span class="n">App</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">),</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">)</span>
<span class="k">return</span> <span class="n">app</span><span class="p">()</span>
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="n">main</span><span class="p">())</span>
</pre></div>
</div>
</section>
</section>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Examples</a><ul>
<li><a class="reference internal" href="#simple-messaging-client">Simple messaging client</a><ul>
<li><a class="reference internal" href="#summary">Summary</a></li>
<li><a class="reference internal" href="#goal">Goal</a></li>
<li><a class="reference internal" href="#script">Script</a><ul>
<li><a class="reference internal" href="#event-listener-py">event-listener.py</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#inventory-examples">Inventory examples</a><ul>
<li><a class="reference internal" href="#id1">Summary</a></li>
<li><a class="reference internal" href="#id2">Goal</a></li>
<li><a class="reference internal" href="#scripts">Scripts</a><ul>
<li><a class="reference internal" href="#configured-streams-py">configured-streams.py</a></li>
<li><a class="reference internal" href="#station-coordinates-py">station-coordinates.py</a></li>
<li><a class="reference internal" href="#channel-gains-py">channel-gains.py</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#simple-waveform-client">Simple waveform client</a><ul>
<li><a class="reference internal" href="#id3">Summary</a></li>
<li><a class="reference internal" href="#id4">Goal</a></li>
<li><a class="reference internal" href="#id5">Script</a><ul>
<li><a class="reference internal" href="#waveform-client-py">waveform-client.py</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#waveform-client-and-record-filtering">Waveform client and record filtering</a><ul>
<li><a class="reference internal" href="#id6">Summary</a></li>
<li><a class="reference internal" href="#id7">Goal</a></li>
<li><a class="reference internal" href="#id8">Script</a><ul>
<li><a class="reference internal" href="#waveform-filter-py">waveform-filter.py</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="api-python-client.html"
title="previous chapter">seiscomp.client</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="build.html"
title="next chapter">Getting the Source Code</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/sdk-python-examples.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,572 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Style Guide for Documentation &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Coding Conventions" href="coding-conventions.html" />
<link rel="prev" title="Contributing Documentation" href="contributing-docs.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="coding-conventions.html" title="Coding Conventions"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="contributing-docs.html" title="Contributing Documentation"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="style-guide-for-documentation">
<span id="documentation-style-guide"></span><h1>Style Guide for Documentation<a class="headerlink" href="#style-guide-for-documentation" title="Permalink to this heading"></a></h1>
<section id="file-layout">
<h2>File Layout<a class="headerlink" href="#file-layout" title="Permalink to this heading"></a></h2>
<p>The documentation of an executable module comes as a pair of source files:</p>
<ul class="simple">
<li><p>A description XML file (.xml) giving command details, command-line and configuration parameters,</p></li>
<li><p>A documentation reST text file (.rst) gives a more-detailed module description and examples.</p></li>
</ul>
<p>Any other documentation, e.g. this style guide, tutorials, etc. only require the
documentation reST text file.</p>
<p>The reST text file should follow the guidelines in this style guide.</p>
<p>The <a class="reference internal" href="contributing-docs.html#contributing-documentation"><span class="std std-ref">Contributing Documentation</span></a> section details
the documentation requirements for executables including the structure of description XML files.</p>
</section>
<section id="documentation-syntax">
<h2>Documentation Syntax<a class="headerlink" href="#documentation-syntax" title="Permalink to this heading"></a></h2>
<p>A template for a typical application or module in reST is in <code class="file docutils literal notranslate"><span class="pre">doc/templates/app.rst</span></code>.
An introductory paragraph should describe the purpose of the executable.
The introduction is followed be any additional information needed to understand
the command, introduced with one or more headings.
Add information about testing and examples into their own sections.</p>
<section id="general-principles">
<h3>General principles<a class="headerlink" href="#general-principles" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>If possible, keep line lengths under 80 characters.</p></li>
<li><p>It eases later editing if sentences in the raw RST start on a new
line, even though they will flow together in the finished document.</p></li>
<li><p>It is helpful if long text objects such as HTML link text each
appear on their own line.</p>
</li>
</ul>
</section>
<section id="section-and-headings">
<span id="documentation-style-guide-headings"></span><h3>Section and headings<a class="headerlink" href="#section-and-headings" title="Permalink to this heading"></a></h3>
<p>Module description files do <em>not</em> require top-level headings, as the
build script will take this text and assemble it with other
description information in the appropriate part of the documentation.</p>
<p>While RST doesnt care too much about what syntax is used for
headings, it is best to stick to one style consistently.
Thus, you will generally need only two levels of headings but you can add more.</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Level</p></th>
<th class="head"><p>Mark up beneath heading text</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>1</p></td>
<td><p> ==== </p></td>
</tr>
<tr class="row-odd"><td><p>2</p></td>
<td><p>“ —- “</p></td>
</tr>
<tr class="row-even"><td><p>3</p></td>
<td><p> ~~~~ </p></td>
</tr>
<tr class="row-odd"><td><p>4</p></td>
<td><p> ^^^^ </p></td>
</tr>
</tbody>
</table>
<p>Use Title Case for headings within a section, and make only the first letter uppercase for subheadings.
Higher levels, marked up with asterisks, are used for sections of the documentation.</p>
<p><strong>Example:</strong></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>Level<span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="nv">Title</span>
<span class="o">=============</span>
Some<span class="w"> </span>text.
Level<span class="w"> </span><span class="m">2</span><span class="w"> </span>title
-------------
Some<span class="w"> </span>text
</pre></div>
</div>
<p>Parts such as Examples are marked in <strong>bold</strong>.</p>
<p>However notes and figures should use the appropriate RST directive, and dont require their own headings.</p>
<ul class="simple">
<li><p>One blank line below headings is enough.</p></li>
<li><p>Two lines above are often used, and this looks better than one.</p></li>
</ul>
</section>
<section id="lists">
<h3>Lists<a class="headerlink" href="#lists" title="Permalink to this heading"></a></h3>
<p>Use numbered or unnumbered lists at several levels.</p>
<ul class="simple">
<li><p>Start list items at the first level with a capital letter. End them with a full stop.</p></li>
<li><p>Use lower-case letters for all other levels. End them with a full stop.</p></li>
</ul>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="m">#.</span> Item 1.
<span class="m">#.</span> Item 2.
<span class="m">*</span> subitem 1.
<span class="m">#.</span> subsubitem 1.
<span class="m">#.</span> subsubitem 1.
<span class="m">*</span> subitem 2.
</pre></div>
</div>
<p><strong>Result:</strong></p>
<ol class="arabic simple">
<li><p>Item 1.</p></li>
<li><p>Item 2.</p>
<ul class="simple">
<li><p>subitem 1.</p>
<ol class="loweralpha simple">
<li><p>subsubitem 1.</p></li>
<li><p>subsubitem 2.</p></li>
</ol>
</li>
<li><p>subitem 2.</p></li>
</ul>
</li>
</ol>
</section>
<section id="other-markup-tools-and-conventions">
<h3>Other markup tools and conventions<a class="headerlink" href="#other-markup-tools-and-conventions" title="Permalink to this heading"></a></h3>
<ul>
<li><p><strong>Code fragments:</strong> Use the reST code-block syntax for code fragments, with
flavors like “c”, “python”, “sh”, “bash”, “properties´” or “xml” as appropriate:</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">code-block</span><span class="p">::</span> <span class="k">sh</span>
<span class="ch">#!/bin/bash</span>
<span class="nb">echo</span><span class="w"> </span><span class="nv">$SEISCOMP_ROOT</span>
</pre></div>
</div>
<p>Result:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/bin/bash</span>
<span class="nb">echo</span><span class="w"> </span><span class="nv">$SEISCOMP_ROOT</span>
</pre></div>
</div>
</li>
<li><p><strong>Configuration parameters:</strong> Configuration values have a special
syntax. Use the :confval: indicator for referencing a module configuration
parameter:</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="na">:confval:</span><span class="nv">`logging.level`</span>
</pre></div>
</div>
<p>Using this tag allows a link to be made within the documentation of that module
to the given configuration of the same module. The parameter must be defined
in the description XML file of the module.</p>
</li>
<li><p><strong>Command-line options:</strong> Command-line options have a special
syntax. Use the :option: indicator for referencing an option:</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="na">:option:</span><span class="nv">`--help`</span>
</pre></div>
</div>
<p>The option must be defined in the description XML file of the module.</p>
</li>
<li><p><strong>Configuration files:</strong> Use the reST :file: indicator to refer to files such
as configuration files:</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="na">:file:</span><span class="nv">`$SEISCOMP_ROOT/etc/scautopick.cfg`</span>
</pre></div>
</div>
<p>Result: <code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/etc/scautopick.cfg</span></code></p>
</li>
<li><p><strong>Programs:</strong> Use the reST :program: indicator for <cite>SeisComP</cite> programs:</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="na">:program:</span><span class="nv">`scautopick`</span>
</pre></div>
</div>
<p>Result: <strong class="program">scautopick</strong></p>
</li>
<li><p><strong>References:</strong> Use the reST :ref: indicator for cross referencing <cite>SeisComP</cite>
module documentation pages:</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="na">:ref:</span><span class="nv">`scautopick`</span>
</pre></div>
</div>
<p>Result: <a class="reference internal" href="../apps/scautopick.html#scautopick"><span class="std std-ref">scautopick</span></a></p>
</li>
<li><p><strong>Glossary:</strong> Use the reST :term: indicator for referencing terms in the
<cite>SeisComP</cite> <a class="reference internal" href="glossary.html#glossary"><span class="std std-ref">Glossary</span></a>:</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="na">:term:</span><span class="nv">`magnitude`</span>
</pre></div>
</div>
<p>Result: <a class="reference internal" href="glossary.html#term-magnitude"><span class="xref std std-term">magnitude</span></a></p>
</li>
</ul>
</section>
<section id="internal-links">
<span id="documentation-style-guide-links"></span><h3>Internal links<a class="headerlink" href="#internal-links" title="Permalink to this heading"></a></h3>
<p>Create links to sections and subsections within and to figures the text which can be referenced.
Use unique link names, e.g. including the upper-level section name or the module name.
Use appropriate short names to fit within the texts.</p>
<p>Link within this documentation to the section on headings:</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_documentation_style_guide_headings:</span>
</pre></div>
</div>
<p>Reference:</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="na">:ref:</span><span class="nv">`short name &lt;documentation_style_guide_headings&gt;`</span>
</pre></div>
</div>
<p>Result: <a class="reference internal" href="#documentation-style-guide-headings"><span class="std std-ref">short name</span></a></p>
</section>
<section id="external-links-and-references">
<h3>External links and references<a class="headerlink" href="#external-links-and-references" title="Permalink to this heading"></a></h3>
<p>Preferably you do not show full citations or URLs for literature or
external web sites within the text but make references which
are listed in the section <a class="reference internal" href="references.html#sec-references"><span class="std std-ref">References</span></a>. Procedure:</p>
<ol class="arabic">
<li><p>Add publications, external URLs, etc. as complete citation
entries to the reference list <code class="file docutils literal notranslate"><span class="pre">doc/base/references.bib</span></code>
in the base <cite>SeisComP</cite> <a class="reference internal" href="build.html#build"><span class="std std-ref">repository on Github</span></a>.</p></li>
<li><p>Cite documents within the RST file using the <em>cite</em>
directive</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="na">:cite:p:</span><span class="nv">`seiscomp`</span>
<span class="na">:cite:t:</span><span class="nv">`seiscomp`</span>
</pre></div>
</div>
<p>which results in <span id="id1">[<a class="reference internal" href="references.html#id257" title="Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH. The SeisComP seismological software package. GFZ Data Services. 2008. URL: https://www.seiscomp.de, doi:10.5880/GFZ.2.4.2020.003.">67</a>]</span> and
<span id="id2">Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH [<a class="reference internal" href="references.html#id257" title="Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH. The SeisComP seismological software package. GFZ Data Services. 2008. URL: https://www.seiscomp.de, doi:10.5880/GFZ.2.4.2020.003.">67</a>]</span> within the documentation HTML text.</p>
</li>
</ol>
<p>If you really cannot avoid URLs in RST files, then you may link them to some
text like</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="s">`SeisComP forum </span><span class="si">&lt;https://forum.seiscomp.de/&gt;</span><span class="s">`_</span>
</pre></div>
</div>
<p>resulting in <a class="reference external" href="https://forum.seiscomp.de/">SeisComP forum</a>.</p>
<p>Alternatively you may generate reference in a <em>Reference</em> sections as</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="gh">References</span>
<span class="gh">==========</span>
<span class="p">..</span> <span class="ow">target-notes</span><span class="p">::</span>
<span class="p">..</span> <span class="nt">_`discussion` :</span> https://english.stackexchange.com/questions/65630/you-should-be-well-organised-or-you-should-be-well-organised
</pre></div>
</div>
<p>and then cite it within the text as</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="s">`discussion`_</span>
</pre></div>
</div>
<p>which results in <a class="reference external" href="https://english.stackexchange.com/questions/65630/you-should-be-well-organised-or-you-should-be-well-organised">discussion</a> <a class="footnote-reference brackets" href="#id5" id="id6" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a>.</p>
</section>
<section id="text-boxes">
<h3>Text boxes<a class="headerlink" href="#text-boxes" title="Permalink to this heading"></a></h3>
<p>You may emphasize information within the text as text boxes to stand out at different levels.
Make sensible use of it!</p>
<ul>
<li><p>Hints</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">hint</span><span class="p">::</span>
This adds a useful hint.
</pre></div>
</div>
<p>Result:</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>This adds a useful hint.</p>
</div>
</li>
<li><p>Notes</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">note</span><span class="p">::</span>
This adds an extra note.
</pre></div>
</div>
<p>Result:</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This adds an extra note.</p>
</div>
</li>
<li><p>Alerts</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">caution</span><span class="p">::</span>
This adds a heads-up alert.
</pre></div>
</div>
<p>Result:</p>
<div class="admonition caution">
<p class="admonition-title">Caution</p>
<p>This adds a heads-up alert.</p>
</div>
</li>
<li><p>Warnings</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">warning</span><span class="p">::</span>
This adds an important warning.
</pre></div>
</div>
<p>Result:</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>This adds an important warning.</p>
</div>
</li>
</ul>
</section>
</section>
<section id="english-language">
<h2>English Language<a class="headerlink" href="#english-language" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>SeisComP (capital P), not SeisComP 3 or SC3.</p></li>
<li><p><cite>SeisComP</cite> module names are proper nouns, even though written with lower case.
Thus they do not need an article.</p>
<ul>
<li><p>Correct: “Although <strong class="program">scmaster</strong> receives a message”</p></li>
<li><p>Incorrect: “Although the scmaster receives a message…”</p></li>
</ul>
</li>
</ul>
<p>A sentence may begin with a lower case module name e.g. “scmaster has five modes…”
avoiding this: “The <strong class="program">scmaster</strong> module has…”</p>
<ul>
<li><p>Word separation:</p>
<ul class="simple">
<li><p>Separate words:
base class, wave number, time span</p></li>
<li><p>One word:
aftershock, foreshock, <em>and mainshock too</em>,
bandpass, eigenperiod etc., metadata, standalone, username, workflow, waveform</p></li>
<li><p>Difficult:
high-pass filter; command line; command-line parameter</p></li>
</ul>
</li>
<li><p>Hyphenation for compound adjectives: yes, before a noun; after verb to be is harder.
See the <a class="reference external" href="https://english.stackexchange.com/questions/65630/you-should-be-well-organised-or-you-should-be-well-organised">discussion</a> <a class="footnote-reference brackets" href="#id5" id="id7" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a>, e.g.:</p>
<ul class="simple">
<li><p>Use command-line parameters</p></li>
<li><p>Type on the command line</p></li>
</ul>
</li>
<li><p>Spelling:</p>
<p>Use American English:</p>
<ul class="simple">
<li><p>With z: digitizer, realize, visualize, synchronize, behavior, color.</p></li>
<li><p>With s: license.</p></li>
<li><p>Center, data center.</p></li>
</ul>
</li>
<li><p>Case:</p>
<ul class="simple">
<li><p>SEED, miniSEED (miniSEED in <span id="id3"><em>libmseed - The miniSEED data format library</em> [<a class="reference internal" href="references.html#id147" title="libmseed - The miniSEED data format library. GitHub, 2017. URL: https://github.com/EarthScope/libmseed/wiki.">32</a>]</span>, or MiniSEED,
but Mini-SEED appears in Appendix G of the <span id="id4"><em>SEED Reference Manual</em> [<a class="reference internal" href="references.html#id252" title="SEED Reference Manual. USGS, 2012. URL: http://www.fdsn.org/pdf/SEEDManual_V2.4.pdf.">31</a>]</span>.)</p></li>
<li><p>Ctrl+S for control key plus s.</p></li>
<li><p>MySQL, PostgreSQL, MariaDB</p></li>
</ul>
</li>
<li><p>Abbreviations:</p>
<ul class="simple">
<li><p>e.g., i.e.</p></li>
<li><p>STA, LTA, STA/LTA detector</p></li>
<li><p>TAR file</p></li>
</ul>
</li>
</ul>
</section>
<section id="adding-images">
<span id="documentation-style-guide-images"></span><h2>Adding Images<a class="headerlink" href="#adding-images" title="Permalink to this heading"></a></h2>
<section id="code-implementation">
<h3>Code implementation<a class="headerlink" href="#code-implementation" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>Add images with fixed width.</p></li>
<li><p>Add image captions.</p></li>
<li><p>Store images in a separate directory of below the directory where the
documentation is kept.</p></li>
</ul>
<p>Example for an image which can be enlarge by mouse click:</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">figure</span><span class="p">::</span> media/image.png
<span class="nc">:alt:</span> image one
<span class="nc">:width:</span> 10cm
<span class="nc">:align:</span> center
Image one.
</pre></div>
</div>
<p>Example for images in two columns which cannot be enlarged. Up to 4 columns are possible.
Compare with the <a class="reference internal" href="concepts/configuration.html#concepts-configuration-configs"><span class="std std-ref">concept section on configuration</span></a>:</p>
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">raw</span><span class="p">::</span> html
<span class="nt">&lt;div class=&quot;two column layout&quot;&gt;</span>
<span class="p">..</span> <span class="ow">figure</span><span class="p">::</span> ../media/scconfig_no_bindings.png
<span class="nc">:alt:</span> scconfig: bindings configurations
scconfig modules panel indicating that no bindings can be configured.
<span class="p"> ..</span> <span class="ow">figure</span><span class="p">::</span> ../media/scconfig_has_bindings.png
<span class="nc">:alt:</span> scconfig: no bindings configurations
scconfig modules panel indicating that bindings can be configured.
<span class="p"> ..</span> <span class="ow">raw</span><span class="p">::</span> html
&lt;/div&gt;
</pre></div>
</div>
</section>
<section id="image-style-and-format">
<h3>Image style and format<a class="headerlink" href="#image-style-and-format" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>Images shall be informative.</p></li>
<li><p>Images must not have any offensive or inappropriate content.</p></li>
<li><p>Use PNG format.</p></li>
<li><p>Make the important image details readable at the normal image size without enlargement.</p></li>
<li><p>Images shall be optimized for file size.</p></li>
<li><p>Images should have a frame, e.g. a window frame.</p></li>
<li><p>Avoid private information on images.</p></li>
<li><p>Do not show desktop background unless required.</p></li>
<li><p>Images from <cite>SeisComP</cite> GUIs can be screenshots.</p></li>
<li><p>Do not create screenshots from applications started remotely with X-forwarding.
X-forwarding may distort the application features.</p></li>
</ul>
</section>
</section>
<section id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this heading"></a></h2>
<aside class="footnote-list brackets">
<aside class="footnote brackets" id="id5" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></span>
<span class="backrefs">(<a role="doc-backlink" href="#id6">1</a>,<a role="doc-backlink" href="#id7">2</a>)</span>
<p><a class="reference external" href="https://english.stackexchange.com/questions/65630/you-should-be-well-organised-or-you-should-be-well-organised">https://english.stackexchange.com/questions/65630/you-should-be-well-organised-or-you-should-be-well-organised</a></p>
</aside>
</aside>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Style Guide for Documentation</a><ul>
<li><a class="reference internal" href="#file-layout">File Layout</a></li>
<li><a class="reference internal" href="#documentation-syntax">Documentation Syntax</a><ul>
<li><a class="reference internal" href="#general-principles">General principles</a></li>
<li><a class="reference internal" href="#section-and-headings">Section and headings</a></li>
<li><a class="reference internal" href="#lists">Lists</a></li>
<li><a class="reference internal" href="#other-markup-tools-and-conventions">Other markup tools and conventions</a></li>
<li><a class="reference internal" href="#internal-links">Internal links</a></li>
<li><a class="reference internal" href="#external-links-and-references">External links and references</a></li>
<li><a class="reference internal" href="#text-boxes">Text boxes</a></li>
</ul>
</li>
<li><a class="reference internal" href="#english-language">English Language</a></li>
<li><a class="reference internal" href="#adding-images">Adding Images</a><ul>
<li><a class="reference internal" href="#code-implementation">Code implementation</a></li>
<li><a class="reference internal" href="#image-style-and-format">Image style and format</a></li>
</ul>
</li>
<li><a class="reference internal" href="#references">References</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="contributing-docs.html"
title="previous chapter">Contributing Documentation</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="coding-conventions.html"
title="next chapter">Coding Conventions</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/style-guide.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,382 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Unit Testing &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="prev" title="Coding Conventions" href="coding-conventions.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="coding-conventions.html" title="Coding Conventions"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="unit-testing">
<span id="unittests"></span><h1>Unit Testing<a class="headerlink" href="#unit-testing" title="Permalink to this heading"></a></h1>
<section id="introduction">
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this heading"></a></h2>
<p>From Wikipedia:</p>
<blockquote>
<div><p>In computer programming, unit testing is a software testing method by which
individual units of source code, sets of one or more computer program modules
together with associated control data, usage procedures, and operating
procedures, are tested to determine whether they are fit for use. <a class="footnote-reference brackets" href="#wput" id="id1" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a></p>
</div></blockquote>
<p>This chapter targets programmers, either ones contributing to <cite>SeisComP</cite> or
adding their extended set of modules / libraries.</p>
<p>Since most of the <cite>SeisComP</cite> code is written in C++, this chapter focuses on
C++ unit tests. For C++, we have evaluated three unit test frameworks:</p>
<ul class="simple">
<li><p>CppUnit</p></li>
<li><p>Google Test</p></li>
<li><p>Boost Test</p></li>
</ul>
<p>We found that Boost Test is the most appropriate, flexible and easy to
understand unit test framework. Another important fact was the availability of
Boost Test on all major Linux distributions via their package managers. That
<cite>SeisComP</cite> makes already use of other Boost libraries was the icing on the cake.</p>
<p>So this chapter is about integrating unit tests into <cite>SeisComP</cite> with the Boost Test
library.</p>
<p>Apart from the availability of the Boost test libraries, cmake with version
2.8.0 or greater is also required.</p>
</section>
<section id="preparations">
<h2>Preparations<a class="headerlink" href="#preparations" title="Permalink to this heading"></a></h2>
<p>With CMake it is easy to setup arbitrary tests. To make it even easier, we
added a shortcut to the CMake macro <code class="code docutils literal notranslate"><span class="pre">SC_ADD_LIBRARY</span></code>. It collects all .cpp
files in the directory <code class="code docutils literal notranslate"><span class="pre">${CMAKE_CURRENT_SOURCE_DIR}/test/{libraryname}</span></code>
and creates tests from them.</p>
<p>An example is the <cite>SeisComP</cite> core library. It is located at
<code class="code docutils literal notranslate"><span class="pre">src/base/common/libs/seiscomp</span></code>. Following the above rule, the test files
shall be located in <code class="code docutils literal notranslate"><span class="pre">src/base/common/libs/seiscomp/test/core/*.cpp</span></code>. For each
found source file, the macro will create a test with the same name and link
its executable against the library the tests are built for.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The recommend test file naming is <code class="code docutils literal notranslate"><span class="pre">{class}_{function}.cpp</span></code>.</p>
</div>
</section>
<section id="execution">
<h2>Execution<a class="headerlink" href="#execution" title="Permalink to this heading"></a></h2>
<p>Compiling and running tests is as easy as running</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>make<span class="w"> </span><span class="nb">test</span>
</pre></div>
</div>
<p>in the build directory. Thats it.</p>
</section>
<section id="test-implementation">
<h2>Test implementation<a class="headerlink" href="#test-implementation" title="Permalink to this heading"></a></h2>
<p>The following section shows an example of a simple but in many cases sufficient
test module. This example can be used as a template for an <cite>SeisComP</cite> unit test.</p>
<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="cp">#define SEISCOMP_TEST_MODULE [TestModuleName]</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;seiscomp/unittest/unittests.h&gt;</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;seiscomp/core/datetime.h&gt;</span>
<span class="n">BOOST_AUTO_TEST_SUITE</span><span class="p">([</span><span class="n">domain</span><span class="p">]</span><span class="n">_</span><span class="p">[</span><span class="k">namespace</span><span class="p">]</span><span class="nn">_</span><span class="p">[</span><span class="nn">module</span><span class="p">])</span>
<span class="nn">BOOST_AUTO_TEST_CASE</span><span class="p">(</span><span class="nn">addition</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">Seiscomp</span><span class="o">::</span><span class="n">Core</span><span class="o">::</span><span class="n">TimeSpan</span><span class="w"> </span><span class="n">k</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">7</span><span class="p">;</span>
<span class="w"> </span><span class="n">BOOST_CHECK</span><span class="p">(</span><span class="n">k</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">Seiscomp</span><span class="o">::</span><span class="n">Core</span><span class="o">::</span><span class="n">TimeSpan</span><span class="p">(</span><span class="mi">12</span><span class="p">));</span>
<span class="p">}</span>
<span class="n">BOOST_AUTO_TEST_CASE</span><span class="p">(</span><span class="n">dummy_warning</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">Seiscomp</span><span class="o">::</span><span class="n">Core</span><span class="o">::</span><span class="n">Time</span><span class="w"> </span><span class="nf">tNegativeUsec</span><span class="p">(</span><span class="mi">3000</span><span class="p">,</span><span class="w"> </span><span class="mi">-789</span><span class="p">);</span>
<span class="w"> </span><span class="n">BOOST_WARN_EQUAL</span><span class="p">(</span><span class="n">tNegativeUsec</span><span class="p">.</span><span class="n">seconds</span><span class="p">(),</span><span class="w"> </span><span class="mi">3000</span><span class="p">);</span>
<span class="w"> </span><span class="n">BOOST_WARN_EQUAL</span><span class="p">(</span><span class="n">tNegativeUsec</span><span class="p">.</span><span class="n">microseconds</span><span class="p">(),</span><span class="w"> </span><span class="mi">-789</span><span class="p">);</span>
<span class="p">}</span>
<span class="n">BOOST_AUTO_TEXT_SUITE_END</span><span class="p">()</span>
</pre></div>
</div>
<p>That was simple, wasnt it? For more complex examples and usages, visit the
Boost Unit Test Framework documentation <a class="footnote-reference brackets" href="#b1" id="id2" role="doc-noteref"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a>. Furthermore you have to link
your test executable against <code class="code docutils literal notranslate"><span class="pre">${Boost_unit_test_framework_LIBRARY}</span></code> and
<code class="code docutils literal notranslate"><span class="pre">seiscomp_unittest</span></code>. A simple CMakeLists.txt file looks as follows:</p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nb">ADD_EXECUTABLE</span><span class="p">(</span><span class="s">test_mylib_myfeature</span><span class="w"> </span><span class="s">feature.cpp</span><span class="p">)</span>
<span class="nb">SC_LINK_LIBRARIES_INTERNAL</span><span class="p">(</span><span class="s">test_mylib_myfeature</span><span class="w"> </span><span class="s">unittest</span><span class="p">)</span>
<span class="nb">SC_LINK_LIBRARIES</span><span class="p">(</span><span class="s">test_mylib_myfeature</span><span class="w"> </span><span class="o">${</span><span class="nv">Boost_unit_test_framework_LIBRARY</span><span class="o">}</span><span class="p">)</span>
<span class="nb">ADD_TEST</span><span class="p">(</span>
<span class="w"> </span><span class="s">NAME</span><span class="w"> </span><span class="s">test_mylib_myfeature</span>
<span class="w"> </span><span class="s">WORKING_DIRECTORY</span><span class="w"> </span><span class="o">${</span><span class="nv">CMAKE_CURRENT_SOURCE_DIR</span><span class="o">}</span>
<span class="w"> </span><span class="s">COMMAND</span><span class="w"> </span><span class="s">test_mylib_myfeature</span>
<span class="p">)</span>
</pre></div>
</div>
<section id="warning-levels">
<h3>Warning levels<a class="headerlink" href="#warning-levels" title="Permalink to this heading"></a></h3>
<p>In Boost Test there are <strong>3 different levels</strong> to handle the results.</p>
<ul class="simple">
<li><p>Warning: WARN <a class="footnote-reference brackets" href="#b2" id="id3" role="doc-noteref"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></a>
The error is printed and the error counter <strong>is not</strong> increased.
The test execution will not be interrupted and will continue to execute other
test cases.</p></li>
<li><p>Error: CHECK
The error is printed and the error counter <strong>is</strong> increased.
The test execution will not be interrupted and will continue to execute other
test cases.</p></li>
<li><p>Fatal error: REQUIRE
The error is printed and the error counter <strong>is</strong> increased.
The test execution will be aborted.</p></li>
</ul>
</section>
<section id="tools">
<h3>Tools<a class="headerlink" href="#tools" title="Permalink to this heading"></a></h3>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Tool</p></th>
<th class="head"><p>what it do (short info)</p></th>
<th class="head"><p>example</p></th>
<th class="head"><p>return value</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>BOOST_&lt;LEVEL&gt;_EQUAL(left, right)</p></td>
<td><p>left == right</p></td>
<td><p>BOOST_&lt;LEVEL&gt;_EQUAL(4,5)</p></td>
<td><p>true or false</p></td>
</tr>
<tr class="row-odd"><td><p>BOOST_&lt;LEVEL&gt;(predicate)</p></td>
<td><p>predicate is true</p></td>
<td><p>BOOST_&lt;LEVEL&gt;(4+5 == 3+3+3)</p></td>
<td><p>if false, both results show</p></td>
</tr>
<tr class="row-even"><td><p>BOOST_&lt;LEVEL&gt;_EXCEPTION(expression, exception, predicate)</p></td>
<td><p>is exception equal to throw
exception of expression</p></td>
<td><p>BOOST_&lt;LEVEL&gt;_EXCEPTION(myVector(-5), out_of_range, true)</p></td>
<td><dl class="simple">
<dt>if false, show the exactly</dt><dd><p>exception</p>
</dd>
</dl>
</td>
</tr>
<tr class="row-odd"><td><p>BOOST_&lt;LEVEL&gt;_CLOSE(left, right, tolerance)</p></td>
<td><p>(left - right) &lt;= tolerance
tolerance in percentage</p></td>
<td><p>BOOST_&lt;LEVEL&gt;_CLOSE(5.3, 5.29,0.1)</p></td>
<td><dl class="simple">
<dt>if false, the exactly</dt><dd><p>tolerance is show</p>
</dd>
</dl>
</td>
</tr>
<tr class="row-even"><td><p>BOOST_&lt;LEVEL&gt;_LT(left, right)</p></td>
<td><p>left &lt; right</p></td>
<td><p>BOOST_&lt;LEVEL&gt;_LT(6,8)</p></td>
<td><p>true or false</p></td>
</tr>
<tr class="row-odd"><td><p>BOOST_&lt;LEVEL&gt;_GT(left, right)</p></td>
<td><p>left &gt; right</p></td>
<td><p>BOOST_&lt;LEVEL&gt;_GT(78,90)</p></td>
<td><p>true or false</p></td>
</tr>
<tr class="row-even"><td><p>BOOST_&lt;LEVEL&gt;_GE(left, right)</p></td>
<td><p>left &gt;= right</p></td>
<td><p>BOOST_&lt;LEVEL&gt;_GE(54,10)</p></td>
<td><p>true or false</p></td>
</tr>
<tr class="row-odd"><td><p>BOOST_&lt;LEVEL&gt;_LE(left, right)</p></td>
<td><p>left &lt;= right</p></td>
<td><p>BOOST_&lt;LEVEL&gt;_LE(10,2)</p></td>
<td><p>true or false</p></td>
</tr>
<tr class="row-even"><td><p>BOOST_&lt;LEVEL&gt;_NE(left, right)</p></td>
<td><p>left != right</p></td>
<td><p>BOOST_&lt;LEVEL&gt;_NE(1,0)</p></td>
<td><p>true or false</p></td>
</tr>
<tr class="row-odd"><td><p>BOOST_ERROR(“message”)</p></td>
<td><p>increasing error counter and show message</p></td>
<td><p>BOOST_ERROR(“There was a problem”)</p></td>
<td><p>message</p></td>
</tr>
<tr class="row-even"><td><p>BOOST_TEST_MESSAGE(“message”) <a class="footnote-reference brackets" href="#b3" id="id4" role="doc-noteref"><span class="fn-bracket">[</span>4<span class="fn-bracket">]</span></a></p></td>
<td><p>show message</p></td>
<td><p>BOOST_TEST_MESSAGE(“Your ad can be placed here”)</p></td>
<td><p>message</p></td>
</tr>
<tr class="row-odd"><td><p>BOOST_&lt;LEVEL&gt;_THROW(expression,exception)</p></td>
<td><p>perform an exception perception check</p></td>
<td><p>BOOST_&lt;LEVEL&gt;_THROW(myVector(-2),out_of_range)</p></td>
<td><p>true or false</p></td>
</tr>
</tbody>
</table>
<p>For more tools and information about the Boost unit test tools see <a class="footnote-reference brackets" href="#b4" id="id5" role="doc-noteref"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a>.</p>
</section>
</section>
<section id="test-output">
<h2>Test output<a class="headerlink" href="#test-output" title="Permalink to this heading"></a></h2>
<p>The test binary will exit with an error code of 0 if no errors were detected
and the tests finished successfully. Any other result code represents failed
tests.</p>
<p>An example output looks like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Running</span> <span class="n">tests</span><span class="o">...</span>
<span class="n">Test</span> <span class="n">project</span> <span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">sysop</span><span class="o">/</span><span class="n">seiscomp</span><span class="o">/</span><span class="n">build</span>
<span class="n">Start</span> <span class="mi">1</span><span class="p">:</span> <span class="n">stringtoxml</span>
<span class="mi">1</span><span class="o">/</span><span class="mi">4</span> <span class="n">Test</span> <span class="c1">#1: stringtoxml ......................***Failed 0.03 sec</span>
<span class="n">Start</span> <span class="mi">2</span><span class="p">:</span> <span class="n">datetime_time</span>
<span class="mi">2</span><span class="o">/</span><span class="mi">4</span> <span class="n">Test</span> <span class="c1">#2: datetime_time .................... Passed 0.03 sec</span>
<span class="n">Start</span> <span class="mi">3</span><span class="p">:</span> <span class="n">xml_test</span>
<span class="mi">3</span><span class="o">/</span><span class="mi">4</span> <span class="n">Test</span> <span class="c1">#3: xml_test ......................... Passed 0.03 sec</span>
<span class="n">Start</span> <span class="mi">4</span><span class="p">:</span> <span class="n">datetime_timespan</span>
<span class="mi">4</span><span class="o">/</span><span class="mi">4</span> <span class="n">Test</span> <span class="c1">#4: datetime_timespan ................ Passed 0.03 sec</span>
<span class="mi">75</span><span class="o">%</span> <span class="n">tests</span> <span class="n">passed</span><span class="p">,</span> <span class="mi">1</span> <span class="n">tests</span> <span class="n">failed</span> <span class="n">out</span> <span class="n">of</span> <span class="mi">4</span>
<span class="n">Total</span> <span class="n">Test</span> <span class="n">time</span> <span class="p">(</span><span class="n">real</span><span class="p">)</span> <span class="o">=</span> <span class="mf">0.17</span> <span class="n">sec</span>
<span class="n">The</span> <span class="n">following</span> <span class="n">tests</span> <span class="n">FAILED</span><span class="p">:</span>
<span class="mi">1</span> <span class="o">-</span> <span class="n">stringtoxml</span> <span class="p">(</span><span class="n">Failed</span><span class="p">)</span>
<span class="n">Errors</span> <span class="k">while</span> <span class="n">running</span> <span class="n">CTest</span>
<span class="n">Makefile</span><span class="p">:</span><span class="mi">61</span><span class="p">:</span> <span class="n">recipe</span> <span class="k">for</span> <span class="n">target</span> <span class="s1">&#39;test&#39;</span> <span class="n">failed</span>
<span class="n">make</span><span class="p">:</span> <span class="o">***</span> <span class="p">[</span><span class="n">test</span><span class="p">]</span> <span class="n">Error</span> <span class="mi">8</span>
</pre></div>
</div>
<aside class="footnote-list brackets">
<aside class="footnote brackets" id="wput" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id1">1</a><span class="fn-bracket">]</span></span>
<p><a class="reference external" href="https://en.wikipedia.org/wiki/Unit_testing">https://en.wikipedia.org/wiki/Unit_testing</a></p>
</aside>
<aside class="footnote brackets" id="b1" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id2">2</a><span class="fn-bracket">]</span></span>
<p>As of Boost version 1.46, it is located at <a class="reference external" href="http://www.boost.org/doc/libs/1_46_0/libs/test/doc/html/index.html">http://www.boost.org/doc/libs/1_46_0/libs/test/doc/html/index.html</a></p>
</aside>
<aside class="footnote brackets" id="b2" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id3">3</a><span class="fn-bracket">]</span></span>
<p><em>to see the warnings use the instruction:</em> <strong>boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_warnings);</strong></p>
</aside>
<aside class="footnote brackets" id="b3" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id4">4</a><span class="fn-bracket">]</span></span>
<p><em>to see the messages use the instruction:</em> <strong>boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_messages);</strong></p>
</aside>
<aside class="footnote brackets" id="b4" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id5">5</a><span class="fn-bracket">]</span></span>
<p>As of Boost version 1.46, it is located at <a class="reference external" href="http://www.boost.org/doc/libs/1_46_0/libs/test/doc/html/utf.html">http://www.boost.org/doc/libs/1_46_0/libs/test/doc/html/utf.html</a></p>
</aside>
</aside>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Unit Testing</a><ul>
<li><a class="reference internal" href="#introduction">Introduction</a></li>
<li><a class="reference internal" href="#preparations">Preparations</a></li>
<li><a class="reference internal" href="#execution">Execution</a></li>
<li><a class="reference internal" href="#test-implementation">Test implementation</a><ul>
<li><a class="reference internal" href="#warning-levels">Warning levels</a></li>
<li><a class="reference internal" href="#tools">Tools</a></li>
</ul>
</li>
<li><a class="reference internal" href="#test-output">Test output</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="coding-conventions.html"
title="previous chapter">Coding Conventions</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/tests.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,561 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Time Formats &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Software Development Kit" href="sdk.html" />
<link rel="prev" title="Filter Grammar" href="filter-grammar.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="sdk.html" title="Software Development Kit"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="filter-grammar.html" title="Filter Grammar"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="time-formats">
<span id="id1"></span><h1>Time Formats<a class="headerlink" href="#time-formats" title="Permalink to this heading"></a></h1>
<p>In <cite>SeisComP</cite> all absolute times of raw <a class="reference internal" href="glossary.html#term-miniSeed"><span class="xref std std-term">miniSEED</span></a> waveforms and
<a class="reference internal" href="api-python.html#api-datamodel-python"><span class="std std-ref">SeisComP objects</span></a> like event parameters, inventory,
etc. are natively given and assumed in UTC. For reading and writing absolute
times a range of formats are supported.</p>
<p>Historically, the only time format native to <cite>SeisComP</cite> would be</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">YYYY-MM-DD</span><span class="w"> </span><span class="s">hh:mm:ss.ssssss</span>
</pre></div>
</div>
<p>As a consequence of the space between <em>DD</em> and <em>hh</em> this time string needs
to be enclosed by quotes or double quotes. Otherwise, the time string meant to
be a single string only would be interpreted as two strings. Example:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scevtls<span class="w"> </span>-d<span class="w"> </span>localhost<span class="w"> </span>--begin<span class="w"> </span><span class="s1">&#39;2024-01-01 12:00:00&#39;</span>
</pre></div>
</div>
<p>Depending on the module, trailing parameters could be omitted or not for
shortening the arguments but the general rules were initially unclear.</p>
<p>More flexibility has been introduced with SeisComP in version 6.4.0 with the
new C++ and Python function:</p>
<p>C++:</p>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="n">Seiscomp</span><span class="o">::</span><span class="n">Core</span><span class="o">::</span><span class="n">Time</span><span class="o">::</span><span class="n">fromString</span><span class="p">()</span>
</pre></div>
</div>
<p>Python:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">seiscomp</span><span class="o">.</span><span class="n">core</span><span class="p">()</span><span class="o">.</span><span class="n">time</span><span class="p">()</span><span class="o">.</span><span class="n">fromString</span><span class="p">()</span>
</pre></div>
</div>
<p>In adaptation to the norm <span id="id2"></span> a subset of strings is now
available. Supported formats are</p>
<ul class="simple">
<li><p>Calender dates,</p></li>
<li><p>Ordinal dates,</p></li>
<li><p>Times (24-hour clock system) in combination with calender or ordinal dates.</p></li>
</ul>
<p>Currently unsupported are:</p>
<ul class="simple">
<li><p>Week dates,</p></li>
<li><p>Times without dates,</p></li>
<li><p>Time zone offset designators,</p></li>
<li><p>Local times.</p></li>
</ul>
<table class="docutils align-left" id="id4">
<caption><span class="caption-text">List and examples of supported time string formats</span><a class="headerlink" href="#id4" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 30.0%" />
<col style="width: 30.0%" />
<col style="width: 40.0%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Implementation</p></th>
<th class="head"><p>Time string format</p></th>
<th class="head"><p>Examples: all actual times are identical</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>%FT%T.%fZ</p></td>
<td><p>YYYY-MM-DDThh:mm:ss.ssssssZ</p></td>
<td><p>2025-01-01T00:00:00.000000Z</p></td>
</tr>
<tr class="row-odd"><td><p>%FT%T.%f</p></td>
<td><p>YYYY-MM-DDThh:mm:ss.ssssss</p></td>
<td><p>2025-01-01T00:00:00.000000</p></td>
</tr>
<tr class="row-even"><td><p>%FT%TZ</p></td>
<td><p>YYYY-MM-DDThh:mm:ssZ</p></td>
<td><p>2025-01-01T00:00:00Z</p></td>
</tr>
<tr class="row-odd"><td><p>%FT%T</p></td>
<td><p>YYYY-MM-DDThh:mm:ss</p></td>
<td><p>2025-01-01T00:00:00</p></td>
</tr>
<tr class="row-even"><td><p>%FT%R</p></td>
<td><p>YYYY-MM-DDThh:mm</p></td>
<td><p>2025-01-01T00:00</p></td>
</tr>
<tr class="row-odd"><td><p>%FT%H</p></td>
<td><p>YYYY-MM-DDThh</p></td>
<td><p>2025-01-01T00</p></td>
</tr>
<tr class="row-even"><td><p>%Y-%jT%T.%f</p></td>
<td><p>YYYY-DDDThh:mm:ss.ssssss</p></td>
<td><p>2025-001T00:00:00.000000</p></td>
</tr>
<tr class="row-odd"><td><p>%Y-%jT%T</p></td>
<td><p>YYYY-DDDThh:mm:ss</p></td>
<td><p>2025-001T00:00:00</p></td>
</tr>
<tr class="row-even"><td><p>%Y-%jT%R</p></td>
<td><p>YYYY-DDDThh:mm</p></td>
<td><p>2025-001T00:00</p></td>
</tr>
<tr class="row-odd"><td><p>%Y-%jT%H</p></td>
<td><p>YYYY-DDDThh</p></td>
<td><p>2025-001T00</p></td>
</tr>
<tr class="row-even"><td><p>%F %T.%f (*)</p></td>
<td><p>YYYY-MM-DD hh:mm:ss.ssssss</p></td>
<td><p>2025-01-01 00:00:00.000000</p></td>
</tr>
<tr class="row-odd"><td><p>%F %T (*)</p></td>
<td><p>YYYY-MM-DD hh:mm:ss</p></td>
<td><p>2025-01-01 00:00:00</p></td>
</tr>
<tr class="row-even"><td><p>%F %R (*)</p></td>
<td><p>YYYY-MM-DD hh:mm</p></td>
<td><p>2025-01-01 00:00</p></td>
</tr>
<tr class="row-odd"><td><p>%F %H (*)</p></td>
<td><p>YYYY-MM-DD hh</p></td>
<td><p>2025-01-01 00</p></td>
</tr>
<tr class="row-even"><td><p>%F</p></td>
<td><p>YYYY-MM-DD</p></td>
<td><p>2025-01-01</p></td>
</tr>
<tr class="row-odd"><td><p>%Y-%j</p></td>
<td><p>YYYY-DDD</p></td>
<td><p>2025-001</p></td>
</tr>
<tr class="row-even"><td><p>%Y</p></td>
<td><p>YYYY</p></td>
<td><p>2025</p></td>
</tr>
</tbody>
</table>
<p>(*): Time strings with spaces must be enclosed by quotes or double quotes for
protecting the space.</p>
<table class="docutils align-left" id="id5">
<caption><span class="caption-text">List of format symbols used in table of time string formats</span><a class="headerlink" href="#id5" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 10.0%" />
<col style="width: 90.0%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Symbol</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>YYYY</p></td>
<td><p>4-digit year</p></td>
</tr>
<tr class="row-odd"><td><p>MM</p></td>
<td><p>2-digit month starting with 01</p></td>
</tr>
<tr class="row-even"><td><p>DD</p></td>
<td><p>1- or 2-digit day of the month starting with 01</p></td>
</tr>
<tr class="row-odd"><td><p>DDD</p></td>
<td><p>1-, 2- or 3-digit day of year starting with 001</p></td>
</tr>
<tr class="row-even"><td><p>hh</p></td>
<td><p>1- or 2-digit hour of the day starting with 00</p></td>
</tr>
<tr class="row-odd"><td><p>mm</p></td>
<td><p>1- or 2-digit minute of the hour starting with 00</p></td>
</tr>
<tr class="row-even"><td><p>ss</p></td>
<td><p>1- or 2-digit second of the minute starting with 00</p></td>
</tr>
<tr class="row-odd"><td><p>ssssss</p></td>
<td><p>1-6 digits decimal fraction of a second with 0</p></td>
</tr>
<tr class="row-even"><td><p>Z</p></td>
<td><p>Zone designator for the zero UTC offset</p></td>
</tr>
</tbody>
</table>
<p>Durations can be formed from start and end dates and times combined by tilde(~).
Example:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scart<span class="w"> </span>-dsEv<span class="w"> </span>-t<span class="w"> </span><span class="m">2024</span>-01-01T12~2024-01-01T12:15:30.2Z
</pre></div>
</div>
</section>
<section id="time-grammar">
<span id="id3"></span><h1>Time Grammar<a class="headerlink" href="#time-grammar" title="Permalink to this heading"></a></h1>
<p>Amplitudes are measured on waveforms by modules such as <a class="reference internal" href="../apps/scautopick.html#scautopick"><span class="std std-ref">scautopick</span></a>,
<a class="reference internal" href="../apps/scamp.html#scamp"><span class="std std-ref">scamp</span></a> or <a class="reference internal" href="../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a> for computing magnitudes, e.g., by <a class="reference internal" href="../apps/scmag.html#scmag"><span class="std std-ref">scmag</span></a> or
<a class="reference internal" href="../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a>. The principles are outlined in the concepts section
<a class="reference internal" href="concepts/magnitudes.html#concepts-magnitudes"><span class="std std-ref">Magnitudes</span></a>.</p>
<p>The time windows for measuring noise and signal amplitudes are given by their
respective begin and end values. These window parameters are configured as
global binding parameters specifically for a particular amplitude type, lets
say <a class="reference internal" href="../apps/global_ml.html#global-ml"><span class="std std-ref">ML</span></a>:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">amplitudes.ML.noiseBegin</span>
<span class="na">amplitudes.ML.noiseEnd</span>
<span class="na">amplitudes.ML.signalBegin</span>
<span class="na">amplitudes.ML.signalEnd</span>
</pre></div>
</div>
<p><strong>The configured values are added to trigger time</strong>, <em>triggerTime</em>, which
corresponds to the arrival of P waves for most applications. <em>triggerTime</em> is
hence the sum of <em>originTime</em> and <em>relativeTriggerTime</em>.</p>
<p>Example:</p>
<div class="math">
<p><img src="../_images/math/83409ac8b2479e6d7ceba99bfd8c19a5491e32ca.png" alt="absoluteSignalEnd =\ &amp;originTime + relativeTriggerTime + amplitudes.ML.signalEnd \\
=\ &amp;originTime - relativeOriginTime + amplitudes.ML.signalEnd \\
=\ &amp;triggerTime + amplitudes.ML.signalEnd"/></p>
</div><div class="admonition important">
<p class="admonition-title">Important</p>
<p>Where values of time-window parameter values shall be estimated from distance
measures such as <span class="target" id="index-0"></span><a class="reference internal" href="#envvar-D"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">D</span></code></a> or <span class="target" id="index-1"></span><a class="reference internal" href="#envvar-h"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">h</span></code></a>, the relative origin time,
<span class="target" id="index-2"></span><a class="reference internal" href="#envvar-OT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">OT</span></code></a>, must be added to get the actual difference to <em>triggerTime</em>. In
contrast, <a class="reference internal" href="#tt" title="tt"><code class="xref py py-func docutils literal notranslate"><span class="pre">tt()</span></code></a> returns the time difference to <span class="target" id="index-3"></span><a class="reference internal" href="#envvar-OT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">OT</span></code></a>.
Therefore, <a class="reference internal" href="#tt" title="tt"><code class="xref py py-func docutils literal notranslate"><span class="pre">tt()</span></code></a> does not need to be corrected for origin time.</p>
</div>
<p>In <cite>SeisComP</cite> the configuration of the begin and end values is supported in the
Bindings Panel of <a class="reference internal" href="../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>: For global bindings parameters you may create
an amplitude-type profile with the name of the amplitude type, e.g., ML. The
profile allows you to configure the parameters.
You may set the values as a combination of <a class="reference internal" href="#sec-time-functions"><span class="std std-ref">functions</span></a>,
<a class="reference internal" href="#sec-time-operators"><span class="std std-ref">operators</span></a>, <a class="reference internal" href="#sec-time-variables"><span class="std std-ref">variables</span></a> and
constant values. The combination of them allows setting up a flexible time
grammar for time windows. You may further use parentheses <em>()</em> to apply
operations within the parentheses before operations outside of parentheses.</p>
<p>If the result of the final evaluation of the parameter value is <em>unset</em>, e.g.,
because required information are not available, then the processing receives an
error and the amplitude will not be computed.</p>
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this heading"></a></h2>
<p>The details of the grammar elements used in the following examples are
described <a class="reference internal" href="#sec-time-details"><span class="std std-ref">below</span></a>.</p>
<ul>
<li><p>Return the signal end time to measure <a class="reference internal" href="glossary.html#term-magnitude-broadband-body-wave-mB_BB"><span class="xref std std-term">mB amplitudes</span></a>:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">min(D</span><span class="w"> </span><span class="s">* 11.5, 60)</span>
</pre></div>
</div>
<p>where function <a class="reference internal" href="#min" title="min"><code class="xref py py-func docutils literal notranslate"><span class="pre">min()</span></code></a> returns the minium from two parameters to,
epicentral distance, <span class="target" id="index-4"></span><a class="reference internal" href="#envvar-D"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">D</span></code></a>, is a variable and * and + are
operators.</p>
<p>In this example, the minimum time from either epicentral distance in degree
times 11.5 s/deg or 60 s is returned if epicentral distance is available. If
epicentral distance is not available, 60 s is returned hence being the default.</p>
</li>
<li><p>Return the signal end time to measure amplitudes ending before the arrival of
surface waves or 150 s:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">min(OT</span><span class="w"> </span><span class="s">+ D * 35, 150)</span>
</pre></div>
</div>
<p>where the epicentral distance, <span class="target" id="index-5"></span><a class="reference internal" href="#envvar-D"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">D</span></code></a>, is multiplied by 35 s/deg. The
relative origin time, <span class="target" id="index-6"></span><a class="reference internal" href="#envvar-OT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">OT</span></code></a>, is either added in order to obtain the
time relative to trigger time.
The minimum of this value and 150 s is returned by <a class="reference internal" href="#min" title="min"><code class="xref py py-func docutils literal notranslate"><span class="pre">min()</span></code></a>. This
means that 150 s it the default in case epicentral distance is not available.</p>
</li>
<li><p>Return the time difference as the minimum of predicted arrivals of S-waves
adding 10 s or 150 s:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">min(tt(S)</span><span class="w"> </span><span class="s">+ 10, 150)</span>
</pre></div>
</div>
<p>where the function <a class="reference internal" href="#tt" title="tt"><code class="xref py py-func docutils literal notranslate"><span class="pre">tt()</span></code></a> returns the relative travel time of the
argument, here the S phase, and + is an operator.</p>
<p>In this example the minimum time from either the relative arrival time of S
phase plus 10 s or 150 s is returned.</p>
</li>
</ul>
<p>Similar to the statements above, the time windows for measuring amplitudes can
be configured, e.g., for overriding default time for <a class="reference internal" href="glossary.html#term-magnitude-local-vertical-MLv"><span class="xref std std-term">MLv amplitudes</span></a>:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">amplitudes.MLv.noiseBegin</span><span class="o">=</span><span class="s">-10</span>
<span class="na">amplitudes.MLv.noiseEnd</span><span class="o">=</span><span class="s">-1</span>
<span class="na">amplitudes.MLv.signalBegin</span><span class="o">=</span><span class="s">-1</span>
<span class="na">amplitudes.MLv.signalEnd</span><span class="o">=</span><span class="s">tt(S)+10</span>
</pre></div>
</div>
</section>
<section id="functions-operators-variables">
<span id="sec-time-details"></span><h2>Functions, Operators, Variables<a class="headerlink" href="#functions-operators-variables" title="Permalink to this heading"></a></h2>
<p>Variables, operators and functions are available. Variables define standard
values and function provide values based on a parameter given within
parentheses like <a class="reference internal" href="#tt" title="tt"><code class="xref py py-func docutils literal notranslate"><span class="pre">tt()</span></code></a>. Find below their individual descriptions.</p>
<section id="functions">
<span id="sec-time-functions"></span><h3>Functions<a class="headerlink" href="#functions" title="Permalink to this heading"></a></h3>
<dl class="py function">
<dt class="sig sig-object py" id="max">
<span class="sig-name descname"><span class="pre">max</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">arg1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">arg2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#max" title="Permalink to this definition"></a></dt>
<dd><p>Calculates the maximum of two values. If one value is unset then the other
value is returned. If both values are unset then the result is unset, too.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>arg1</strong> First value to consider</p></li>
<li><p><strong>arg2</strong> Second value to consider</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="min">
<span class="sig-name descname"><span class="pre">min</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">arg1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">arg2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#min" title="Permalink to this definition"></a></dt>
<dd><p>Calculates the minimum of two values. If one value is unset then the other
value is returned. If both values are unset then the result is unset, too.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>arg1</strong> First value to consider</p></li>
<li><p><strong>arg2</strong> Second value to consider</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="tt">
<span class="sig-name descname"><span class="pre">tt</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">phase</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#tt" title="Permalink to this definition"></a></dt>
<dd><p>Calculates the travel-time of the given phase <strong>w.r.t. relative origin
time, :py:envvar:`OT`</strong>. The result is unset if the travel time cannot be
computed. The travel times are computed based on the travel-time interface
and model defined in <a class="reference internal" href="../apps/global.html#confval-0"><code class="xref std std-confval docutils literal notranslate"><span class="pre">amplitudes.ttt.interface</span></code></a> and
<a class="reference internal" href="../apps/global.html#confval-1"><code class="xref std std-confval docutils literal notranslate"><span class="pre">amplitudes.ttt.model</span></code></a>, respectively.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>phase</strong> Phase name available with the defined travel-time interface
and model.</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="arr">
<span class="sig-name descname"><span class="pre">arr</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">phase</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">acceptAll</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#arr" title="Permalink to this definition"></a></dt>
<dd><p>Extracts the travel times of actually used arrivals <strong>relative to the trigger
time</strong>. The arrivals with the given phase code must exist.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>phase</strong> Phase code of the arrival. The arrival must exist and the
sensor location of the associated pick must match the sensor
location of the target object.</p></li>
<li><p><strong>acceptAll</strong> Whether to accept all arrivals or only manually
revised arrivals. The default is true if not
given. Allowed is either true or false. If
true is given, then either the evaluation mode
of the origin or the evaluation mode of the pick
must be manual.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</section>
<section id="operators">
<span id="sec-time-operators"></span><h3>Operators<a class="headerlink" href="#operators" title="Permalink to this heading"></a></h3>
<p>If either of the operands is unset then the result will be also unset.</p>
<ul class="simple">
<li><p>+ : addition</p></li>
<li><p>- : subtraction</p></li>
<li><p>* : multiplication</p></li>
<li><p>/ : division</p></li>
<li><p>^ : power / exponentiation</p></li>
<li><p>|| : logical OR which returns the first set value if any</p></li>
<li><p>|. | : absolute value</p></li>
<li><p>% : modulo</p></li>
</ul>
</section>
<section id="variables">
<span id="sec-time-variables"></span><h3>Variables<a class="headerlink" href="#variables" title="Permalink to this heading"></a></h3>
<p>Variables can take the value <em>unset</em> when required information is not available.
The behaviour of <a class="reference internal" href="#sec-time-operators"><span class="std std-ref">operators</span></a> and
<a class="reference internal" href="#sec-time-functions"><span class="std std-ref">functions</span></a> with variables of value <em>unset</em> depends
on the operator and function itself.</p>
<dl class="std envvar">
<dt class="sig sig-object std" id="envvar-OT">
<span class="sig-name descname"><span class="pre">OT</span></span><a class="headerlink" href="#envvar-OT" title="Permalink to this definition"></a></dt>
<dd><p>Relative origin time as difference from origin to trigger
(originTime - triggerTime). For most amplitude types, the
trigger is the measured or the predicted arrival time of the P phase.</p>
<p>Unit: <code class="docutils literal notranslate"><span class="pre">s</span></code></p>
</dd></dl>
<dl class="std envvar">
<dt class="sig sig-object std" id="envvar-D">
<span class="sig-name descname"><span class="pre">D</span></span><a class="headerlink" href="#envvar-D" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="glossary.html#term-distance-epicentral"><span class="xref std std-term">Epicentral distance</span></a></p>
<p>Unit: <code class="docutils literal notranslate"><span class="pre">deg</span></code></p>
</dd></dl>
<dl class="std envvar">
<dt class="sig sig-object std" id="envvar-d-R">
<span class="sig-name descname"><span class="pre">d,</span> <span class="pre">R</span></span><a class="headerlink" href="#envvar-d-R" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="glossary.html#term-distance-epicentral"><span class="xref std std-term">Epicentral distance</span></a></p>
<p>Unit: <code class="docutils literal notranslate"><span class="pre">km</span></code></p>
</dd></dl>
<dl class="std envvar">
<dt class="sig sig-object std" id="envvar-H">
<span class="sig-name descname"><span class="pre">H</span></span><a class="headerlink" href="#envvar-H" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="glossary.html#term-distance-hypocentral"><span class="xref std std-term">Hypocentral distance</span></a></p>
<p>Unit: <code class="docutils literal notranslate"><span class="pre">deg</span></code></p>
</dd></dl>
<dl class="std envvar">
<dt class="sig sig-object std" id="envvar-h">
<span class="sig-name descname"><span class="pre">h</span></span><a class="headerlink" href="#envvar-h" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="glossary.html#term-distance-hypocentral"><span class="xref std std-term">Hypocentral distance</span></a></p>
<p>Unit: <code class="docutils literal notranslate"><span class="pre">km</span></code></p>
</dd></dl>
<dl class="std envvar">
<dt class="sig sig-object std" id="envvar-Z">
<span class="sig-name descname"><span class="pre">Z</span></span><a class="headerlink" href="#envvar-Z" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="glossary.html#term-origin"><span class="xref std std-term">origin</span></a> depth</p>
<p>Unit: <code class="docutils literal notranslate"><span class="pre">km</span></code></p>
</dd></dl>
</section>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Time Formats</a></li>
<li><a class="reference internal" href="#time-grammar">Time Grammar</a><ul>
<li><a class="reference internal" href="#examples">Examples</a></li>
<li><a class="reference internal" href="#functions-operators-variables">Functions, Operators, Variables</a><ul>
<li><a class="reference internal" href="#functions">Functions</a><ul>
<li><a class="reference internal" href="#max"><code class="docutils literal notranslate"><span class="pre">max()</span></code></a></li>
<li><a class="reference internal" href="#min"><code class="docutils literal notranslate"><span class="pre">min()</span></code></a></li>
<li><a class="reference internal" href="#tt"><code class="docutils literal notranslate"><span class="pre">tt()</span></code></a></li>
<li><a class="reference internal" href="#arr"><code class="docutils literal notranslate"><span class="pre">arr()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#operators">Operators</a></li>
<li><a class="reference internal" href="#variables">Variables</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="filter-grammar.html"
title="previous chapter">Filter Grammar</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="sdk.html"
title="next chapter">Software Development Kit</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/time-grammar.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,152 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Tutorials &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Installation on Ubuntu" href="tutorials/postinstall.html" />
<link rel="prev" title="System management" href="management.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="tutorials/postinstall.html" title="Installation on Ubuntu"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="management.html" title="System management"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="tutorials">
<span id="id1"></span><h1>Tutorials<a class="headerlink" href="#tutorials" title="Permalink to this heading"></a></h1>
<p>This chapter provides some tutorials to help you get started with <cite>SeisComP</cite>.</p>
<p>The material here is not the primary documentation.
Rather, it attempts to explain what is to be done in a step-by-step way.
For details, see the other chapters of this manual.</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="tutorials/postinstall.html">Installation on Ubuntu</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/upgrading.html">Upgrading SeisComP</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/addstation.html">Add a new station</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/waveforms.html">Get real-time data from a remote Seedlink server (single station)</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/archiving.html">Set up local waveform archiving</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/processing.html">Configure real-time processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/geofon_waveforms.html">Add real-time stations from GEOFON</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/servefdsnws.html">Enable local FDSNWS server</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/magnitude-regionalization.html">Magnitudes: Regionalization, Aliases, Mw</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/waveformplayback.html">Play back archived waveforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/help.html">Help! Im stuck! Now what?</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/template.html">Create a new tutorial</a></li>
</ul>
</div>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="management.html"
title="previous chapter">System management</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="tutorials/postinstall.html"
title="next chapter">Installation on Ubuntu</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/base/tutorials.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,295 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Add a new station &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Get real-time data from a remote Seedlink server (single station)" href="waveforms.html" />
<link rel="prev" title="Upgrading SeisComP" href="upgrading.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="waveforms.html" title="Get real-time data from a remote Seedlink server (single station)"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="upgrading.html" title="Upgrading SeisComP"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="add-a-new-station">
<span id="tutorials-addstation"></span><h1>Add a new station<a class="headerlink" href="#add-a-new-station" title="Permalink to this heading"></a></h1>
<p>This tutorial guides you through the most common activities
involved in configuring a single new station in your existing SeisComP system.
Depending on your needs, you will use parts of other tutorials to do this.</p>
<p>Pre-requisites for this tutorial:</p>
<ul class="simple">
<li><p><a class="reference internal" href="postinstall.html#tutorials-postinstall"><span class="std std-ref">Installation on Ubuntu</span></a></p></li>
<li><p>An understanding of <a class="reference internal" href="../concepts/inventory.html#concepts-inventory"><span class="std std-ref">Inventory</span></a>.</p></li>
</ul>
<p>You may also need to consult</p>
<ul class="simple">
<li><p><a class="reference internal" href="waveforms.html#tutorials-waveforms"><span class="std std-ref">Get real-time data from a remote Seedlink server (single station)</span></a></p></li>
<li><p><a class="reference internal" href="processing.html#tutorials-processing"><span class="std std-ref">Configure real-time processing</span></a></p></li>
<li><p><a class="reference internal" href="archiving.html#tutorials-archiving"><span class="std std-ref">Set up local waveform archiving</span></a></p></li>
</ul>
<p>Afterwards/Results/Outcomes:</p>
<ul class="simple">
<li><p>Optionally, data for the new station are acquired and archived in real time.</p></li>
<li><p>Optionally, the new station is used for automatic real-time data processing.</p></li>
</ul>
<p>Time range estimate:</p>
<ul class="simple">
<li><p>Variable</p></li>
</ul>
<hr class="docutils" />
<section id="before-you-start">
<h2>Before you start<a class="headerlink" href="#before-you-start" title="Permalink to this heading"></a></h2>
<p>Try to answer the questions:</p>
<ul class="simple">
<li><p>where will you get data?</p></li>
<li><p>if you want to process data locally, where will you get inventory?</p></li>
<li><p>which data will you share?</p></li>
<li><p>how long will you archive, and what streams?</p></li>
</ul>
<p>For this example, well add the GRSN Station Collm (CLL)
from the GR network.</p>
<ul class="simple">
<li><p>If you want to process data on this system, you will need
inventory (metadata).
Metadata can be obtained from many different sources or created from scratch.</p></li>
<li><p>If you dont want to process on this system, you wont need inventory,
but you will have to create key file by hand for acquisition and archiving.</p></li>
</ul>
</section>
<section id="obtaining-inventory-for-your-station">
<h2>Obtaining inventory for your station<a class="headerlink" href="#obtaining-inventory-for-your-station" title="Permalink to this heading"></a></h2>
<p>For processing, you will need inventory for the new station.
How to obtain this will vary.
You can fetch inventory from:</p>
<ul class="simple">
<li><p>Other SeisComP systems. Use <a class="reference internal" href="../../apps/scxmldump.html#scxmldump"><span class="std std-ref">scxmldump</span></a> to fetch inventories.</p></li>
<li><p>EIDA nodes <span id="id1">[<a class="reference internal" href="../references.html#id103" title="EIDA. European Integrated Data Archive, Orfeus. URL: https://www.orfeus-eu.org/data/eida/.">4</a>]</span>. Use web interfaces such as web browsers or <cite>wget</cite>
to fetch an inventory.</p></li>
<li><p>Data centers providing <span id="id2"><em>FDSNWS</em> [<a class="reference internal" href="../references.html#id110" title="FDSNWS. International Federation of Digital Seismograph Networks. URL: http://www.fdsn.org/webservices/.">8</a>]</span>. Use web interfaces such as web browsers
or <cite>wget</cite> to fetch an inventory.</p></li>
<li><p>Your own or shared user repositories on <span id="id3"><em>SMP</em> [<a class="reference internal" href="../references.html#id268" title="SMP. Station Management Portal by gempa GmbH. URL: https://smp.gempa.de/.">22</a>]</span>.</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Create and share inventories</p>
<p>gempas <span id="id4"><em>SMP</em> [<a class="reference internal" href="../references.html#id268" title="SMP. Station Management Portal by gempa GmbH. URL: https://smp.gempa.de/.">22</a>]</span> is a tool for creating inventory from scratch and
community sharing. Create inventories for new or old networks and stations
from permanent or temporary deployments.
SMP provides inventories in <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> format in multiple versions
which can be used without modification.</p>
</div>
</section>
<section id="configuring-inventory">
<h2>Configuring inventory<a class="headerlink" href="#configuring-inventory" title="Permalink to this heading"></a></h2>
<p>Suppose that, by one of the methods above,
we have it in a single file, <code class="file docutils literal notranslate"><span class="pre">inventory_CLL.xml</span></code>.
This must be converted from StationXML to SeisComP XML.
The resulting file goes into
<code class="file docutils literal notranslate"><span class="pre">~/seiscomp/etc/inventory</span></code>.
See the chapter on <a class="reference internal" href="../concepts/inventory.html#concepts-inventory"><span class="std std-ref">Inventory</span></a>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>~/seiscomp/bin/seiscomp<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>import_inv<span class="w"> </span>fdsnxml<span class="w"> </span>~/inventory_CLL.xml
Generating<span class="w"> </span>output<span class="w"> </span>to<span class="w"> </span>/home/user/seiscomp/etc/inventory/inventory_CLL.xml
No<span class="w"> </span>inventory<span class="w"> </span><span class="nb">read</span><span class="w"> </span>from<span class="w"> </span>inventory<span class="w"> </span>db
Create<span class="w"> </span>empty<span class="w"> </span>one
Processing<span class="w"> </span>/home/user/inventory_CLL.xml
<span class="w"> </span>-<span class="w"> </span>parsing<span class="w"> </span>StationXML
<span class="w"> </span>-<span class="w"> </span>converting<span class="w"> </span>into<span class="w"> </span>SeisComP-XML
Finished<span class="w"> </span>processing
Writing<span class="w"> </span>inventory<span class="w"> </span>to<span class="w"> </span>/home/user/seiscomp/etc/inventory/inventory_CLL.xml
</pre></div>
</div>
<p>When inventory is loaded, you will see your station in the results
of <a class="reference internal" href="../../apps/scinv.html#scinv"><span class="std std-ref">scinv</span></a> with the <cite>ls</cite> option:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>~/seiscomp/bin/seiscomp<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>scinv<span class="w"> </span>ls
WARNING:<span class="w"> </span>/home/user/seiscomp/etc/inventory/README<span class="w"> </span>ignored:<span class="w"> </span>wrong<span class="w"> </span>extension
<span class="o">[</span>..<span class="o">]</span>
Parsing<span class="w"> </span>/home/user/seiscomp/etc/inventory/MY.xml<span class="w"> </span>...<span class="w"> </span><span class="k">done</span>
Parsing<span class="w"> </span>/home/user/seiscomp/etc/inventory/GE.xml<span class="w"> </span>...<span class="w"> </span><span class="k">done</span>
<span class="o">[</span>..<span class="o">]</span>
Merging<span class="w"> </span>inventory<span class="w"> </span>...<span class="w"> </span><span class="k">done</span>
<span class="w"> </span>network<span class="w"> </span>GR<span class="w"> </span>German<span class="w"> </span>Regional<span class="w"> </span>Seismic<span class="w"> </span>Network,<span class="w"> </span>BGR<span class="w"> </span>Hannover
<span class="w"> </span>epoch<span class="w"> </span><span class="m">1976</span>-02-17
<span class="w"> </span>station<span class="w"> </span>CLL<span class="w"> </span>GRSN<span class="w"> </span>Station<span class="w"> </span>Collm
<span class="w"> </span>epoch<span class="w"> </span><span class="m">1993</span>-04-01
<span class="w"> </span>location<span class="w"> </span>__
<span class="w"> </span>epoch<span class="w"> </span><span class="m">2007</span>-02-07
<span class="w"> </span>channel<span class="w"> </span>BHE
<span class="w"> </span>epoch<span class="w"> </span><span class="m">2007</span>-02-07
<span class="w"> </span>channel<span class="w"> </span>BHN
<span class="w"> </span>epoch<span class="w"> </span><span class="m">2007</span>-02-07
<span class="w"> </span>channel<span class="w"> </span>BHZ
<span class="w"> </span>epoch<span class="w"> </span><span class="m">2007</span>-02-07
<span class="w"> </span>channel<span class="w"> </span>HHE
<span class="w"> </span>epoch<span class="w"> </span><span class="m">2007</span>-02-07
</pre></div>
</div>
<p>This shows the networks, stations, and channels, and the time spans for
which they are known.
For active stations, there must be an epoch (time span) with a start date
but no end date shown for the desired channel.</p>
<p>The inventory is not yet synchronized with the database. To finalize
inventory configuration, run:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ seiscomp update-config
</pre></div>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>If you get an error, make sure that MySQL/MariaDB is running and the
database has been created correctly (see <a class="reference internal" href="postinstall.html#tutorials-postinstall"><span class="std std-ref">Installation on Ubuntu</span></a>).</p>
</div>
</section>
<section id="configuring-for-acquisition">
<h2>Configuring for acquisition<a class="headerlink" href="#configuring-for-acquisition" title="Permalink to this heading"></a></h2>
<p>If youve configured inventory above, youll already have a top-level
key file for the station in the <code class="file docutils literal notranslate"><span class="pre">~/seiscomp/etc/key</span></code> directory.</p>
<ul class="simple">
<li><p>You will need to know the waveform source, channels to be acquired,
location code used, if any.
See <a class="reference internal" href="waveforms.html#tutorials-waveforms"><span class="std std-ref">Get real-time data from a remote Seedlink server (single station)</span></a> for the remaining details.</p></li>
</ul>
</section>
<section id="configuring-processing">
<h2>Configuring processing<a class="headerlink" href="#configuring-processing" title="Permalink to this heading"></a></h2>
<p>Now you can enable the station for processing.
Follow the <a class="reference internal" href="processing.html#tutorials-processing"><span class="std std-ref">Configure real-time processing</span></a> tutorial.</p>
</section>
<section id="configuring-for-archiving">
<h2>Configuring for archiving<a class="headerlink" href="#configuring-for-archiving" title="Permalink to this heading"></a></h2>
<p>If you want to archive waveforms, consider how long they should be retained.
See <a class="reference internal" href="archiving.html#tutorials-archiving"><span class="std std-ref">Set up local waveform archiving</span></a> for how to do this.</p>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Add a new station</a><ul>
<li><a class="reference internal" href="#before-you-start">Before you start</a></li>
<li><a class="reference internal" href="#obtaining-inventory-for-your-station">Obtaining inventory for your station</a></li>
<li><a class="reference internal" href="#configuring-inventory">Configuring inventory</a></li>
<li><a class="reference internal" href="#configuring-for-acquisition">Configuring for acquisition</a></li>
<li><a class="reference internal" href="#configuring-processing">Configuring processing</a></li>
<li><a class="reference internal" href="#configuring-for-archiving">Configuring for archiving</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="upgrading.html"
title="previous chapter">Upgrading SeisComP</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="waveforms.html"
title="next chapter">Get real-time data from a remote Seedlink server (single station)</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/addstation.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,334 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Set up local waveform archiving &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Configure real-time processing" href="processing.html" />
<link rel="prev" title="Get real-time data from a remote Seedlink server (single station)" href="waveforms.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="processing.html" title="Configure real-time processing"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="waveforms.html" title="Get real-time data from a remote Seedlink server (single station)"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="set-up-local-waveform-archiving">
<span id="tutorials-archiving"></span><h1>Set up local waveform archiving<a class="headerlink" href="#set-up-local-waveform-archiving" title="Permalink to this heading"></a></h1>
<p>You will …</p>
<ul class="simple">
<li><p>Set up <a class="reference internal" href="../../apps/slarchive.html#slarchive"><span class="std std-ref">slarchive</span></a> with its necessary bindings</p></li>
<li><p>Set up <cite>purge_datafiles</cite> in crontab</p></li>
</ul>
<p>Pre-requisites for this tutorial:</p>
<ul class="simple">
<li><p>Have SeisComP installed</p></li>
<li><p>Tutorial on <a class="reference internal" href="addstation.html#tutorials-addstation"><span class="std std-ref">adding a new station</span></a></p></li>
<li><p>Tutorial on <a class="reference internal" href="geofon_waveforms.html#tutorials-geofon-waveforms"><span class="std std-ref">real-time data acquisition</span></a>
so that you have local data for GE stations.
Alternatively you may already obtain real-time waveform data from
somewhere else (see <a class="reference internal" href="waveforms.html#tutorials-waveforms"><span class="std std-ref">Get real-time data from a remote Seedlink server (single station)</span></a>).</p></li>
</ul>
<p>Afterwards/Results/Outcomes:</p>
<ul class="simple">
<li><p>Save real-time data in a local archive for later processing.</p></li>
<li><p>See <a class="reference internal" href="../glossary.html#term-miniSeed"><span class="xref std std-term">miniSEED</span></a> day files for GE stations in your local <a class="reference internal" href="../concepts/waveformarchives.html#concepts-waveformarchives"><span class="std std-ref">waveform archive</span></a>.</p></li>
</ul>
<p>Time range estimate:</p>
<ul class="simple">
<li><p>5 minutes</p></li>
</ul>
<p>Related tutorial(s):</p>
<ul class="simple">
<li><p>Tutorial on <a class="reference internal" href="servefdsnws.html#tutorials-servefdsnws"><span class="std std-ref">Enable local FDSNWS server</span></a></p></li>
<li><p>Tutorial on <a class="reference internal" href="waveformplayback.html#tutorials-waveformplayback"><span class="std std-ref">Play back archived waveforms</span></a></p></li>
</ul>
<hr class="docutils" />
<p><strong>Motivation</strong>:
Without activating archiving, your local Seedlink server
will only keep waveforms for a short time.
This makes it hard to review old events, for example.</p>
<p>In this example, well arrange for keeping waveforms for one week.
Before starting, youll need bindings for your stations;
see the tutorials <a class="reference internal" href="geofon_waveforms.html#tutorials-geofon-waveforms"><span class="std std-ref">Add real-time stations from GEOFON</span></a>
or <a class="reference internal" href="waveforms.html#tutorials-waveforms"><span class="std std-ref">Get real-time data from a remote Seedlink server (single station)</span></a>.</p>
<p>The <strong class="program">slarchive</strong> collects data and archives it
locally using a <a class="reference internal" href="../glossary.html#term-SDS"><span class="xref std std-term">SDS</span></a> file system structure of
nested subdirectories and systematically named files.</p>
<section id="in-scconfig">
<h2>In scconfig<a class="headerlink" href="#in-scconfig" title="Permalink to this heading"></a></h2>
<ol class="arabic">
<li><p>Under the Modules tab, go to Acquisition, and select <strong class="program">slarchive</strong>.
Here you can see the default parameters used.
By default, <strong class="program">slarchive</strong> connects to your local Seedlink server,
and archives to your local disk.</p></li>
<li><p>Under the System tab, select the line for <strong class="program">slarchive</strong>, and click
“Enable module(s)” button at the top.</p></li>
<li><p>Under Bindings:
On RHS right-click “slarchive” to add an slarchive profile.
Name it week, to keep waveforms for 7 days, and click Ok.
The new profile appears in the (bottom right corner of <strong class="program">scconfig</strong>.
Double click on the profile to open its settings.
Unlock the box labeled “keep”, and change the default from 30 to 7.</p>
<p>Once you have a binding profile, drag it over all the stations it
should apply to, under “Networks” on the left-hand side of the
bindings tool.</p>
</li>
</ol>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The name week is just a label.
Its functionality comes from changing the value of the <cite>keep</cite> parameter.
Changing the <em>name</em> of a binding profile does not change its function.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You can also choose which channels should be archived,
using the “<a class="reference internal" href="../../apps/slarchive.html#confval-selectors"><code class="xref std std-confval docutils literal notranslate"><span class="pre">selectors</span></code></a>” box.
For instance, you may collect data at several sample rates,
and only wish to archive the highest rate.
If you collect LH, BH, HH streams at 0.1, 20, and 100 samples
per second, respectively, you might retain only the HH streams,
by setting “<a class="reference internal" href="../../apps/slarchive.html#confval-selectors"><code class="xref std std-confval docutils literal notranslate"><span class="pre">selectors</span></code></a>” to “HH”.</p>
</div>
<ol class="arabic simple">
<li><p>Then return to System, and click Update configuration.
Make sure the <strong class="program">slarchive</strong> module, or no module, is selected.</p></li>
<li><p>Restart <strong class="program">slarchive</strong>.</p></li>
<li><p>Adjust the <a class="reference internal" href="../concepts/recordstream.html#concepts-recordstream"><span class="std std-ref">RecordStream</span></a> for making use of the archived waveforms
from within a <a class="reference internal" href="../glossary.html#term-GUI"><span class="xref std std-term">GUI</span></a> or automatic data processing modules.</p></li>
</ol>
</section>
<section id="command-line">
<h2>Command line<a class="headerlink" href="#command-line" title="Permalink to this heading"></a></h2>
<p>You will need to edit each of your top-level key files to refer to
a new binding profile.
e.g.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cd ~/seiscomp/etc/key
$ vi station_GR_CLL
</pre></div>
</div>
<p>Add the line <cite>slarchive:week</cite> to whatever lines are already there.
Afterwards it will look something like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># Binding references</span>
<span class="k">global</span><span class="p">:</span><span class="n">BH</span>
<span class="n">scautopick</span><span class="p">:</span><span class="n">default</span>
<span class="n">seedlink</span><span class="p">:</span><span class="n">geofon</span>
<span class="n">slarchive</span><span class="p">:</span><span class="n">week</span>
</pre></div>
</div>
<p>Repeat this for the top-level key file of each station
you wish this binding to apply to.
Now create the binding profile in the key directory.
This is a file with a name corresponding to the binding profile name; here: week</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cd ~/seiscomp/etc/key
$ mkdir slarchive
$ vi slarchive/profile_week
# Number of days the data is kept in the archive. This requires purge_datafile
# to be run as cronjob.
keep = 7
$ seiscomp enable slarchive
$ seiscomp update-config slarchive
$ seiscomp restart slarchive
slarchive is not running
starting slarchive
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Left unattended, your disk will eventually fill up with archived data.
To prevent this you will need a script like <cite>purge_database</cite>,
which is provided with SeisComP.
This can be run once per day using the <cite>cron</cite> feature of your system.
The command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ seiscomp print crontab
</pre></div>
</div>
<p>will print a number of lines to the terminal.
Type <cite>crontab -e</cite> and insert these lines into the crontab file for your
user (typically <cite>sysop</cite>).
Exit your crontab editor.
Displaying your crontab should now show a line for <cite>purge_database</cite>.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ crontab -l
20 3 * * * /home/sysop/seiscomp/var/lib/slarchive/purge_datafiles &gt;/dev/null 2&gt;&amp;1
[There may be other lines too.]
</pre></div>
</div>
<p>This shows you that the <cite>purge_datafiles</cite> script
will run every day at 3:20 a.m.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If you examine the <cite>purge_datafiles</cite> script, you will see that all it does
is look for files with a last modified time older than a certain number
of days ago.
The number of days to keep can be set station-by-station using the
ARCH_KEEP feature.
A convenient way to do this for many stations is with
multiple binding profiles, one for each length of time desired.</p>
</div>
</section>
<section id="checking-archiving-is-functioning">
<h2>Checking archiving is functioning<a class="headerlink" href="#checking-archiving-is-functioning" title="Permalink to this heading"></a></h2>
<ul>
<li><p>If <strong class="program">seedlink</strong> is configured correctly, a new stations streams
appears in output from <strong class="program">slinktool</strong>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ slinktool -Q : | grep CLL
GR CLL HHZ D 2020/04/01 01:11:57.6649 - 2020/04/01 07:28:49.0299
GR CLL HHE D 2020/04/01 01:11:57.6649 - 2020/04/01 07:28:45.0299
GR CLL HHN D 2020/04/01 01:11:57.6649 - 2020/04/01 07:28:39.2299
</pre></div>
</div>
<p>This shows three streams being acquired from station CLL.
The second time shown is the time of the most recent data for each stream.</p>
</li>
<li><p>If <strong class="program">slarchive</strong> is configured correctly, waveform data for the
station appears in <strong class="program">slarchive</strong>s SDS archive directory:</p>
<blockquote>
<div><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>ls<span class="w"> </span>-l<span class="w"> </span>seiscomp/var/lib/archive/2020/GR/CLL
total<span class="w"> </span><span class="m">12</span>
drwxr-xr-x<span class="w"> </span><span class="m">2</span><span class="w"> </span>user<span class="w"> </span>user<span class="w"> </span><span class="m">4096</span><span class="w"> </span>Apr<span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="m">06</span>:30<span class="w"> </span>HHE.D
drwxr-xr-x<span class="w"> </span><span class="m">2</span><span class="w"> </span>user<span class="w"> </span>user<span class="w"> </span><span class="m">4096</span><span class="w"> </span>Apr<span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="m">06</span>:30<span class="w"> </span>HHN.D
drwxr-xr-x<span class="w"> </span><span class="m">2</span><span class="w"> </span>user<span class="w"> </span>user<span class="w"> </span><span class="m">4096</span><span class="w"> </span>Apr<span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="m">06</span>:30<span class="w"> </span>HHZ.D
$<span class="w"> </span>ls<span class="w"> </span>-l<span class="w"> </span>seiscomp/var/lib/archive/2020/GR/CLL/HHZ.D/
total<span class="w"> </span><span class="m">12728</span>
-rw-r--r--<span class="w"> </span><span class="m">1</span><span class="w"> </span>user<span class="w"> </span>user<span class="w"> </span><span class="m">5492224</span><span class="w"> </span>Mar<span class="w"> </span><span class="m">31</span><span class="w"> </span><span class="m">00</span>:04<span class="w"> </span>GR.CLL..BHZ.D.2020.090
-rw-r--r--<span class="w"> </span><span class="m">1</span><span class="w"> </span>user<span class="w"> </span>user<span class="w"> </span><span class="m">7531008</span><span class="w"> </span>Apr<span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="m">00</span>:03<span class="w"> </span>GR.CLL..BHZ.D.2020.091
</pre></div>
</div>
</div></blockquote>
</li>
</ul>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Set up local waveform archiving</a><ul>
<li><a class="reference internal" href="#in-scconfig">In scconfig</a></li>
<li><a class="reference internal" href="#command-line">Command line</a></li>
<li><a class="reference internal" href="#checking-archiving-is-functioning">Checking archiving is functioning</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="waveforms.html"
title="previous chapter">Get real-time data from a remote Seedlink server (single station)</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="processing.html"
title="next chapter">Configure real-time processing</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/archiving.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,460 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Add real-time stations from GEOFON &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Enable local FDSNWS server" href="servefdsnws.html" />
<link rel="prev" title="Configure real-time processing" href="processing.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="servefdsnws.html" title="Enable local FDSNWS server"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="processing.html" title="Configure real-time processing"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="add-real-time-stations-from-geofon">
<span id="tutorials-geofon-waveforms"></span><h1>Add real-time stations from GEOFON<a class="headerlink" href="#add-real-time-stations-from-geofon" title="Permalink to this heading"></a></h1>
<p>You will use <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> to:</p>
<ul class="simple">
<li><p>Add stations of the GEOFON seismic network, obtained from GEOFON,
as a source of data.</p></li>
<li><p>Configure bindings to see these in your local system.</p></li>
</ul>
<p>Pre-requisites for this tutorial:</p>
<ul class="simple">
<li><p><a class="reference internal" href="postinstall.html#tutorials-postinstall"><span class="std std-ref">Installation</span></a></p></li>
</ul>
<p>Afterwards/Results/Outcomes:</p>
<ul class="simple">
<li><p><strong class="program">slinktool -Q</strong> locally shows GE streams are available</p></li>
<li><p><a class="reference internal" href="../../apps/scrttv.html#scrttv"><span class="std std-ref">scrttv</span></a> locally shows the GE station traces</p></li>
</ul>
<p>Time range estimate:</p>
<ul class="simple">
<li><p>10-15 minutes</p></li>
</ul>
<p>Related tutorial(s):</p>
<ul class="simple">
<li><p>Tutorial on <a class="reference internal" href="archiving.html#tutorials-archiving"><span class="std std-ref">Set up local waveform archiving</span></a></p></li>
<li><p>Tutorial on <a class="reference internal" href="servefdsnws.html#tutorials-servefdsnws"><span class="std std-ref">Enable local FDSNWS server</span></a></p></li>
</ul>
<hr class="docutils" />
<p>GEOFON operates a global broadband seismic network jointly with many
partner institutions with focus on EuroMed and Indian Ocean regions.
As of 2020, the network consists presently of 78 high-quality active stations,
for which data is acquired in real-time.
This network has been assigned the network code <em>GE</em> by the
International Federation of Digital Seismograph Networks (FDSN).</p>
<p>The GEOFON data centre in Potsdam provides real-time data feeds for these
stations.
This tutorial demonstrates how to use this data in your own SeisComP system.</p>
<p>The steps involved are:</p>
<ul class="simple">
<li><p>Download metadata for the stations of interest.</p></li>
<li><p>Import them into your SeisComP system, and create bindings.</p></li>
<li><p>View the stations and their traces in the SeisComP GUIs.</p></li>
</ul>
<section id="check-data-are-available">
<h2>Check data are available<a class="headerlink" href="#check-data-are-available" title="Permalink to this heading"></a></h2>
<p>First, well query the upstream Seedlink server, which runs on
host <cite>geofon.gfz-potsdam.de</cite> at port 18000.
We do this with SeisComPs <a class="reference internal" href="../../apps/slinktool.html#slinktool"><span class="std std-ref">slinktool</span></a> command, giving the <code class="docutils literal notranslate"><span class="pre">-L</span></code> option
to <a class="reference internal" href="../../apps/slinktool.html#slinktool"><span class="std std-ref">slinktool</span></a></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>slinktool<span class="w"> </span>-L<span class="w"> </span>geofon.gfz-potsdam.de
6C<span class="w"> </span>GF01<span class="w"> </span>GF01
6C<span class="w"> </span>GF02<span class="w"> </span>GF02
6C<span class="w"> </span>GF03<span class="w"> </span>GF03
<span class="o">[</span>..<span class="o">]</span>
ZB<span class="w"> </span>URD20<span class="w"> </span>URD20
ZB<span class="w"> </span>VAL41<span class="w"> </span>VAL41
ZB<span class="w"> </span>VOS<span class="w"> </span>VOS
</pre></div>
</div>
<p>This is a long list.
It shows the network code and station code of each
of the stations for which data is available from this Seedlink server.
Well just be interested in a few stations, namely those corresponding
to broadband 20 sps vertical channels - with channel code BHZ, and with network
code GE</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>slinktool<span class="w"> </span>-Q<span class="w"> </span>geofon.gfz-potsdam.de<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>^GE.*BHZ
GE<span class="w"> </span>ACRG<span class="w"> </span>BHZ<span class="w"> </span>D<span class="w"> </span><span class="m">2019</span>/11/28<span class="w"> </span><span class="m">06</span>:51:48.7500<span class="w"> </span>-<span class="w"> </span><span class="m">2019</span>/11/28<span class="w"> </span><span class="m">09</span>:18:32.1000
GE<span class="w"> </span>APE<span class="w"> </span>BHZ<span class="w"> </span>D<span class="w"> </span><span class="m">2019</span>/11/28<span class="w"> </span><span class="m">07</span>:40:52.0400<span class="w"> </span>-<span class="w"> </span><span class="m">2019</span>/11/28<span class="w"> </span><span class="m">12</span>:22:00.3950
GE<span class="w"> </span>ARPR<span class="w"> </span>BHZ<span class="w"> </span>D<span class="w"> </span><span class="m">2019</span>/11/27<span class="w"> </span><span class="m">23</span>:23:27.4400<span class="w"> </span>-<span class="w"> </span><span class="m">2019</span>/11/28<span class="w"> </span><span class="m">09</span>:41:22.1500
GE<span class="w"> </span>ARPR<span class="w"> </span>BHZ<span class="w"> </span>E<span class="w"> </span><span class="m">2019</span>/11/27<span class="w"> </span><span class="m">23</span>:23:27.4400<span class="w"> </span>-<span class="w"> </span><span class="m">2019</span>/11/28<span class="w"> </span><span class="m">09</span>:16:25.0400
<span class="o">[</span>..<span class="o">]</span>
GE<span class="w"> </span>KBS<span class="w"> </span><span class="m">00</span><span class="w"> </span>BHZ<span class="w"> </span>D<span class="w"> </span><span class="m">2019</span>/11/24<span class="w"> </span><span class="m">13</span>:22:12.9695<span class="w"> </span>-<span class="w"> </span><span class="m">2019</span>/11/24<span class="w"> </span><span class="m">22</span>:46:17.4195
GE<span class="w"> </span>KBS<span class="w"> </span><span class="m">10</span><span class="w"> </span>BHZ<span class="w"> </span>D<span class="w"> </span><span class="m">2019</span>/11/24<span class="w"> </span><span class="m">13</span>:22:12.9695<span class="w"> </span>-<span class="w"> </span><span class="m">2019</span>/11/24<span class="w"> </span><span class="m">22</span>:46:19.5945
GE<span class="w"> </span>KBU<span class="w"> </span>BHZ<span class="w"> </span>D<span class="w"> </span><span class="m">2019</span>/11/28<span class="w"> </span><span class="m">06</span>:53:21.8450<span class="w"> </span>-<span class="w"> </span><span class="m">2019</span>/11/28<span class="w"> </span><span class="m">12</span>:22:18.2450
<span class="o">[</span>..<span class="o">]</span>
</pre></div>
</div>
<p>The -Q option provides a formatted stream list,
with one line for each stream available from the server.
The columns are described in <a class="reference internal" href="waveforms.html#tutorials-waveforms"><span class="std std-ref">Get real-time data from a remote Seedlink server (single station)</span></a>;
the <cite>grep</cite> command here limits output to just those GE stations;
without it, this server provides over 16000 lines of output.)</p>
<p>For an active station, with low latency, the last data time (on the
right) will typically be just a few seconds in the past.
If a station or its network connection to the GEOFON server is down,
then it will be a longer time ago.</p>
</section>
<section id="download-station-metadata">
<h2>Download station metadata<a class="headerlink" href="#download-station-metadata" title="Permalink to this heading"></a></h2>
<p>There are several possible ways to obtain inventory.</p>
<ul class="simple">
<li><p>Use WebDC3 <a class="footnote-reference brackets" href="#webdc" id="id1" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a> or network pages <a class="footnote-reference brackets" href="#netpages" id="id2" role="doc-noteref"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a>
to obtain metadata for existing seismic networks.</p></li>
<li><p>Other sources of inventory, like a dataless SEED file, can also be used.</p></li>
<li><p>The Gempa Station Management Portal, <span id="id3"><em>SMP</em> [<a class="reference internal" href="../references.html#id268" title="SMP. Station Management Portal by gempa GmbH. URL: https://smp.gempa.de/.">22</a>]</span>,
is another important source of station metadata.
If you would like to create your own inventory you may use this online tool.
Before doing so, you will need to create an account on SMP.</p></li>
</ul>
<section id="option-1-using-fdsn-web-services">
<h3>Option 1: Using FDSN web services<a class="headerlink" href="#option-1-using-fdsn-web-services" title="Permalink to this heading"></a></h3>
<p>The FDSN web services <span id="id4">[<a class="reference internal" href="../references.html#id110" title="FDSNWS. International Federation of Digital Seismograph Networks. URL: http://www.fdsn.org/webservices/.">8</a>]</span> are the standard adopted by the FDSN and have been
deployed at almost every data centre.
One of them is called <em>fdsnws-station</em> and
is the service to contact to get all information related to stations, sensors,
responses, etc.</p>
<p>To get data from the <em>fdsnws-station</em> web service you can use any web client (browser or command
line). For instance, the <em>wget</em> command. The file you will receive will be in
StationXML format.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>wget<span class="w"> </span><span class="s2">&quot;http://geofon.gfz-potsdam.de/fdsnws/station/1/query?net=GE&amp;level=response&quot;</span><span class="w"> </span>-O<span class="w"> </span>ge.xml
</pre></div>
</div>
</section>
<section id="option-2-using-webdc3">
<h3>Option 2: Using WebDC3<a class="headerlink" href="#option-2-using-webdc3" title="Permalink to this heading"></a></h3>
<p>WebDC3 is a graphical interface which allows you not only to send requests to
FDSN webservice servers, but also to explore available stations
and query event catalogs
from different data centres among other possibilities.</p>
<p>You can find detailed information about WebDC3 in the on-line documentation at
<span id="id5"><em>WebDC3</em> [<a class="reference internal" href="../references.html#id287" title="WebDC3. Documentation. URL: https://webdc3.readthedocs.io/.">26</a>]</span>.</p>
<ul>
<li><p>Go to <a class="reference external" href="http://eida.gfz-potsdam.de/webdc3">http://eida.gfz-potsdam.de/webdc3</a> with a browser.</p></li>
<li><p>Click on “Explore stations” and move the slider to select only the current year
and only “Public permanent nets” on the Network type list.
Select the GE network, “All Stations”, BH channels, and click “Search”.</p></li>
<li><p>About 80 stations should appear on the map, and on the list below it.</p>
<figure class="align-center" id="id6">
<a class="reference internal image-reference" href="../../_images/geofon_webdc_stations.png"><img alt="../../_images/geofon_webdc_stations.png" src="../../_images/geofon_webdc_stations.png" style="width: 16cm;" /></a>
<figcaption>
<p><span class="caption-text">Stations of the GE network shown in WebDC, ready for a metadata request.</span><a class="headerlink" href="#id6" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</li>
<li><p>Go to the third tab, named “Submit request”.</p></li>
<li><p>Click on “Absolute Mode” for the “Time Window Selection” and select time
window from some time ago to the present.</p></li>
<li><p>In the “Request type” section, click on “Metadata (StationXML)”.
Set “Metadata level” to “Response”.
<strong>Response-level inventory is essential for SeisComP configuration</strong>.</p></li>
<li><p>For metadata requests, no token should be required.
(This is only used for requests for restricted waveform data.)</p></li>
<li><p>If everything looks correctly click on “Submit”.</p></li>
<li><p>Go to the fourth tab, called “Download Data”.</p></li>
<li><p>In the “FDSNWS Requests” block, click on “Save” to mkae your request
to the GEOFON fdsnws-station web service.</p></li>
<li><p>When its ready, you will be prompted to save an XML file to your local computer.</p></li>
</ul>
<p>Now find where your web browser has saved the file.</p>
</section>
</section>
<section id="import-the-inventory">
<h2>Import the inventory<a class="headerlink" href="#import-the-inventory" title="Permalink to this heading"></a></h2>
<p>It is easiest to use the import function of the <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> GUI.
Alternatively, you can import from the command line:</p>
<ul>
<li><p>From FDSN StationXML:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>fdsnxml2inv<span class="w"> </span>-f<span class="w"> </span>station.xml<span class="w"> </span>&gt;<span class="w"> </span>etc/inventory/mynetwork.xml
</pre></div>
</div>
</li>
<li><p>From SeisComP XML with filtering:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>invextr<span class="w"> </span>-f<span class="w"> </span>--chans<span class="w"> </span><span class="s1">&#39;NE.STA.*&#39;</span><span class="w"> </span>mynetwork.xml<span class="w"> </span>&gt;<span class="w"> </span>etc/inventory/mynetwork.xml
</pre></div>
</div>
</li>
</ul>
<p>Either way, afterwards, inventory is in <code class="file docutils literal notranslate"><span class="pre">~/seiscomp/etc/inventory</span></code>.
It now needs to be loaded in to the SeisComP database.</p>
<section id="import-the-metadata-for-your-stations">
<h3>Import the metadata for your stations<a class="headerlink" href="#import-the-metadata-for-your-stations" title="Permalink to this heading"></a></h3>
<ul>
<li><p>Open <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> from the terminal.
Click on the “Inventory” tab on the left side bar.</p></li>
<li><p>Select “Import” and at “Source:”, browse to the file with the inventory
(e.g. ~/Downloads/inventory.xml).
For “format”, select “fdsnxml”.</p>
<figure class="align-center" id="id7">
<a class="reference internal image-reference" href="../../_images/geofon_waveforms_old_fig5.png"><img alt="../../_images/geofon_waveforms_old_fig5.png" src="../../_images/geofon_waveforms_old_fig5.png" style="width: 16cm;" /></a>
<figcaption>
<p><span class="caption-text">The Inventory tab of <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>, during import of FDSN Station XML.
<em>TODO</em> Update this figure.</span><a class="headerlink" href="#id7" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</li>
<li><p>Click on OK, wait a couple of seconds, check that the process was successful -
it should display
“Writing inventory to /home/sysop/seiscomp/etc/inventory/{PACKAGE NAME}.xml”
and “Program exited normally” at the bottom.
Close the modal window.</p></li>
<li><p>Sync or Sync keys.
Make sure <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> and Spread are running.
SeisComP reads the inventory files in <code class="file docutils literal notranslate"><span class="pre">~/seiscomp/etc/inventory</span></code>
and loads them into the database.
You will see messages like “Sending notifiers: 2%” as this occurs.
Eventually you should see “Program exited normally” again.</p></li>
</ul>
<p>Alternatively, go to “System” (second icon in the left column),
click on “Update configuration” and restart SeisComP (Stop and Start buttons).</p>
</section>
</section>
<section id="configure-bindings">
<h2>Configure bindings<a class="headerlink" href="#configure-bindings" title="Permalink to this heading"></a></h2>
<p>As for individual stations (see the <a class="reference internal" href="processing.html#tutorials-processing"><span class="std std-ref">processing tutoriual</span></a>),
we will need to create bindings for every GE station to the
“global”, “scautopick” and “seedlink” applications, as follows:</p>
<ul>
<li><p>Create a global profile named “BH” by clicking with the right button on “global”
in the top right panel. Double click on it and set BH as <em>detectStream</em> and
empty location code as <em>detecLocID</em> information.</p>
<figure class="align-center" id="id8">
<a class="reference internal image-reference" href="../../_images/geofon_waveforms_old_fig6.png"><img alt="../../_images/geofon_waveforms_old_fig6.png" src="../../_images/geofon_waveforms_old_fig6.png" style="width: 16cm;" /></a>
<figcaption>
<p><span class="caption-text">The “Bindings” tab in <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.
A profile for global, called “BH” is being created.</span><a class="headerlink" href="#id8" title="Permalink to this image"></a></p>
<div class="legend">
<p><em>TODO</em> CX stations are visible too.</p>
</div>
</figcaption>
</figure>
</li>
<li><p>Create a <em>scautopick</em> profile named “default” (no changes necessary).</p></li>
<li><p>Create a <em>seedlink</em> profile named “geofon”. Double click on the profile.
Add a chain source with the green plus button on the left
(no other changes are necessary for data from GEOFONs server,
as it is the default).</p></li>
<li><p>Drag and drop all profiles from the right side to the network icon on the
left side (you may do that also at the station level).</p></li>
<li><p>Press Ctrl+S to save the configuration.
This writes configuration files in <code class="file docutils literal notranslate"><span class="pre">~/seiscomp/etc/key</span></code>.</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>A few GEOFON stations (including KBS, LVC, SUMG) are distributed
with a non-blank location code, typically either “00” or “10”.
Configuring these requires additional work.
You can create a profile setting <code class="xref std std-confval docutils literal notranslate"><span class="pre">detecLocID</span></code> to “10”,
called “10BHZ”, and apply this to the appropriate stations.
Repeat this for stations where location code “00” is desired (e.g. SFJD).</p>
</div>
</section>
<section id="update-the-configuration">
<h2>Update the configuration<a class="headerlink" href="#update-the-configuration" title="Permalink to this heading"></a></h2>
<p>The SeisComP database must be updated with the inventory and bindings.
SeisComPs modules then require restarting to load the updated information.</p>
<ul>
<li><p>Go to the System tab and press ESC (the Escape key, to de-select all modules).</p>
<ol class="arabic simple">
<li><p>Click on “Update configuration”, at the right of the window.
(<strong>Not</strong> “Update”, - that just refreshes <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>s
display of what is running!)</p></li>
<li><p>Press <em>Start</em> to start acquiring data from the already configured stations.</p></li>
</ol>
</li>
<li><p>Alternatively, on the command line</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span>update-config
$<span class="w"> </span>seiscomp<span class="w"> </span>restart
</pre></div>
</div>
</li>
</ul>
</section>
<section id="check-it-works">
<h2>Check it works<a class="headerlink" href="#check-it-works" title="Permalink to this heading"></a></h2>
<ul>
<li><p>To confirm that you have waveform data for the station locally,
run <a class="reference internal" href="../../apps/slinktool.html#slinktool"><span class="std std-ref">slinktool</span></a>.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>slinktool<span class="w"> </span>-Q
</pre></div>
</div>
</li>
<li><p>Open <a class="reference internal" href="../../apps/scmv.html#scmv"><span class="std std-ref">scmv</span></a> to see a map view of the configured stations.</p></li>
<li><p>Open <a class="reference internal" href="../../apps/scrttv.html#scrttv"><span class="std std-ref">scrttv</span></a> to see the incoming real-time streams.</p></li>
</ul>
<p>If you see colored triangles and traces incoming it means that
you have configured your system properly.
With this last step the configuration of these stations is considered to be finished.</p>
</section>
<section id="further-steps">
<h2>Further steps<a class="headerlink" href="#further-steps" title="Permalink to this heading"></a></h2>
<p>At this point,
you can follow the same procedure for other networks/stations, provided you</p>
<ol class="arabic simple">
<li><p>Have metadata available.</p></li>
<li><p>Know the location of a Seedlink server for, and have access to, the waveforms.</p></li>
</ol>
</section>
<section id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this heading"></a></h2>
<aside class="footnote-list brackets">
<aside class="footnote brackets" id="webdc" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id1">1</a><span class="fn-bracket">]</span></span>
<p>The WebDC3 service is available at <a class="reference external" href="http://eida.gfz-potsdam.de">http://eida.gfz-potsdam.de</a>.
See also
M. Bianchi, <em>et al.</em> (2015): WebDC3 Web Interface. GFZ Data Services.
doi:<a class="reference external" href="http://dx.doi.org/10.5880/GFZ.2.4/2016.001">10.5880/GFZ.2.4/2016.001</a></p>
</aside>
<aside class="footnote brackets" id="netpages" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id2">2</a><span class="fn-bracket">]</span></span>
<p>For instance that of the GEOFON Program, at
<a class="reference external" href="https://geofon.gfz-potsdam.de/waveform/archive/network.php?ncode=GE">https://geofon.gfz-potsdam.de/waveform/archive/network.php?ncode=GE</a>.</p>
</aside>
</aside>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Add real-time stations from GEOFON</a><ul>
<li><a class="reference internal" href="#check-data-are-available">Check data are available</a></li>
<li><a class="reference internal" href="#download-station-metadata">Download station metadata</a><ul>
<li><a class="reference internal" href="#option-1-using-fdsn-web-services">Option 1: Using FDSN web services</a></li>
<li><a class="reference internal" href="#option-2-using-webdc3">Option 2: Using WebDC3</a></li>
</ul>
</li>
<li><a class="reference internal" href="#import-the-inventory">Import the inventory</a><ul>
<li><a class="reference internal" href="#import-the-metadata-for-your-stations">Import the metadata for your stations</a></li>
</ul>
</li>
<li><a class="reference internal" href="#configure-bindings">Configure bindings</a></li>
<li><a class="reference internal" href="#update-the-configuration">Update the configuration</a></li>
<li><a class="reference internal" href="#check-it-works">Check it works</a></li>
<li><a class="reference internal" href="#further-steps">Further steps</a></li>
<li><a class="reference internal" href="#references">References</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="processing.html"
title="previous chapter">Configure real-time processing</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="servefdsnws.html"
title="next chapter">Enable local FDSNWS server</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/geofon_waveforms.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,405 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Help! Im stuck! Now what? &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Create a new tutorial" href="template.html" />
<link rel="prev" title="Play back archived waveforms" href="waveformplayback.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="template.html" title="Create a new tutorial"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="waveformplayback.html" title="Play back archived waveforms"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="help-i-m-stuck-now-what">
<span id="tutorials-help"></span><h1>Help! Im stuck! Now what?<a class="headerlink" href="#help-i-m-stuck-now-what" title="Permalink to this heading"></a></h1>
<p>You will …</p>
<ul class="simple">
<li><p>Troubleshoot and resolve problems with SeisComP</p></li>
</ul>
<p>Pre-requisites for this tutorial:</p>
<ul class="simple">
<li><p>Have your SeisComP installation and configuration available</p></li>
</ul>
<p>Afterwards/Results/Outcomes:</p>
<ul class="simple">
<li><p>Improved understanding of ways to solve issues when operating SeisComP</p></li>
</ul>
<p>Time range estimate:</p>
<ul class="simple">
<li><p>30 minutes</p></li>
</ul>
<hr class="docutils" />
<section id="outline">
<h2>Outline<a class="headerlink" href="#outline" title="Permalink to this heading"></a></h2>
<p>Inevitably you will encounter difficulties using SeisComP.
This tutorial reviews a few ways to diagnose your problems and
get help to resolve them:</p>
<ul class="simple">
<li><p>Detailed <a class="reference internal" href="#sec-tutorial-help-documentation"><span class="std std-ref">HTML documentation</span></a></p></li>
<li><p><a class="reference internal" href="#sec-tutorial-help-commandline"><span class="std std-ref">Commandline help</span></a></p></li>
<li><p>The <a class="reference internal" href="#sec-tutorial-help-forum"><span class="std std-ref">SeisComP Forum</span></a></p></li>
<li><p>Reviewing <a class="reference internal" href="#sec-tutorial-help-logging"><span class="std std-ref">logging options</span></a></p></li>
<li><p>The <a class="reference internal" href="#sec-tutorial-help-debugging"><span class="std std-ref">debugging options</span></a></p></li>
<li><p><a class="reference internal" href="#sec-tutorial-help-commercial"><span class="std std-ref">Commercial support</span></a></p></li>
</ul>
</section>
<section id="ways-to-diagnose-and-to-get-help">
<h2>Ways to diagnose and to get help<a class="headerlink" href="#ways-to-diagnose-and-to-get-help" title="Permalink to this heading"></a></h2>
<section id="html-documentation">
<span id="sec-tutorial-help-documentation"></span><h3>HTML documentation<a class="headerlink" href="#html-documentation" title="Permalink to this heading"></a></h3>
<p>Most modules have HTML documentation. When installed, it can be found in <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>
under <em>Docs</em>. The HTML documentation can also be reached from the <em>Help</em> menu of all GUIs.
It contains the description of configuration and command-line parameters along with
an overview with many detailed information.</p>
<figure class="align-center" id="id5">
<a class="reference internal image-reference" href="../../_images/gui_help.png"><img alt="../../_images/gui_help.png" src="../../_images/gui_help.png" style="width: 16cm;" /></a>
<figcaption>
<p><span class="caption-text"><a class="reference internal" href="../../apps/scmv.html#scmv"><span class="std std-ref">scmv</span></a> with access to the HTML documentation.</span><a class="headerlink" href="#id5" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>The description of most configuration parameters is also available from
within <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.
Look under <em>Modules</em>, and choose the relevant module.
For each parameter, the first few lines of description are shown;
hovering over these reveals the full text.</p>
<p>The HTML documentation is built regularly and available online, e.g.
<a class="reference external" href="https://docs.gempa.de">gempas documentation</a>.</p>
</section>
<section id="commandline-help">
<span id="sec-tutorial-help-commandline"></span><h3>Commandline help<a class="headerlink" href="#commandline-help" title="Permalink to this heading"></a></h3>
<p>In addition to the HTML documentation, many SeisComP commands have manual
pages which can be read on the command line:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>man<span class="w"> </span><span class="o">[</span>module<span class="w"> </span>name<span class="o">]</span>
</pre></div>
</div>
<p>and help on command-line options:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="o">[</span>module<span class="w"> </span>name<span class="o">]</span><span class="w"> </span>-h
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The command-line option <em>-h</em> can be used with almost all modules. No matter how many
other command-line parameters were given, <em>-h</em> will stop the module and print
the help on the command-line.</p>
</div>
</section>
<section id="configuration-parameters">
<span id="sec-tutorial-help-config-params"></span><h3>Configuration parameters<a class="headerlink" href="#configuration-parameters" title="Permalink to this heading"></a></h3>
<p>The <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> GUI tool can be conveniently used to adjust the <a class="reference internal" href="../glossary.html#term-module"><span class="xref std std-term">module</span></a>
and <a class="reference internal" href="../glossary.html#term-binding"><span class="xref std std-term">bindings</span></a> configuration. It also displays help on each individual
configuration parameter for every module. Read the <a class="reference internal" href="../concepts/configuration.html#concepts-configuration"><span class="std std-ref">concepts
section on configuration</span></a> for a comprehensive overview.</p>
<div class="two column layout"><figure class="align-default" id="id6">
<img alt="scconfig: tool tips" src="../../_images/scconfig-tooltips.png" />
<figcaption>
<p><span class="caption-text">Tool tips provide information on parameters.</span><a class="headerlink" href="#id6" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<figure class="align-default" id="id7">
<img alt="scconfig: parameter evaluation" src="../../_images/scconfig-evaluation.png" />
<figcaption>
<p><span class="caption-text">scconfig evaluates the syntax of input values.</span><a class="headerlink" href="#id7" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</div></section>
<section id="command-line-parameters">
<span id="sec-tutorial-help-cmdline-params"></span><h3>Command-line parameters<a class="headerlink" href="#command-line-parameters" title="Permalink to this heading"></a></h3>
<p>Command-line parameters provide additional flexibility when executing modules.
To learn about them read the <a class="reference internal" href="#sec-tutorial-help-documentation"><span class="std std-ref">HTML documentation</span></a> or execute</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="o">[</span>module<span class="w"> </span>name<span class="o">]</span><span class="w"> </span>-h
</pre></div>
</div>
</section>
<section id="the-seiscomp-forum">
<span id="sec-tutorial-help-forum"></span><h3>The SeisComP Forum<a class="headerlink" href="#the-seiscomp-forum" title="Permalink to this heading"></a></h3>
<figure class="align-center" id="id8">
<a class="reference internal image-reference" href="../../_images/help_forum.png"><img alt="../../_images/help_forum.png" src="../../_images/help_forum.png" style="width: 16cm;" /></a>
<figcaption>
<p><span class="caption-text">The <span id="id1"><em>SeisComP forum</em> [<a class="reference internal" href="../references.html#id256" title="SeisComP forum. GFZ. URL: https://forum.seiscomp.de/.">24</a>]</span>.</span><a class="headerlink" href="#id8" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>The <span id="id2"><em>SeisComP forum</em> [<a class="reference internal" href="../references.html#id256" title="SeisComP forum. GFZ. URL: https://forum.seiscomp.de/.">24</a>]</span> is the place to discuss <cite>SeisComP</cite>.
Announcements about updates, training courses and more are posted
here by the developers, and users can post questions or discuss
new developments.
Anyone can browse the forum, while registration is required to post there.</p>
<p>If you have specific technical problems, it helps to have tried
some of the ideas below.
Please include version information (the -V option described below)
if you report a problem.</p>
</section>
<section id="logging">
<span id="sec-tutorial-help-logging"></span><h3>Logging<a class="headerlink" href="#logging" title="Permalink to this heading"></a></h3>
<p>Most SeisComP applications use a standard logging approach.
By default, they log to files in your <code class="file docutils literal notranslate"><span class="pre">~/.seiscomp/log</span></code> directory,
such as <code class="file docutils literal notranslate"><span class="pre">scamp.log</span></code>.
Further options for logging are described in
<a class="reference internal" href="../concepts/configuration.html#concepts-configuration"><span class="std std-ref">Configuration</span></a>.</p>
<p>You can control how often these are rotated
(old log files are closed, and moved to a new file name, such as scamp.log.1, e.g. daily).
Alternatively you can use the system-wide logging facility <cite>syslog</cite>
and send logs to /var/log or another “standard” place.</p>
<p>There are four levels of severity of SeisComP log messages,
and applications can be configured to show only those which
are more severe than a given threshold.</p>
<ul class="simple">
<li><p>1 = ERROR</p></li>
<li><p>2 = WARNING</p></li>
<li><p>3 = INFO</p></li>
<li><p>4 = DEBUG.</p></li>
</ul>
<p>Default is 2.
Setting <cite>logging.level = 4</cite> results in the most messages.</p>
<p>For other modules such as <a class="reference internal" href="../../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a>, the log files are written to
<code class="file docutils literal notranslate"><span class="pre">seiscomp/var/log/</span></code></p>
</section>
<section id="debugging-options">
<span id="sec-tutorial-help-debugging"></span><h3>Debugging options<a class="headerlink" href="#debugging-options" title="Permalink to this heading"></a></h3>
<p>Most SeisComP applications support two important command line options:</p>
<ul class="simple">
<li><p>Use <cite>console</cite> to send output to the terminal instead of the usual
log location.</p></li>
<li><p><cite>-v</cite> for increased verbosity, or use <cite>verbosity=</cite> <em>n</em> where <em>n</em>
is one of the four severity levels above.</p></li>
</ul>
<p>In addition:</p>
<ul>
<li><p><cite>debug</cite> sets logging.level (see above) to 4 (DEBUG),
and sends logging output to the console (terminal) instead of the usual
log location.
(This is just an easier way of specifying <cite>verbosity=4 console=1</cite>.)
For example:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>~/seiscomp/bin/seiscomp<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>scmag<span class="w"> </span>--debug
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>Adding<span class="w"> </span>plugin<span class="w"> </span>path:<span class="w"> </span>.
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>Adding<span class="w"> </span>plugin<span class="w"> </span>path:<span class="w"> </span>/home/user/.seiscomp/plugins
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>Adding<span class="w"> </span>plugin<span class="w"> </span>path:<span class="w"> </span>/home/user/seiscomp/lib/plugins
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>Adding<span class="w"> </span>plugin<span class="w"> </span>path:<span class="w"> </span>/home/user/seiscomp/lib
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>Adding<span class="w"> </span>plugin<span class="w"> </span>path:<span class="w"> </span>/home/user/seiscomp/share/plugins
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>Adding<span class="w"> </span>plugin<span class="w"> </span>path:<span class="w"> </span>/home/user/seiscomp/lib
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>Adding<span class="w"> </span>plugin<span class="w"> </span>path:<span class="w"> </span>/home/user/seiscomp/lib
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>Adding<span class="w"> </span>plugin<span class="w"> </span>path:<span class="w"> </span>/home/user/seiscomp/share/plugins/scmag
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>Trying<span class="w"> </span>to<span class="w"> </span>open<span class="w"> </span>plugin<span class="w"> </span>at<span class="w"> </span>/home/user/seiscomp/share/plugins/dbmysql.so
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>info<span class="o">]</span><span class="w"> </span>Plugin<span class="w"> </span>dbmysql<span class="w"> </span>registered
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>info<span class="o">]</span>
Plugins:
--------
<span class="w"> </span><span class="o">[</span><span class="m">1</span><span class="o">]</span>
<span class="w"> </span>description:<span class="w"> </span>MySQL<span class="w"> </span>database<span class="w"> </span>driver
<span class="w"> </span>author:<span class="w"> </span>GFZ<span class="w"> </span>Potsdam<span class="w"> </span>&lt;seiscomp-devel@gfz-potsdam.de&gt;
<span class="w"> </span>version:<span class="w"> </span><span class="m">0</span>.9.2
<span class="w"> </span>API:<span class="w"> </span><span class="m">12</span>.1.0
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>info<span class="o">]</span><span class="w"> </span>Connect<span class="w"> </span>to<span class="w"> </span>messaging
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>Trying<span class="w"> </span>to<span class="w"> </span>connect<span class="w"> </span>to<span class="w"> </span>scmag@localhost<span class="w"> </span>with<span class="w"> </span>primary<span class="w"> </span><span class="nv">group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>MAGNITUDE
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>info<span class="o">]</span><span class="w"> </span>Connecting<span class="w"> </span>to<span class="w"> </span>server:<span class="w"> </span>localhost
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>info<span class="o">]</span><span class="w"> </span>Connected<span class="w"> </span>to<span class="w"> </span>message<span class="w"> </span>server:<span class="w"> </span>localhost
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>info<span class="o">]</span><span class="w"> </span>Joining<span class="w"> </span>MASTER_GROUP<span class="w"> </span>group
<span class="m">11</span>:47:50<span class="w"> </span><span class="o">[</span>info<span class="o">]</span><span class="w"> </span>Sending<span class="w"> </span>connect<span class="w"> </span>message<span class="w"> </span>to<span class="w"> </span>server:<span class="w"> </span>localhost
<span class="m">11</span>:47:51<span class="w"> </span><span class="o">[</span>info<span class="o">]</span><span class="w"> </span>Server<span class="w"> </span>version<span class="w"> </span>is<span class="w"> </span><span class="s1">&#39;Jakarta 2018.327.p15&#39;</span>
<span class="m">11</span>:47:51<span class="w"> </span><span class="o">[</span>info<span class="o">]</span><span class="w"> </span>Outgoing<span class="w"> </span>messages<span class="w"> </span>are<span class="w"> </span>encoded<span class="w"> </span>to<span class="w"> </span>match<span class="w"> </span>schema<span class="w"> </span>version<span class="w"> </span><span class="m">0</span>.11
<span class="m">11</span>:47:51<span class="w"> </span><span class="o">[</span>info<span class="o">]</span><span class="w"> </span>user<span class="w"> </span><span class="s2">&quot;scmag&quot;</span><span class="w"> </span>connected<span class="w"> </span>successfully<span class="w"> </span>to<span class="w"> </span>localhost
</pre></div>
</div>
<p>The above reveals that <strong class="program">scmag</strong> was able to load, and connect to the
messaging system.
Note that the <em>verbosity</em> of each message (“info”, “debug”, etc) is also
shown.
However a moment later we see:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="m">11</span>:47:51<span class="w"> </span><span class="o">[</span>info<span class="o">]</span><span class="w"> </span>Connect<span class="w"> </span>to<span class="w"> </span>database
<span class="m">11</span>:47:51<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>skipping<span class="w"> </span>unknown<span class="w"> </span>network<span class="w"> </span>message
<span class="m">11</span>:47:51<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>skipping<span class="w"> </span>unknown<span class="w"> </span>network<span class="w"> </span>message
<span class="m">11</span>:47:51<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>skipping<span class="w"> </span>unknown<span class="w"> </span>network<span class="w"> </span>message
<span class="m">11</span>:47:56<span class="w"> </span><span class="o">[</span>error<span class="o">]</span><span class="w"> </span>Timeout<span class="w"> </span><span class="k">while</span><span class="w"> </span>waiting<span class="w"> </span><span class="k">for</span><span class="w"> </span>database<span class="w"> </span>provide<span class="w"> </span>message
<span class="m">11</span>:47:56<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>Leaving<span class="w"> </span>::done
<span class="m">11</span>:47:56<span class="w"> </span><span class="o">[</span>info<span class="o">]</span><span class="w"> </span>Shutting<span class="w"> </span>down<span class="w"> </span>MagTool
-<span class="w"> </span>database<span class="w"> </span>accesses<span class="w"> </span><span class="k">while</span><span class="w"> </span>runtime:<span class="w"> </span><span class="m">0</span>
</pre></div>
</div>
<p>This suggests that <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> was not running to provide a
connection to the database.
To resolve this, you could next check that <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> is
running as expected.</p>
</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Instead of <cite>debug</cite> in the example above, you could run</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>~/seiscomp/bin/seiscomp<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>scmag<span class="w"> </span>-vvvv
</pre></div>
</div>
<p>The output is the same, but it is sent to your normal logging file,
typically <cite>~/.seiscomp/log/scmag.log</cite>.</p>
</div>
<p>In <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>, logging can be set globally.
Go to the Modules tab, then System &gt; global (see “logging”)
or per module.</p>
<p>e.g. set “logging.level = 3” in $SEISCOMP_ROOT/etc/scamp.log
to set level to <em>INFO</em> only for <a class="reference internal" href="../../apps/scamp.html#scamp"><span class="std std-ref">scamp</span></a>.</p>
<p>You should also be aware of the version of SeisComP that you are running.
The -V or version option provides this for many SeisComP modules.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>~/seiscomp3/bin/seiscomp<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>scmag<span class="w"> </span>-V
scmag:<span class="w"> </span>Jakarta<span class="w"> </span><span class="m">2018</span>.327.p15
API<span class="w"> </span>version:<span class="w"> </span><span class="m">12</span>.1.0
GIT<span class="w"> </span>HEAD:
Compiler:<span class="w"> </span>c++<span class="w"> </span><span class="o">(</span>Ubuntu<span class="w"> </span><span class="m">7</span>.3.0-16ubuntu3<span class="o">)</span><span class="w"> </span><span class="m">7</span>.3.0
Build<span class="w"> </span>system:<span class="w"> </span>Linux<span class="w"> </span><span class="m">4</span>.15.0-20-generic
OS:<span class="w"> </span>Ubuntu<span class="w"> </span><span class="m">18</span>.04<span class="w"> </span>LTS<span class="w"> </span>/<span class="w"> </span>Linux
</pre></div>
</div>
</section>
<section id="commercial-support">
<span id="sec-tutorial-help-commercial"></span><h3>Commercial support<a class="headerlink" href="#commercial-support" title="Permalink to this heading"></a></h3>
<p>Professional commercial support to SeisComP users is available from
<span id="id3"><em>gempa GmbH</em> [<a class="reference internal" href="../references.html#id122" title="gempa GmbH. The SeisComP development and maintenance company. URL: https://www.gempa.de/.">28</a>]</span>.</p>
</section>
</section>
<section id="next-time-you-have-a-problem">
<h2>Next time you have a problem<a class="headerlink" href="#next-time-you-have-a-problem" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>Try some of the above techniques.</p></li>
<li><p>If you find a solution, dont forget to share it at the <span id="id4"><em>SeisComP forum</em> [<a class="reference internal" href="../references.html#id256" title="SeisComP forum. GFZ. URL: https://forum.seiscomp.de/.">24</a>]</span>.</p></li>
</ul>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Help! Im stuck! Now what?</a><ul>
<li><a class="reference internal" href="#outline">Outline</a></li>
<li><a class="reference internal" href="#ways-to-diagnose-and-to-get-help">Ways to diagnose and to get help</a><ul>
<li><a class="reference internal" href="#html-documentation">HTML documentation</a></li>
<li><a class="reference internal" href="#commandline-help">Commandline help</a></li>
<li><a class="reference internal" href="#configuration-parameters">Configuration parameters</a></li>
<li><a class="reference internal" href="#command-line-parameters">Command-line parameters</a></li>
<li><a class="reference internal" href="#the-seiscomp-forum">The SeisComP Forum</a></li>
<li><a class="reference internal" href="#logging">Logging</a></li>
<li><a class="reference internal" href="#debugging-options">Debugging options</a></li>
<li><a class="reference internal" href="#commercial-support">Commercial support</a></li>
</ul>
</li>
<li><a class="reference internal" href="#next-time-you-have-a-problem">Next time you have a problem</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="waveformplayback.html"
title="previous chapter">Play back archived waveforms</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="template.html"
title="next chapter">Create a new tutorial</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/help.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,406 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Magnitudes: Regionalization, Aliases, Mw &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Play back archived waveforms" href="waveformplayback.html" />
<link rel="prev" title="Enable local FDSNWS server" href="servefdsnws.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="waveformplayback.html" title="Play back archived waveforms"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="servefdsnws.html" title="Enable local FDSNWS server"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="magnitudes-regionalization-aliases-mw">
<span id="tutorials-magnitude-region-aliases"></span><h1>Magnitudes: Regionalization, Aliases, Mw<a class="headerlink" href="#magnitudes-regionalization-aliases-mw" title="Permalink to this heading"></a></h1>
<p>You will …</p>
<ul class="simple">
<li><p>Regionalize magnitude</p></li>
<li><p>Create new magnitude types as aliases from other magnitudes and amplitudes.</p></li>
<li><p>Map magnitudes to the moment magnitude, Mw</p></li>
</ul>
<dl class="field-list simple">
<dt class="field-odd">Pre-requisites for this tutorial<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>Read the <a class="reference internal" href="../concepts/magnitudes.html#concepts-magnitudes"><span class="std std-ref">concepts section on magnitudes</span></a>.</p></li>
<li><p>Real-time data for the station must be available locally.
See <a class="reference internal" href="waveforms.html#tutorials-waveforms"><span class="std std-ref">Get real-time data from a remote Seedlink server (single station)</span></a> or <a class="reference internal" href="geofon_waveforms.html#tutorials-geofon-waveforms"><span class="std std-ref">Add real-time stations from GEOFON</span></a>.</p></li>
<li><p>Inventory must be loaded locally.</p></li>
</ul>
</dd>
<dt class="field-even">Afterwards/Results/Outcomes<span class="colon">:</span></dt>
<dd class="field-even"><ul class="simple">
<li><p>Regionalized magnitudes,</p></li>
<li><p>New magnitude types as aliases.</p></li>
<li><p>Moment magnitudes</p></li>
</ul>
</dd>
<dt class="field-odd">Time range estimate<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>30 minutes</p></li>
</ul>
</dd>
</dl>
<hr class="docutils" />
<section id="regionalize-magnitudes">
<span id="tutorials-magnitude-region"></span><h2>Regionalize Magnitudes<a class="headerlink" href="#regionalize-magnitudes" title="Permalink to this heading"></a></h2>
<p>By regionalization, magnitudes can be computed with region-dependent properties.
The procedure to set up magnitude regionalization is:</p>
<ol class="arabic">
<li><p>Create one file which contains the polygons surrounding the regions within
which magnitude parameters shall apply. The polygon files are provided in
<a class="reference internal" href="../../apps/global_gui.html#sec-gui-layers-vector-format-bna"><span class="std std-ref">BNA</span></a> or
<a class="reference internal" href="../../apps/global_gui.html#sec-gui-layers-vector-format-geojson"><span class="std std-ref">GeoJSON format</span></a> and located as
set out in the <a class="reference internal" href="../../apps/global_gui.html#sec-gui-layers"><span class="std std-ref">documentation of map layers</span></a>. The file
can be created from any <cite>SeisComP</cite> GUI application providing maps, e.g.,
<a class="reference internal" href="../../apps/scmv.html#scmv"><span class="std std-ref">scmv</span></a>.</p></li>
<li><p>For the desired magnitude type create a magnitude-type profile in global
module configuration. The name of the profile matches the name of the
magnitude, e.g., <em>MLc</em> for the <a class="reference internal" href="../../apps/global_mlc.html#global-mlc"><span class="std std-ref">MLc magnitude</span></a>.</p></li>
<li><p>Configure the <code class="xref std std-confval docutils literal notranslate"><span class="pre">magnitudes.MLc.regionFile</span></code> parameter with the full
path and name of the polygon file created above.</p></li>
<li><p>Within the magnitude-type profile create one or more magnitude-region
profile(s) for defining the regionalized parameters applied to the region(s).
The name of a profile corresponds to the name of the polygon contained in the
polygon file to which the parameters shall apply. Use <em>world</em> for all regions
not covered by any polygon.</p></li>
<li><p>Configure the regionalized magnitude parameters of the magnitude-region
profile. Activate the <em>enable</em> parameter if you wish to apply this profile.</p></li>
<li><p>Restart the data processing:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>restart
</pre></div>
</div>
<p>or execute a GUI module.</p>
</li>
</ol>
<div class="admonition important">
<p class="admonition-title">Important</p>
<ul class="simple">
<li><p>Parameters which can be configured along with regionalization assume
defaults from global binding parameters but override global bindings
parameters when configured.</p></li>
<li><p>Once regionalization is active, magnitudes for events outside the
defined region(s) will not be computed. For considering such events add
another magnitude-region profile with the name “<em>world</em>”.
Magnitudes for events outside any other magnitude-region profile will then
be computed according to this profile.</p></li>
</ul>
</div>
<section id="station-corrections">
<h3>Station corrections<a class="headerlink" href="#station-corrections" title="Permalink to this heading"></a></h3>
<p><a class="reference internal" href="../concepts/magnitudes.html#concepts-magnitudes-correction"><span class="std std-ref">Magnitude station corrections</span></a> can also
be applied in case of regionalization. Simply add the names of the
magnitude-region profile along with the correction parameter to the original
parameter in global module configuration, <code class="file docutils literal notranslate"><span class="pre">global.cfg</span></code>, for the respective
magnitude type and station. Use comma separation for multiple regions and colon
for separating the region name from the value.</p>
<p>Example for correcting MLv computed at station GE.UGM:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">module.trunk.GE.UGM.magnitudes.MLv.offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">0.1, europe:0.2, asia:-0.1</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The configuration of parameters starting with <em>module.trunk.</em> is not
supported by <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>. All corresponding configurations must be done
by directly editing the configuration file, e.g.,
<code class="file docutils literal notranslate"><span class="pre">seiscomp/etc/global.cfg</span></code>.</p>
</div>
</section>
</section>
<section id="magnitude-aliases">
<span id="tutorials-magnitude-aliases"></span><h2>Magnitude Aliases<a class="headerlink" href="#magnitude-aliases" title="Permalink to this heading"></a></h2>
<p>New magnitude types (aliases) can be created based on existing magnitude and
amplitude types but configured specifically.</p>
<p>The procedure to set up magnitude aliases is:</p>
<ol class="arabic">
<li><p>Create a magnitude alias in <code class="file docutils literal notranslate"><span class="pre">global.cfg</span></code> by configuring
<a class="reference internal" href="../../apps/global.html#confval-magnitudes.aliases"><code class="xref std std-confval docutils literal notranslate"><span class="pre">magnitudes.aliases</span></code></a>. Example:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">magnitudes.aliases</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">MLc1:MLc:MLc</span>
</pre></div>
</div>
</li>
<li><p>Configure the alias magnitudes in either way:</p>
<ul class="simple">
<li><p>Write bindings parameters to global module configuration or</p></li>
<li><p>Set up <a class="reference internal" href="#tutorials-magnitude-region"><span class="std std-ref">regionalization</span></a>:</p></li>
</ul>
<p><strong>Binding parameters in global module configuration:</strong></p>
<ol class="arabic">
<li><p>Read the relevant parameter names of the original magnitude from global
binding, e.g., in <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>. The names must include the full
hierarchy including all sections. Example:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">magnitudes.MLc01.parametric.c1</span>
</pre></div>
</div>
</li>
<li><p>Open the module configuration file, e.g.,
<code class="file docutils literal notranslate"><span class="pre">seiscomp/etc/global.cfg</span></code> in a text editor.</p></li>
<li><p>Prepend <em>module.trunk.global.</em> to the parameter name and add it along with
its value to the configuration file. Example:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">module.trunk.global.magnitudes.MLc01.parametric.c1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">0.7</span>
</pre></div>
</div>
</li>
<li><p>Add the new magnitude name to the configuration of all relevant modules,
e.g., <a class="reference internal" href="../../apps/scamp.html#scamp"><span class="std std-ref">scamp</span></a>, <a class="reference internal" href="../../apps/scmag.html#scmag"><span class="std std-ref">scmag</span></a>, <a class="reference internal" href="../../apps/scevent.html#scevent"><span class="std std-ref">scevent</span></a>, <a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a>.</p></li>
</ol>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The parameters starting with <em>module.trunk.</em> are not available for
configuration in <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.</p>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Binding parameters configured in global module configuration should only
be considered exceptionally. These parameters will</p>
<ul class="simple">
<li><p>Override the corresponding parameters configured by regionalization
using the region <em>world</em>.</p></li>
<li><p>Not be written to the database and cannot be accessed by SeisComP
modules running on other computers.</p></li>
</ul>
</div>
<p><strong>Regionalization:</strong></p>
<ul>
<li><p>Consider the tutorial on
<a class="reference internal" href="#tutorials-magnitude-region"><span class="std std-ref">magnitude regionalization</span></a> above.</p></li>
<li><p>For the name of the new magnitude-type profile now use the alias name.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>When adding the magnitude-region profile in
<a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>, scconfig does not know about the referenced original
magnitude. Therefore, not all possible configuration parameters may be
listed depending on the magnitude, e.g. for MLc. For getting the full
list, first create and configure a magnitude-region profile for the
referenced magnitude.</p>
<ol class="arabic simple">
<li><p>Close scconfig</p></li>
<li><p>Open the configuration file <code class="file docutils literal notranslate"><span class="pre">global.cfg</span></code></p></li>
<li><p>Rename the name of the referenced magnitude in the parameters to the
name of the alias.</p></li>
</ol>
</div>
</li>
</ul>
</li>
</ol>
</section>
<section id="moment-magnitudes">
<span id="tutorials-mags-moment"></span><h2>Moment Magnitudes<a class="headerlink" href="#moment-magnitudes" title="Permalink to this heading"></a></h2>
<p>All magnitudes, Mx, can be mapped to a moment magnitude, Mw(Mx).
The configuration procedure is:</p>
<ol class="arabic">
<li><p>Set up a magnitude-type profile for the original magnitude type in global
module configuration. Use <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> for creating the profile.</p></li>
<li><p>Configure the parameter <em>MwMapping</em>, which will become available along with
the new profile, e.g., <code class="xref std std-confval docutils literal notranslate"><span class="pre">magnitudes.MLc.MwMapping</span></code>. Alternatively,
add the parameter to <code class="file docutils literal notranslate"><span class="pre">seiscomp/etc/global.cfg</span></code>. The parameter is
configured as a list of sample points of a piecewise linear function mapping
from the original magnitude, Mx, to Mw(Mx).
Example for Mw(MLc) based on MLc:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">magnitudes.MLc.MwMapping</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">MLc_0:Mw(MLc)_0,MLc_1:Mw(MLc)_1,...,MLc_N:Mw(MLc)_N</span>
</pre></div>
</div>
<p>Any magnitude value outside the configured range is ignored.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Do not map the magnitudes <a class="reference internal" href="../glossary.html#term-magnitude-broadband-body-wave-mB"><span class="xref std std-term">mB</span></a>
and <a class="reference internal" href="../glossary.html#term-magnitude-broadband-P-wave-moment-Mwp"><span class="xref std std-term">Mwp</span></a> to Mw since
this is hardcoded already and done automatically by <a class="reference internal" href="../../apps/scmag.html#scmag"><span class="std std-ref">scmag</span></a>.</p>
</div>
</li>
</ol>
<p>The new moment magnitudes will be available along with the original magnitudes
and can be viewed in <span class="xref std std-ref">scolv`or :ref:`scesv</span> and considered by <a class="reference internal" href="../../apps/scmag.html#scmag"><span class="std std-ref">scmag</span></a>
or <a class="reference internal" href="../../apps/scevent.html#scevent"><span class="std std-ref">scevent</span></a>.</p>
<p>In order to avoid that <a class="reference internal" href="../concepts/magnitudes.html#concepts-magnitudes-summary"><span class="std std-ref">summary magnitudes</span></a>
are computed from original magnitudes and mapped Mw together and biased to both,
the original magnitudes can be blocklisted in <a class="reference internal" href="../../apps/scmag.html#scmag"><span class="std std-ref">scmag</span></a>
(<a class="reference internal" href="../../apps/scmag.html#confval-summaryMagnitude.blacklist"><code class="xref std std-confval docutils literal notranslate"><span class="pre">summaryMagnitude.blacklist</span></code></a>).</p>
</section>
<section id="final-tests">
<span id="tutorials-mags-regionalize-testing"></span><h2>Final Tests<a class="headerlink" href="#final-tests" title="Permalink to this heading"></a></h2>
<ul>
<li><p>Regionalization:</p>
<ol class="arabic">
<li><p>Start <a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a> with the option <code class="xref std std-option docutils literal notranslate"><span class="pre">--debug</span></code> and load an event of
interest</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scolv<span class="w"> </span>--debug
</pre></div>
</div>
</li>
<li><p>Relocate the event for generating a new origin.</p></li>
<li><p>Compute magnitudes selecting the magnitude of interest.</p></li>
<li><p>Inspect the computed magnitudes in the
<a class="reference internal" href="../../apps/scolv.html#scolv-sec-magnitude-tab"><span class="std std-ref">Magnitude tab of scolv</span></a> or read the
debug output listing the considered magnitudes and stations along with
the regionalized parameters.</p></li>
</ol>
</li>
<li><p>Magnitude aliases:</p>
<ol class="arabic">
<li><p>Start <a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a> with the option <code class="xref std std-option docutils literal notranslate"><span class="pre">--debug</span></code> and load an event of
interest</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scolv<span class="w"> </span>--debug
</pre></div>
</div>
</li>
<li><p>Relocate the event for generating a new origin.</p></li>
<li><p>Compute magnitudes selecting the magnitude of interest including the new
alias.</p></li>
<li><p>Inspect the computed magnitudes in the
<a class="reference internal" href="../../apps/scolv.html#scolv-sec-magnitude-tab"><span class="std std-ref">Magnitude tab of scolv</span></a> or read the
debug output listing the considered magnitude names and aliases along with
the considered parameters and their values. Example where MLc1 is derived
from MLc with a modified maximum depth:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>...
<span class="m">13</span>:30:46<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>GE.UGM:<span class="w"> </span>MLc1:<span class="w"> </span>effective<span class="w"> </span>correction<span class="w"> </span><span class="o">(</span>no<span class="w"> </span>locale<span class="o">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span>.00:0.00
<span class="m">13</span>:30:46<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>Parameters<span class="w"> </span><span class="k">for</span><span class="w"> </span>magnitude<span class="w"> </span>MLc1
<span class="m">13</span>:30:46<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>+<span class="w"> </span>maximum<span class="w"> </span>depth:<span class="w"> </span><span class="m">50</span>.000<span class="w"> </span>km
<span class="m">13</span>:30:46<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>+<span class="w"> </span>distance<span class="w"> </span>mode:<span class="w"> </span>hypocentral
<span class="m">13</span>:30:46<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>+<span class="w"> </span>minimum<span class="w"> </span>distance:<span class="w"> </span>-1.000<span class="w"> </span>km
<span class="m">13</span>:30:46<span class="w"> </span><span class="o">[</span>debug<span class="o">]</span><span class="w"> </span>+<span class="w"> </span>maximum<span class="w"> </span>distance:<span class="w"> </span><span class="m">889</span>.561<span class="w"> </span>km
...
</pre></div>
</div>
</li>
</ol>
</li>
</ul>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Magnitudes: Regionalization, Aliases, Mw</a><ul>
<li><a class="reference internal" href="#regionalize-magnitudes">Regionalize Magnitudes</a><ul>
<li><a class="reference internal" href="#station-corrections">Station corrections</a></li>
</ul>
</li>
<li><a class="reference internal" href="#magnitude-aliases">Magnitude Aliases</a></li>
<li><a class="reference internal" href="#moment-magnitudes">Moment Magnitudes</a></li>
<li><a class="reference internal" href="#final-tests">Final Tests</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="servefdsnws.html"
title="previous chapter">Enable local FDSNWS server</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="waveformplayback.html"
title="next chapter">Play back archived waveforms</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/magnitude-regionalization.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,443 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Installation on Ubuntu &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Upgrading SeisComP" href="upgrading.html" />
<link rel="prev" title="Tutorials" href="../tutorials.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="upgrading.html" title="Upgrading SeisComP"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="../tutorials.html" title="Tutorials"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="installation-on-ubuntu">
<span id="tutorials-postinstall"></span><h1>Installation on Ubuntu<a class="headerlink" href="#installation-on-ubuntu" title="Permalink to this heading"></a></h1>
<p>You will …</p>
<ul class="simple">
<li><p>Make a basic <cite>SeisComP</cite> installation</p></li>
</ul>
<p>Pre-requisites for this tutorial:</p>
<ul class="simple">
<li><p>Internet access</p></li>
</ul>
<p>Afterwards/Results/Outcomes:</p>
<ul class="simple">
<li><p>Run a <cite>SeisComP</cite> executable</p></li>
<li><p>Run a <cite>SeisComP</cite> GUI program</p></li>
</ul>
<p>Time range estimate:</p>
<ul class="simple">
<li><p>10-15 minutes</p></li>
</ul>
<p>Related tutorial(s):</p>
<ul class="simple">
<li><p><a class="reference internal" href="upgrading.html#tutorials-upgrade"><span class="std std-ref">Upgrading SeisComP</span></a></p></li>
<li><p><a class="reference internal" href="addstation.html#tutorials-addstation"><span class="std std-ref">Add a new station</span></a></p></li>
<li><p><a class="reference internal" href="geofon_waveforms.html#tutorials-geofon-waveforms"><span class="std std-ref">Add real-time stations from GEOFON</span></a></p></li>
</ul>
<hr class="docutils" />
<p>You may install <cite>SeisComP</cite> by:</p>
<ol class="arabic simple">
<li><p><a class="reference internal" href="#tutorials-postinstall-compile"><span class="std std-ref">Compiling the source code</span></a>,</p></li>
<li><p><a class="reference internal" href="#tutorials-postinstall-package"><span class="std std-ref">Installing pre-compiled release packages</span></a>
including binaries, maps and documentation.</p></li>
</ol>
<section id="get-your-linux-system-ready">
<h2>Get your Linux System ready<a class="headerlink" href="#get-your-linux-system-ready" title="Permalink to this heading"></a></h2>
<p>First you need to get your Linux system ready.
The following documentation refers to Ubuntu 20.04,
but the steps for other Ubuntu versions are similar.</p>
<ol class="arabic">
<li><p>Add a new user. Throughout our documentation, this user is called <cite>sysop</cite>.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>adduser<span class="w"> </span>sysop
$<span class="w"> </span>sudo<span class="w"> </span>addgroup<span class="w"> </span>admin
$<span class="w"> </span>sudo<span class="w"> </span>usermod<span class="w"> </span>-a<span class="w"> </span>-G<span class="w"> </span>admin,adm,audio<span class="w"> </span>sysop
</pre></div>
</div>
</li>
<li><p>Check the size and the architecture. This is espcially required when installing
<a class="reference internal" href="#tutorials-postinstall-package"><span class="std std-ref">pre-compiled packages</span></a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ df -h
$ cat /etc/issue
$ uname -m
</pre></div>
</div>
<p>Compare the available disk space with the requirements given in
the <a class="reference internal" href="../installation.html#installation"><span class="std std-ref">SeisComP Installation</span></a> section.
If uname shows i686, you have a 32-bit system;
if you see x86_64, you have 64-bit.</p>
</li>
</ol>
</section>
<section id="install-from-source-code">
<span id="tutorials-postinstall-compile"></span><h2>Install from source code<a class="headerlink" href="#install-from-source-code" title="Permalink to this heading"></a></h2>
<p>To compile SeisComP from the source code follow the
<a class="reference internal" href="../build.html#build"><span class="std std-ref">instructions in the development section</span></a>. You may later download and add
maps as described below in the <a class="reference internal" href="#tutorials-postinstall-package"><span class="std std-ref">package section</span></a>.</p>
</section>
<section id="install-pre-compiled-release-packages">
<span id="tutorials-postinstall-package"></span><h2>Install pre-compiled release packages<a class="headerlink" href="#install-pre-compiled-release-packages" title="Permalink to this heading"></a></h2>
<p>You may download and installed pre-compile SeisComP binary package, maps and documentation.</p>
<ol class="arabic">
<li><p>Download the appropriate <cite>SeisComP</cite> binary package taking into
account your Linux distribution and the architecture.
Get the package from the download site of <cite>SeisComP</cite> <span id="id1">[<a class="reference internal" href="../references.html#id257" title="Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH. The SeisComP seismological software package. GFZ Data Services. 2008. URL: https://www.seiscomp.de, doi:10.5880/GFZ.2.4.2020.003.">67</a>]</span> or from
<span id="id2"><em>Public download site of gempa</em> [<a class="reference internal" href="../references.html#id124" title="Public download site of gempa. URL: https://data.gempa.de/packages/Public/seiscomp/.">20</a>]</span>. Packages are available for Ubuntu and other Linux
flavors such as RHEL/CentOS and Debian.</p></li>
<li><p>When downloading the <cite>SeisComP</cite> binary packages you should also download</p>
<ul>
<li><p>maps for <cite>SeisComP</cite></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>wget<span class="w"> </span><span class="s2">&quot;https://www.seiscomp.de/downloader/seiscomp-maps.tar.gz&quot;</span>
</pre></div>
</div>
</li>
<li><p>the documentation package. Make sure, the documentation matches your
SeisComP version.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The <cite>SeisComP</cite> packages received from gempa GmbH contain the documentation
for the respective version and no separate download is required.</p>
</div>
</li>
</ul>
</li>
<li><p>Untar the <code class="file docutils literal notranslate"><span class="pre">seiscomp*</span></code> files (binary package, maps and documentation)
you will find in your home or downloads directory. For SeisComP in version
4.0.0 this is:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span>
$<span class="w"> </span>tar<span class="w"> </span>xzf<span class="w"> </span>seiscomp-4.0.0-ubuntu20.04-x86_64.tar.gz
$<span class="w"> </span>tar<span class="w"> </span>xzf<span class="w"> </span>seiscomp-maps.tar.gz
$<span class="w"> </span>tar<span class="w"> </span>xzf<span class="w"> </span>seiscomp-4.0.0-doc.tar.gz
$<span class="w"> </span>ls<span class="w"> </span>seiscomp
bin<span class="w"> </span>etc<span class="w"> </span>include<span class="w"> </span>lib<span class="w"> </span>man<span class="w"> </span>sbin<span class="w"> </span>share
</pre></div>
</div>
</li>
<li><p>Install all dependencies needed and prepare the environment.</p>
<ul>
<li><p>This should be automatic for most distributions.
Simply run the install script</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>~/seiscomp/bin/seiscomp<span class="w"> </span>install-deps<span class="w"> </span>base
Distribution:<span class="w"> </span>Ubuntu<span class="w"> </span><span class="m">20</span>.04
</pre></div>
</div>
<p>This will generally prompt for your users password to allow <cite>sudo</cite> to
install packages on your system.</p>
</li>
<li><p>On Ubuntu 18, Python 3 is installed, but not Python.
Get it first</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>python<span class="w"> </span>libqtgui4
</pre></div>
</div>
</li>
<li><p>On Ubuntu 20 and newer, you may need libpython3-dev before you can use
“install-deps”</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>libpython3-dev
</pre></div>
</div>
</li>
<li><p>Alternatively, for Mint 18 (Ubuntu 16.04):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>apt-get<span class="w"> </span>update
$<span class="w"> </span>sudo<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>libxml2<span class="w"> </span>libboost-filesystem1.58.0
libboost-iostreams1.58.0<span class="w"> </span>libboost-thread1.58.0<span class="w"> </span>libboost-program-options1.58.0
libboost-regex1.58.0<span class="w"> </span>libboost-signals1.58.0<span class="w"> </span>libboost-system1.58.0<span class="w"> </span>libssl1.0.0
libncurses5<span class="w"> </span>libmysqlclient20<span class="w"> </span>libpq5<span class="w"> </span>libpython2.7<span class="w"> </span>python-numpy<span class="w"> </span>mysql-server
mysql-client<span class="w"> </span>libqtgui4<span class="w"> </span>libqt4-xml<span class="w"> </span>libqt4-opengl<span class="w"> </span>libqt4-sql-sqlite
</pre></div>
</div>
</li>
</ul>
</li>
<li><p>Database. For a MariaDB installation:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span>install-deps<span class="w"> </span>mariadb-server
</pre></div>
</div>
<p>or a MySQL installation:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span>install-deps<span class="w"> </span>mysql-server
</pre></div>
</div>
<p>Also, for better performance with a MariaDB/MySQL database,
adjust the memory pool size and the restart MariaDB/MySQL server, as described
in the <a class="reference internal" href="../installation.html#database-configuration"><span class="std std-ref">Database Server Configuration</span></a> section.</p>
<p>For PostgreSQL, also see the detailed <a class="reference internal" href="../installation.html#installation"><span class="std std-ref">SeisComP Installation</span></a> instructions.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>For Ubuntu 18.04 and newer, take care with MariaDB/MySQL installation.
Before the next step, you must set a root password <em>for MariaDB/MySQL</em>
(not the Linux root password!).</p>
<p>MariaDB:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>mysql<span class="w"> </span>-e<span class="w"> </span><span class="s2">&quot;SET old_passwords=0; ALTER USER root@localhost IDENTIFIED BY &#39;MyNewPassword&#39;; FLUSH PRIVILEGES;&quot;</span>
</pre></div>
</div>
<p>MySQL:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>mysql<span class="w"> </span>-e<span class="w"> </span><span class="s2">&quot;ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY &#39;MyNewPassword&#39;; FLUSH PRIVILEGES;&quot;</span>
</pre></div>
</div>
<p>Substitute <em>MyNewPassword</em> by your own password and remember it
you will need it in the next step.
In case of problems, search the Internet, or the
<a class="reference external" href="https://forum.seiscomp.de/t/upgraded-to-ubuntu-18-04-and-i-broke-my-seiscomp3/1139">SeisComP forum thread</a>
(for logged-in forum members).</p>
</div>
</li>
</ol>
</section>
<section id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this heading"></a></h2>
<p>Find a detailed description in section <a class="reference internal" href="../getting-started.html#getting-started"><span class="std std-ref">Getting Started with SeisComP</span></a> and short guide below.</p>
<ol class="arabic">
<li><p>You may set some system environment variables.
For bash users, print the environment variables and copy them to your
<code class="file docutils literal notranslate"><span class="pre">.bashrc</span></code></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>~/seiscomp/bin/seiscomp<span class="w"> </span>print<span class="w"> </span>env
<span class="nb">export</span><span class="w"> </span><span class="nv">SEISCOMP_ROOT</span><span class="o">=</span>/home/sysop/seiscomp
<span class="nb">export</span><span class="w"> </span><span class="nv">PATH</span><span class="o">=</span>/home/sysop/seiscomp/bin:<span class="nv">$PATH</span>
<span class="nb">export</span><span class="w"> </span><span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span>/home/sysop/seiscomp/lib:<span class="nv">$LD_LIBRARY_PATH</span>
<span class="nb">export</span><span class="w"> </span><span class="nv">PYTHONPATH</span><span class="o">=</span>/home/sysop/seiscomp/lib/python:<span class="nv">$PYTHONPATH</span>
<span class="nb">export</span><span class="w"> </span><span class="nv">MANPATH</span><span class="o">=</span>/home/sysop/seiscomp/share/man:<span class="nv">$MANPATH</span>
<span class="nb">export</span><span class="w"> </span><span class="nv">LC_ALL</span><span class="o">=</span>C
<span class="nb">source</span><span class="w"> </span>/home/sysop/seiscomp/share/shell-completion/seiscomp.bash
</pre></div>
</div>
<p>The path to your home directory will likely differ from <cite>/home/sysop</cite> as shown above.
Therefore, do not copy and paste what you see here but use for your own
system the output from the command</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>~/seiscomp/bin/seiscomp<span class="w"> </span>print<span class="w"> </span>env
</pre></div>
</div>
<p>Add the output from the command to your file <code class="file docutils literal notranslate"><span class="pre">~/.bashrc</span></code></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>vi<span class="w"> </span>~/.bashrc
</pre></div>
</div>
<p>Then reload the content of <code class="file docutils literal notranslate"><span class="pre">~/.bashrc</span></code> in your current environment</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">source</span><span class="w"> </span>~/.bashrc
</pre></div>
</div>
<p>After this, you wont have to type <cite>~/seiscomp/bin/seiscomp</cite> as
the <a class="reference internal" href="../../apps/seiscomp.html#seiscomp"><span class="std std-ref">seiscomp</span></a> command will be added to your shells path.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>If, when you attempt to run a SeisComP command such as <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> or
<a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a>, you receive an error message like</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scconfig:<span class="w"> </span><span class="nb">command</span><span class="w"> </span>not<span class="w"> </span>found
</pre></div>
</div>
<p>then the most likely explanation is that you have not set your SeisComP
environment variables correctly.</p>
<p>Run the <cite>seiscomp</cite> command with the full path to
where you installed.
The seven lines of output are not actually run by the seiscomp print env
command; you need to cut and paste them into your shell to run them.
You can also add these to your <code class="file docutils literal notranslate"><span class="pre">~/.bashrc</span></code>, <code class="file docutils literal notranslate"><span class="pre">~/.profile</span></code>,
or equivalent file with commands to be run every time you log in.</p>
</div>
</li>
<li><p>Run <cite>seiscomp setup</cite> and enter your preferred IDs and password. For the other
fields, you can always accept the default values.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span>setup
</pre></div>
</div>
<p>You should enter an appropriate short name (without spaces) for Agency ID and
Datacenter ID. These are used for Arclink and Seedlink, and in the information
describing data model objects such as origins and events.</p>
</li>
<li><p>The <cite>seiscomp</cite> command is a wrapper, which controls the SeisComP modules.
See <a class="reference internal" href="../management.html#system-management"><span class="std std-ref">System management</span></a>.
Run something by typing seiscomp followed by a command</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="w"> </span>$<span class="w"> </span>seiscomp<span class="w"> </span><span class="nb">help</span>
<span class="w"> </span>Available<span class="w"> </span>commands:
<span class="w"> </span>install-deps
<span class="w"> </span>setup
<span class="w"> </span>shell
<span class="w"> </span><span class="nb">enable</span>
<span class="w"> </span>disable
<span class="w"> </span>print
<span class="w"> </span><span class="nb">help</span>
Use<span class="w"> </span><span class="s1">&#39;help [command]&#39;</span><span class="w"> </span>to<span class="w"> </span>get<span class="w"> </span>more<span class="w"> </span><span class="nb">help</span><span class="w"> </span>about<span class="w"> </span>a<span class="w"> </span><span class="nb">command</span>
</pre></div>
</div>
</li>
<li><p>Start <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a>.
As described in the <a class="reference internal" href="../overview.html#overview"><span class="std std-ref">Overview</span></a>, these are needed for
communication between the SeisComP database and the individual
SeisComP modules.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span>start<span class="w"> </span>scmaster
starting<span class="w"> </span>scmaster
</pre></div>
</div>
</li>
<li><p>Install all dependencies needed for the GUI</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span>install-deps<span class="w"> </span>gui
</pre></div>
</div>
</li>
<li><p>Start the <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> GUI</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>scconfig
</pre></div>
</div>
<p>Learn more about <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> in this documentation.
You should see a screen/window like this.</p>
<figure class="align-center" id="id3">
<a class="reference internal image-reference" href="../../_images/postinstall_scconfig.png"><img alt="../../_images/postinstall_scconfig.png" src="../../_images/postinstall_scconfig.png" style="width: 16cm;" /></a>
<figcaption>
<p><span class="caption-text">First view of <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> configurator.</span><a class="headerlink" href="#id3" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</li>
<li><p>Run <a class="reference internal" href="../../apps/scrttv.html#scrttv"><span class="std std-ref">scrttv</span></a></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>scrttv
</pre></div>
</div>
<p>After seeing the SeisComP splash screen,
youll likely get an error message “Could not read inventory (NULL)”.
After a new installation, thats okay.
Click that box away, and youll see a screen with
“Enabled”, and “Disabled” tabs, and time along bottom axis as in the figure below.
To see stations and data you will later need to
<a class="reference internal" href="addstation.html#tutorials-addstation"><span class="std std-ref">add inventory</span></a> and
<a class="reference internal" href="geofon_waveforms.html#tutorials-geofon-waveforms"><span class="std std-ref">waveforms</span></a> to your system.</p>
<figure class="align-center" id="id4">
<a class="reference internal image-reference" href="../../_images/postinstall_scrttv.png"><img alt="../../_images/postinstall_scrttv.png" src="../../_images/postinstall_scrttv.png" style="width: 14.6cm;" /></a>
<figcaption>
<p><span class="caption-text">First view of the <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> configuration tool.</span><a class="headerlink" href="#id4" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</li>
</ol>
<p>Congratulations, youre done with this tutorial.</p>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Installation on Ubuntu</a><ul>
<li><a class="reference internal" href="#get-your-linux-system-ready">Get your Linux System ready</a></li>
<li><a class="reference internal" href="#install-from-source-code">Install from source code</a></li>
<li><a class="reference internal" href="#install-pre-compiled-release-packages">Install pre-compiled release packages</a></li>
<li><a class="reference internal" href="#configuration">Configuration</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="../tutorials.html"
title="previous chapter">Tutorials</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="upgrading.html"
title="next chapter">Upgrading SeisComP</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/postinstall.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,266 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Configure real-time processing &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Add real-time stations from GEOFON" href="geofon_waveforms.html" />
<link rel="prev" title="Set up local waveform archiving" href="archiving.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="geofon_waveforms.html" title="Add real-time stations from GEOFON"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="archiving.html" title="Set up local waveform archiving"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="configure-real-time-processing">
<span id="tutorials-processing"></span><h1>Configure real-time processing<a class="headerlink" href="#configure-real-time-processing" title="Permalink to this heading"></a></h1>
<p>You will enable processing by your existing local SeisComP system.</p>
<dl class="field-list simple">
<dt class="field-odd">Pre-requisites for this tutorial<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>Real-time data for the station must be available locally.
See <a class="reference internal" href="waveforms.html#tutorials-waveforms"><span class="std std-ref">Get real-time data from a remote Seedlink server (single station)</span></a> or <a class="reference internal" href="geofon_waveforms.html#tutorials-geofon-waveforms"><span class="std std-ref">Add real-time stations from GEOFON</span></a>.</p></li>
<li><p>Inventory must be loaded locally.</p></li>
</ul>
</dd>
<dt class="field-even">Afterwards/Results/Outcomes<span class="colon">:</span></dt>
<dd class="field-even"><ul class="simple">
<li><p>The new station is available for visualization and general data processing.</p></li>
<li><p>The new station is used for automatic real-time phase picking.</p></li>
</ul>
</dd>
<dt class="field-odd">Time range estimate<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p>10 minutes.</p></li>
</ul>
</dd>
<dt class="field-even">Related tutorial(s)<span class="colon">:</span></dt>
<dd class="field-even"><ul class="simple">
<li><p><a class="reference internal" href="addstation.html#tutorials-addstation"><span class="std std-ref">Add a new station</span></a></p></li>
</ul>
</dd>
</dl>
<hr class="docutils" />
<section id="create-bindings">
<h2>Create bindings<a class="headerlink" href="#create-bindings" title="Permalink to this heading"></a></h2>
<p>In SeisComP terminology, <em>bindings</em> are the connection between modules
and individual stations.
See the “Bindings” section of <a class="reference internal" href="../concepts/configuration.html#concepts-configuration"><span class="std std-ref">Configuration</span></a> for full details.</p>
<p>You can create the necessary bindings for your new station
using <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.
Go to the “Bindings” tab on the left side bar of <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.</p>
<ul>
<li><p>You will need to add “global” and “scautopick” bindings.</p>
<ul class="simple">
<li><p>Create a global profile named “BH” by clicking with the right button on “global”
in the top right panel. Double click on it and set BH as <em>detectStream</em> and
empty location code as <em>detecLocID</em> information.
Adjust these as appropriate for your station.</p></li>
<li><p>Create a <em>scautopick</em> profile named “default” (no changes necessary).</p></li>
<li><p>Drag and drop all profiles from the right side to the network icon on the
left side (you may do that also at the station level).</p></li>
<li><p>Press <kbd class="kbd compound docutils literal notranslate"><kbd class="kbd docutils literal notranslate">Ctrl`</kbd>+<kbd class="kbd docutils literal notranslate">:kbd:`S</kbd></kbd> to save the configuration.
This writes configuration files in <code class="file docutils literal notranslate"><span class="pre">~/seiscomp/etc/key</span></code>.</p></li>
</ul>
</li>
<li><p>Alternatively, you can add the scautopick and global bindings
by editing the relevant top-level key file.
(For station CLL of the GR network, this would be <code class="file docutils literal notranslate"><span class="pre">etc/key/station_GR_CLL</span></code>.)
It would contain:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># Binding references</span>
<span class="k">global</span>
<span class="n">scautopick</span><span class="p">:</span><span class="n">default</span>
</pre></div>
</div>
<p>in addition to any other bindings that might be defined for this station.</p>
</li>
</ul>
<p>Then execute:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span>update-config
$<span class="w"> </span>seiscomp<span class="w"> </span>restart<span class="w"> </span>scautopick
</pre></div>
</div>
<p>or use <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> for these actions.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul class="simple">
<li><p>Station inventory must be available at least on channel level and the global
bindings must match the inventory and the available waveforms.</p></li>
<li><p>Global bindings are required for data visualization and general data
processing.</p></li>
<li><p>Enable <a class="reference internal" href="../../apps/scautopick.html#scautopick"><span class="std std-ref">scautopick</span></a> for running it by default.</p></li>
<li><p>Generated picks may be used by other modules, such as <a class="reference internal" href="../../apps/scautoloc.html#scautoloc"><span class="std std-ref">scautoloc</span></a>
which must be set up independently.</p></li>
<li><p>The default parameters for <a class="reference internal" href="../../apps/scautopick.html#scautopick"><span class="std std-ref">scautopick</span></a> have been optimized for
monitoring earthquakes at teleseismic distances and the must be adjusted
for other types.</p></li>
</ul>
</div>
</section>
<section id="check-the-station-is-used-for-processing">
<h2>Check the station is used for processing<a class="headerlink" href="#check-the-station-is-used-for-processing" title="Permalink to this heading"></a></h2>
<p>If you have correctly configured the station for processing, then:</p>
<ul>
<li><p>On restarting <strong class="program">scautopick</strong>, the station appears in the
<code class="file docutils literal notranslate"><span class="pre">scautopick.log</span></code> log
file in <code class="file docutils literal notranslate"><span class="pre">~/.seiscomp/log</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">2020</span><span class="o">/</span><span class="mi">03</span><span class="o">/</span><span class="mi">01</span> <span class="mi">18</span><span class="p">:</span><span class="mi">01</span><span class="p">:</span><span class="mi">00</span> <span class="p">[</span><span class="n">info</span><span class="o">/</span><span class="n">Autopick</span><span class="p">]</span> <span class="n">Adding</span> <span class="n">detection</span> <span class="n">channel</span> <span class="n">GR</span><span class="o">.</span><span class="n">CLL</span><span class="o">..</span><span class="n">BHZ</span>
</pre></div>
</div>
<p>After some time, a nearby event will occur and phases recorded on this station
should be picked. If <a class="reference internal" href="../../apps/scautoloc.html#scautoloc"><span class="std std-ref">scautoloc</span></a> was running at the time and
<a class="reference internal" href="../../apps/scautoloc.html#confval-autoloc.pickLogEnable"><code class="xref std std-confval docutils literal notranslate"><span class="pre">autoloc.pickLogEnable</span></code></a> was activated, the pick should appear in the
latest <code class="file docutils literal notranslate"><span class="pre">autoloc-picklog</span></code> file in <code class="file docutils literal notranslate"><span class="pre">~/.seiscomp/log</span></code>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>grep<span class="w"> </span><span class="s2">&quot;CLL&quot;</span><span class="w"> </span>.seiscomp/log/autoloc-picklog.2020-03-01
<span class="m">2020</span>-03-01<span class="w"> </span><span class="m">18</span>:31:47.1<span class="w"> </span>GR<span class="w"> </span>CLL<span class="w"> </span>BHZ<span class="w"> </span>__<span class="w"> </span><span class="m">40</span>.9<span class="w"> </span><span class="m">177</span>.433<span class="w"> </span><span class="m">1</span>.1<span class="w"> </span>A<span class="w"> </span><span class="m">20200301</span>.183147.13-AIC-GR.CLL..BHZ
</pre></div>
</div>
</li>
<li><p>The station should now also appear in the GUIs.
After reopening them,</p>
<ul class="simple">
<li><p>The station should now show up in <strong class="program">scmv</strong>
(as a new triangle at the expected location on the map,
which is not black if the station is active).</p></li>
<li><p>In <strong class="program">scrttv</strong> a trace or at least the line for the configured stream
should be visible.</p></li>
<li><p>In <strong class="program">scolv</strong>, the new station is either already included
in automatic locations, or can be added manually.</p></li>
</ul>
</li>
</ul>
<p>In case of problems, check that <a class="reference internal" href="../../apps/global.html#confval-detecStream"><code class="xref std std-confval docutils literal notranslate"><span class="pre">detecStream</span></code></a> and
<a class="reference internal" href="../../apps/global.html#confval-detecLocid"><code class="xref std std-confval docutils literal notranslate"><span class="pre">detecLocid</span></code></a> are set correctly.
They must match both what is in inventory and the waveforms provided
from the upstream server.</p>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Configure real-time processing</a><ul>
<li><a class="reference internal" href="#create-bindings">Create bindings</a></li>
<li><a class="reference internal" href="#check-the-station-is-used-for-processing">Check the station is used for processing</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="archiving.html"
title="previous chapter">Set up local waveform archiving</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="geofon_waveforms.html"
title="next chapter">Add real-time stations from GEOFON</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/processing.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,285 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Enable local FDSNWS server &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Magnitudes: Regionalization, Aliases, Mw" href="magnitude-regionalization.html" />
<link rel="prev" title="Add real-time stations from GEOFON" href="geofon_waveforms.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="magnitude-regionalization.html" title="Magnitudes: Regionalization, Aliases, Mw"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="geofon_waveforms.html" title="Add real-time stations from GEOFON"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="enable-local-fdsnws-server">
<span id="tutorials-servefdsnws"></span><h1>Enable local FDSNWS server<a class="headerlink" href="#enable-local-fdsnws-server" title="Permalink to this heading"></a></h1>
<p>You will …</p>
<ul class="simple">
<li><p>Enable FDSN web service by <a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws</span></a> to serve waveforms and inventory for
a configured station</p></li>
</ul>
<p>Pre-requisites for this tutorial:</p>
<ul class="simple">
<li><p>Tutorial on <a class="reference internal" href="archiving.html#tutorials-archiving"><span class="std std-ref">Set up local waveform archiving</span></a></p></li>
</ul>
<p>Afterwards/Results/Outcomes:</p>
<ul class="simple">
<li><p>The station meta data and waveforms are available from a local web server</p></li>
</ul>
<p>Time range estimate:</p>
<ul class="simple">
<li><p>10 minutes</p></li>
</ul>
<hr class="docutils" />
<p>By default, <a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws</span></a> will serve the three FDSN web services</p>
<ul class="simple">
<li><p>fdsnws-dataselect</p></li>
<li><p>fdsnws-event</p></li>
<li><p>fdsnws-station</p></li>
</ul>
<p>on a server running locally on port 8080.</p>
<p>The additional <em>availability</em> feature allows users to obtain information
on continuous data segments in the waveform archive.
This information is written to the
<a class="reference internal" href="../concepts/database.html#concepts-database"><span class="std std-ref">database</span></a> by <a class="reference internal" href="../../apps/scardac.html#scardac"><span class="std std-ref">scardac</span></a>.
To active the availability feature set <a class="reference internal" href="../../apps/fdsnws.html#confval-serveAvailability"><code class="xref std std-confval docutils literal notranslate"><span class="pre">serveAvailability</span></code></a> and
<a class="reference internal" href="../../apps/fdsnws.html#confval-dataAvailability.enable"><code class="xref std std-confval docutils literal notranslate"><span class="pre">dataAvailability.enable</span></code></a> to true.
The availability information can be retrieved using <a class="reference internal" href="../../apps/scxmldump.html#scxmldump"><span class="std std-ref">scxmldump</span></a> or <a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws</span></a>.</p>
<section id="set-up">
<h2>Set-up<a class="headerlink" href="#set-up" title="Permalink to this heading"></a></h2>
<ol class="arabic">
<li><p>Configure <a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws</span></a>:</p>
<ul class="simple">
<li><p>set the <a class="reference internal" href="../concepts/recordstream.html#concepts-recordstream"><span class="std std-ref">RecordStream</span></a> to point to archived data.</p></li>
<li><p>configured and enable the desired services.</p></li>
</ul>
</li>
<li><p>Enable and start fdsnws locally:</p>
<ul>
<li><p>in <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>, go to the System tab.
Click on the line for the “fdsnws” module, and press “Enable module(s)”.
Then restart SeisComP.</p></li>
<li><p>or from the command line</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>seiscomp<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>fdsnws
$<span class="w"> </span>seiscomp<span class="w"> </span>start<span class="w"> </span>fdsnws
</pre></div>
</div>
</li>
</ul>
</li>
<li><p>Test by <a class="reference internal" href="#tutorials-servefdsnws-visit"><span class="std std-ref">visiting the locally started fdsnws</span></a>.</p></li>
</ol>
<p>Logging information goes to <code class="file docutils literal notranslate"><span class="pre">~/.seiscomp/log/fdsnws.log</span></code> by default.
Information about requests handled goes to the file named in <cite>accessLog</cite>,
if you set this.</p>
<p>To see the available configuration options, go to the Modules tab in
<a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.
Under Utilities open “fdsnws” to reveal the options.
To disable fdsnws-event, for instance, unlock the “serveEvent” area
and uncheck this parameter.</p>
<p>You can limit the choice of stations shared to be less than what is in your
SeisComP <a class="reference internal" href="../concepts/inventory.html#concepts-inventory"><span class="std std-ref">inventory</span></a> using the <cite>allowRestricted</cite>,
<cite>dataSelectFilter</cite> and <cite>stationFilter</cite> options.</p>
</section>
<section id="visiting-the-service">
<span id="tutorials-servefdsnws-visit"></span><h2>Visiting the Service<a class="headerlink" href="#visiting-the-service" title="Permalink to this heading"></a></h2>
<p>Once <a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws</span></a> is running, you can visit the local web server
that it runs.
In your browser, visit <a class="reference external" href="http://localhost:8080/fdsnws/dataselect/1/">http://localhost:8080/fdsnws/dataselect/1/</a></p>
<figure class="align-center" id="id2">
<a class="reference internal image-reference" href="../../_images/servefdsnws_dataselect.png"><img alt="../../_images/servefdsnws_dataselect.png" src="../../_images/servefdsnws_dataselect.png" style="width: 16cm;" /></a>
<figcaption>
<p><span class="caption-text">Information screen shown by fdsnws-dataselect at
<a class="reference external" href="http://localhost:8080/fdsnws/dataselect/1/">http://localhost:8080/fdsnws/dataselect/1/</a></span><a class="headerlink" href="#id2" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</section>
<section id="check-it-works">
<h2>Check it Works<a class="headerlink" href="#check-it-works" title="Permalink to this heading"></a></h2>
<ul>
<li><p>If you visit the URL <a class="reference external" href="http://localhost:8080/fdsnws/dataselect/1/version">http://localhost:8080/fdsnws/dataselect/1/version</a>
you should receive a version number string - currently <cite>1.1.0</cite>.</p></li>
<li><p>To view all activated services visit <a class="reference external" href="http://localhost:8080/fdsnws/">http://localhost:8080/fdsnws/</a></p></li>
<li><p>The fdsnws-station service should give a list of networks configured
and served by the service, e.g. visiting
<a class="reference external" href="http://localhost:8080/fdsnws/station/1/query?level=network&amp;format=text">http://localhost:8080/fdsnws/station/1/query?level=network&amp;format=text</a>
produces</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1">#Network|Description|StartTime|EndTime|TotalStations</span>
GE<span class="p">|</span>GEOFON<span class="w"> </span>Program,<span class="w"> </span>GFZ<span class="w"> </span>Potsdam,<span class="w"> </span>Germany<span class="p">|</span><span class="m">1993</span>-01-01T00:00:00<span class="o">||</span><span class="m">84</span>
</pre></div>
</div>
<p>Omitting the <cite>format=text</cite> argument in the query string of the above URL
results in the service returning a StationXML file.</p>
</li>
</ul>
<figure class="align-center" id="id3">
<a class="reference internal image-reference" href="../../_images/servefdsnws_stationxml.png"><img alt="../../_images/servefdsnws_stationxml.png" src="../../_images/servefdsnws_stationxml.png" style="width: 16cm;" /></a>
<figcaption>
<p><span class="caption-text">Example of StationXML returned by the fdsnws-station service at</span><a class="headerlink" href="#id3" title="Permalink to this image"></a></p>
<div class="legend">
<p><a class="reference external" href="http://localhost:8080/fdsnws/station/1/query?level=network">http://localhost:8080/fdsnws/station/1/query?level=network</a></p>
</div>
</figcaption>
</figure>
</section>
<section id="further-information">
<h2>Further Information<a class="headerlink" href="#further-information" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>The <a class="reference external" href="https://geofon.gfz-potsdam.de/waveform/builder.php">URL Builder at GEOFON</a>
lets you fill out a form to tailor your request.
The URL to use to make your request is displayed at the bottom of that page.</p></li>
<li><p>More example requests are at the
<a class="reference external" href="https://geofon.gfz-potsdam.de/waveform/webservices.php">FDSNWS description at GEOFON</a></p></li>
<li><p>The FDSN Web Services specification document <span id="id1">[<a class="reference internal" href="../references.html#id111" title="FDSN Web Service Specifications. International Federation of Digital Seismograph Networks. URL: http://www.fdsn.org/webservices/FDSN-WS-Specifications-1.2.pdf.">5</a>]</span> provides the
technical documentation and examples.</p></li>
</ul>
</section>
<section id="final-tests">
<h2>Final Tests<a class="headerlink" href="#final-tests" title="Permalink to this heading"></a></h2>
<ul>
<li><p>The station should now be visible when you query your local fdsnws instance.
In your browser, visit
<a class="reference external" href="http://localhost:8080/fdsnws/station/1/query?format=text">http://localhost:8080/fdsnws/station/1/query?format=text</a>
to see a list of all channels available from your fdsnws server.</p></li>
<li><p>Request waveform data like this:</p>
<p><a class="reference external" href="http://localhost:8080/fdsnws/dataselect/1/query?start=2020-01-01T01:01:01&amp;end=2020-01-01T02:00:00">http://localhost:8080/fdsnws/dataselect/1/query?start=2020-01-01T01:01:01&amp;end=2020-01-01T02:00:00</a></p>
<p>Dont forget to adjust your start and end times to match the data
actually present in your archive.
The above example is just for the first hour of 2020.</p>
</li>
</ul>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Enable local FDSNWS server</a><ul>
<li><a class="reference internal" href="#set-up">Set-up</a></li>
<li><a class="reference internal" href="#visiting-the-service">Visiting the Service</a></li>
<li><a class="reference internal" href="#check-it-works">Check it Works</a></li>
<li><a class="reference internal" href="#further-information">Further Information</a></li>
<li><a class="reference internal" href="#final-tests">Final Tests</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="geofon_waveforms.html"
title="previous chapter">Add real-time stations from GEOFON</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="magnitude-regionalization.html"
title="next chapter">Magnitudes: Regionalization, Aliases, Mw</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/servefdsnws.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,213 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Create a new tutorial &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Graphical User Interfaces" href="../../gui.html" />
<link rel="prev" title="Help! Im stuck! Now what?" href="help.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="../../gui.html" title="Graphical User Interfaces"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="help.html" title="Help! Im stuck! Now what?"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="create-a-new-tutorial">
<span id="tutorials-template"></span><h1>Create a new tutorial<a class="headerlink" href="#create-a-new-tutorial" title="Permalink to this heading"></a></h1>
<p>You will …</p>
<ul class="simple">
<li><p>Add something</p></li>
<li><p>Configure something else</p></li>
</ul>
<p>Pre-requisites for this tutorial:</p>
<ul class="simple">
<li><p>Have the source code of SeisComP available</p></li>
</ul>
<p>Afterwards/Results/Outcomes:</p>
<ul class="simple">
<li><p>A new tutorial</p></li>
</ul>
<p>Time range estimate:</p>
<ul class="simple">
<li><p>30 minutes</p></li>
</ul>
<hr class="docutils" />
<section id="set-up">
<h2>Set-up<a class="headerlink" href="#set-up" title="Permalink to this heading"></a></h2>
<p>To use this template, youll need to:</p>
<ol class="arabic simple">
<li><p>Get the source code of the SeisComP documentation, e.g. from
<span id="id1"><em>SeisComP on GitHub</em> [<a class="reference internal" href="../references.html#id258" title="Seiscomp on github. URL: https://github.com/SeisComP.">1</a>]</span></p></li>
<li><p>Copy this tutorial file (<code class="file docutils literal notranslate"><span class="pre">doc/base/tutorials/template.rst</span></code>) to the tutorials directory
with a new name, <code class="file docutils literal notranslate"><span class="pre">doc/base/tutorials/</span><em><span class="pre">nn</span></em><span class="pre">_</span><em><span class="pre">something</span></em><span class="pre">.rst</span></code>.</p></li>
<li><p>Change the reference at the top (first line); it must be
<em>.. _tutorials_{something}</em>.</p></li>
<li><p>Change the title: start with a verb, describe what the student is
trying to do.</p></li>
<li><p>Set the tutorial task and a final confirmation action for the student
to verify check that it worked correctly.</p></li>
<li><p>Add the file name without the ending <em>.rst</em> to the table of contents in <code class="file docutils literal notranslate"><span class="pre">doc/base/tutorials.rst</span></code>
assigning a position for your new tutorial within the sequence of
existing tutorials.</p></li>
<li><p>Build the HTML documentation for viewing and <a class="reference internal" href="#tutorials-template-testing"><span class="std std-ref">testing</span></a>.</p></li>
<li><p>Optionally, provide your new tutorial to the public repository:</p>
<ul class="simple">
<li><p>Create a new git branch</p></li>
<li><p>Push the new branch to GitHub</p></li>
<li><p>Create a merge request to get your branch merged into the master branch</p></li>
</ul>
</li>
</ol>
</section>
<section id="final-tests">
<span id="tutorials-template-testing"></span><h2>Final Tests<a class="headerlink" href="#final-tests" title="Permalink to this heading"></a></h2>
<ul>
<li><p>If youve applied this template,</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>ls<span class="w"> </span>doc/base/tutorials
</pre></div>
</div>
<p>will show your new tutorial.</p>
</li>
<li><p>Rebuild the documentation</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>doc
$<span class="w"> </span>python3<span class="w"> </span>build-doc.py
</pre></div>
</div>
</li>
<li><p>View the new files in <cite>build-doc/base/html/tutorials</cite> using a web browser, e.g. firefox:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>firefox<span class="w"> </span>build-doc/html/basetutorials.html
</pre></div>
</div>
</li>
</ul>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Create a new tutorial</a><ul>
<li><a class="reference internal" href="#set-up">Set-up</a></li>
<li><a class="reference internal" href="#final-tests">Final Tests</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="help.html"
title="previous chapter">Help! Im stuck! Now what?</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="../../gui.html"
title="next chapter">Graphical User Interfaces</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/template.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,762 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Upgrading SeisComP &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Add a new station" href="addstation.html" />
<link rel="prev" title="Installation on Ubuntu" href="postinstall.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="addstation.html" title="Add a new station"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="postinstall.html" title="Installation on Ubuntu"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="upgrading-seiscomp">
<span id="tutorials-upgrade"></span><h1>Upgrading SeisComP<a class="headerlink" href="#upgrading-seiscomp" title="Permalink to this heading"></a></h1>
<p>You will …</p>
<ul class="simple">
<li><p>Upgrade a SeisComP system</p></li>
<li><p>Migrate a SeisComP3 system to a newer SeisComP version</p></li>
</ul>
<p>Pre-requisites for this tutorial:</p>
<ul class="simple">
<li><p>Tutorial on <a class="reference internal" href="postinstall.html#tutorials-postinstall"><span class="std std-ref">installation</span></a> and SeisComP previously installed</p></li>
</ul>
<p>Afterwards/Results/Outcomes:</p>
<ul class="simple">
<li><p>Upgraded SeisComP</p></li>
</ul>
<p>Time range estimate:</p>
<ul class="simple">
<li><p>60 minutes</p></li>
</ul>
<hr class="docutils" />
<section id="background">
<h2>Background<a class="headerlink" href="#background" title="Permalink to this heading"></a></h2>
<p>Installing a new SeisComP <a class="reference internal" href="#tutorials-upgrade-versions"><span class="std std-ref">release version</span></a>
is typically simple and the step described in <a class="reference internal" href="#tutorials-upgrade-normal"><span class="std std-ref">Normal Upgrade</span></a>
can be applied. <strong>More actions</strong> are required when</p>
<ul class="simple">
<li><p>Upgrading the major version of SeisComP as described in <a class="reference internal" href="#tutorials-upgrade-normal"><span class="std std-ref">Normal Upgrade</span></a>.</p></li>
<li><p>Upgrading <a class="reference internal" href="#tutorials-upgrade-v4"><span class="std std-ref">from SeisComP3 to SeisComP in version 4.0.0. or higher</span></a>.</p></li>
<li><p>Upgrading <a class="reference internal" href="#tutorials-upgrade-seedlink"><span class="std std-ref">from SeisComP3 Jakarta-2018.327 or older to Jakarta-2020.330 or
SeisComP in version 4 or higher</span></a>.</p></li>
</ul>
<section id="seiscomp-versions">
<span id="tutorials-upgrade-versions"></span><h3>SeisComP versions<a class="headerlink" href="#seiscomp-versions" title="Permalink to this heading"></a></h3>
<p>SeisComP has <a class="reference internal" href="../history.html#history"><span class="std std-ref">developed over time</span></a>. The versions can be distinguished
by the name of the release:</p>
<ul>
<li><p><strong>SeisComP since version 4.0.0</strong> uses release version numbers such as <em>5.2.1</em>
where</p>
<ul class="simple">
<li><p>5: major version with changes in API and database schema version, new features,
bug fixed, optimizations,</p></li>
<li><p>2: minor version with new features, bug fixed, optimizations,</p></li>
<li><p>1: patch number with bug fixes, optimizations.</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>When increasing the major version number, an upgrade of
the database is required.</p>
</div>
</li>
<li><p><strong>SeisComP3</strong> uses release versions, names, numbers and patch numbers.</p>
<p>Full example: <em>SeisComP3-jakarta-2020.330.02</em></p>
<ul class="simple">
<li><p>3: release version</p></li>
<li><p>jakarta: release name</p></li>
<li><p>2020.330: release number</p></li>
<li><p>02: patch number</p></li>
</ul>
<p>Names are adjusted depending on changes in source code:</p>
<ul class="simple">
<li><p><strong>Release version:</strong> major changes in module groups, functionality, concepts, data model.
Example: SeisComp3 is SeisComP in version 3.0
in comparison to version 2.5 the GUIs were introduced.</p></li>
<li><p><strong>Release name:</strong> major changes in functionality, concepts, data model.
Example: with SeisComP3-Seattle the new user friendly configuration GUI <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>
was introduced.</p></li>
<li><p><strong>Release number:</strong> changes in data model version and/or major changes in applications and optimizations.
The numbers include the year and the day of the year of the software release.
Example: Jakarta-2018.327</p></li>
<li><p><strong>Patch number:</strong> optimizations of applications without changes in the data model version.</p></li>
</ul>
</li>
</ul>
</section>
<section id="upgrade-seiscomp-on-multiple-machines">
<h3>Upgrade SeisComP on multiple machines<a class="headerlink" href="#upgrade-seiscomp-on-multiple-machines" title="Permalink to this heading"></a></h3>
<p>Applications can only connect to a messaging system that runs with a database
in an equal or lower data base schema version. In distributed <cite>SeisComP</cite> systems
one machine host the messaging system and the database and all other machines
are connected to this messaging or are running independently, the <cite>SeisComP</cite>
installation on the machine operating the messaging is always updated last.</p>
<p><strong>Example:</strong> A distributed system includes a processing system with the
messaging system and database and a GUI work station connected to the processing
system:</p>
<ol class="arabic simple">
<li><p>Upgrade the GUI work station</p></li>
<li><p>Upgrade the processing system, take actions to
<a class="reference internal" href="#tutorials-upgrade-db"><span class="std std-ref">upgrade the database version</span></a>.</p></li>
</ol>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Always stop all SeisComP modules before upgrading:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>stop
</pre></div>
</div>
</div>
</section>
</section>
<section id="package-download">
<span id="tutorials-upgrade-download"></span><h2>Package Download<a class="headerlink" href="#package-download" title="Permalink to this heading"></a></h2>
<p>Get the SeisComP package in the latest version or older ones from gempa GmbH or
from the download website of <span id="id1">Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH [<a class="reference internal" href="../references.html#id257" title="Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH. The SeisComP seismological software package. GFZ Data Services. 2008. URL: https://www.seiscomp.de, doi:10.5880/GFZ.2.4.2020.003.">67</a>]</span>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>gempa provides <span id="id2"><em>gsm - gempa software management tool</em> [<a class="reference internal" href="../references.html#id129" title="gsm - gempa software management tool. gempa solution. URL: https://data.gempa.de/packages/Public/gsm/.">29</a>]</span> for convenient and consistent download and
installation of SeisComP and other packages.</p>
</div>
</section>
<section id="documentation-of-changes">
<span id="tutorials-upgrade-changelog"></span><h2>Documentation of Changes<a class="headerlink" href="#documentation-of-changes" title="Permalink to this heading"></a></h2>
<p>The important novelties, optimizations and changes that are available after upgrading
are documented in the change log which can be read
<a class="reference external" href="https://www.seiscomp.de/doc/base/changelog.html">online</a>.
It is recommend to read the change log before taking further actions.</p>
<p>The details can also be found locally in the file</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nv">$SEISCOMP_ROOT</span>/share/doc/seiscomp/CHANGELOG
</pre></div>
</div>
<p>which is integrated in the <a class="reference internal" href="../changelog.html#sc-changelog"><span class="std std-ref">documentation</span></a> or accessible
from the <em>Docs</em> panel in <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>New features are regularly advertised and described in detail on the
<a class="reference external" href="https://www.gempa.de/news/">News website of gempa GmbH</a> and on the
<span id="id3"><em>SeisComP forum</em> [<a class="reference internal" href="../references.html#id256" title="SeisComP forum. GFZ. URL: https://forum.seiscomp.de/.">24</a>]</span>.</p>
</div>
</section>
<section id="normal-upgrade">
<span id="tutorials-upgrade-normal"></span><h2>Normal Upgrade<a class="headerlink" href="#normal-upgrade" title="Permalink to this heading"></a></h2>
<p>The normal upgrade including upgrading the major version of SeisComP takes only
a few steps:</p>
<ol class="arabic">
<li><p><a class="reference internal" href="#tutorials-upgrade-download"><span class="std std-ref">Download</span></a> the SeisComP package.</p></li>
<li><p>Stop all SeisComP modules:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>stop
</pre></div>
</div>
</li>
<li><p>Install the new packages.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Users of external, e.g., <cite>gempa</cite> modules must ensure that these external
modules match the SeisComP release version if they depend on SeisComP
libraries.</p>
</div>
</li>
<li><p>Test the database schema version and update bindings</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>update-config
</pre></div>
</div>
<p><a class="reference internal" href="#tutorials-upgrade-db"><span class="std std-ref">Upgrade the database schema version</span></a> if
mismatches are reported.</p>
</li>
<li><p>After a successful upgrade, start all modules again and observe the status:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>start
seiscomp<span class="w"> </span>status<span class="w"> </span>started
</pre></div>
</div>
</li>
</ol>
</section>
<section id="upgrade-database-schema-version">
<span id="tutorials-upgrade-db"></span><h2>Upgrade database schema version<a class="headerlink" href="#upgrade-database-schema-version" title="Permalink to this heading"></a></h2>
<p>When installing a new SeisComP release with a higher major version number,
upgrading the database may be required. The database version will be tested and
the required actions will be shown when executing:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>update-config
</pre></div>
</div>
<p>or when pressing the Update Configuration button in scconfig.
An upgrade from version SeisComP3 jakarta-2017.334 to SeisComP in version 5.1.0
will give, e.g.:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>update-config
*<span class="w"> </span>starting<span class="w"> </span>kernel<span class="w"> </span>modules
starting<span class="w"> </span>scmaster
*<span class="w"> </span>configure<span class="w"> </span>kernel
*<span class="w"> </span>configure<span class="w"> </span>scmaster
INFO:<span class="w"> </span>checking<span class="w"> </span>DB<span class="w"> </span>schema<span class="w"> </span>version<span class="w"> </span>of<span class="w"> </span>queue:<span class="w"> </span>production
<span class="w"> </span>*<span class="w"> </span>check<span class="w"> </span>database<span class="w"> </span>write<span class="w"> </span>access<span class="w"> </span>...<span class="w"> </span>OK
<span class="w"> </span>*<span class="w"> </span>database<span class="w"> </span>schema<span class="w"> </span>version<span class="w"> </span>is<span class="w"> </span><span class="m">0</span>.10
<span class="w"> </span>*<span class="w"> </span>last<span class="w"> </span>migration<span class="w"> </span>version<span class="w"> </span>is<span class="w"> </span><span class="m">0</span>.12
<span class="w"> </span>*<span class="w"> </span>migration<span class="w"> </span>to<span class="w"> </span>the<span class="w"> </span>current<span class="w"> </span>version<span class="w"> </span>is<span class="w"> </span>required.<span class="w"> </span>apply<span class="w"> </span>the<span class="w"> </span>following
<span class="w"> </span>scripts<span class="w"> </span><span class="k">in</span><span class="w"> </span>exactly<span class="w"> </span>the<span class="w"> </span>given<span class="w"> </span>order:
<span class="w"> </span>*<span class="w"> </span>mysql<span class="w"> </span>-u<span class="w"> </span>sysop<span class="w"> </span>-p<span class="w"> </span>-D<span class="w"> </span>seiscomp<span class="w"> </span>-h<span class="w"> </span>localhost<span class="w"> </span>&lt;<span class="w"> </span>/home/sysop/seiscomp/share/db/migrations/mysql/0_10_to_0_11.sql
<span class="w"> </span>*<span class="w"> </span>mysql<span class="w"> </span>-u<span class="w"> </span>sysop<span class="w"> </span>-p<span class="w"> </span>-D<span class="w"> </span>seiscomp<span class="w"> </span>-h<span class="w"> </span>localhost<span class="w"> </span>&lt;<span class="w"> </span>/home/sysop/seiscomp/share/db/migrations/mysql/0_11_to_0_12.sql
error:<span class="w"> </span>updating<span class="w"> </span>configuration<span class="w"> </span><span class="k">for</span><span class="w"> </span>scmaster<span class="w"> </span>failed
</pre></div>
</div>
<p>The shown migration scripts can be used directly as given and in the given order:</p>
<ul>
<li><p>MySQL / MariaDB:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>mysql<span class="w"> </span>-u<span class="w"> </span>sysop<span class="w"> </span>-p<span class="w"> </span>-D<span class="w"> </span>seiscomp<span class="w"> </span>-h<span class="w"> </span>localhost<span class="w"> </span>&lt;<span class="w"> </span>/home/sysop/seiscomp/share/db/migrations/mysql/0_10_to_0_11.sql
mysql<span class="w"> </span>-u<span class="w"> </span>sysop<span class="w"> </span>-p<span class="w"> </span>-D<span class="w"> </span>seiscomp<span class="w"> </span>-h<span class="w"> </span>localhost<span class="w"> </span>&lt;<span class="w"> </span>/home/sysop/seiscomp/share/db/migrations/mysql/0_11_to_0_12.sql
</pre></div>
</div>
</li>
<li><p>PostgreSQL:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>psql<span class="w"> </span>-U<span class="w"> </span>sysop<span class="w"> </span>-d<span class="w"> </span>seiscomp<span class="w"> </span>-h<span class="w"> </span>localhost<span class="w"> </span>-W<span class="w"> </span>-f<span class="w"> </span>/home/sysop/seiscomp/share/db/migrations/postgresql/0_10_to_0_11.sql
psql<span class="w"> </span>-U<span class="w"> </span>sysop<span class="w"> </span>-d<span class="w"> </span>seiscomp<span class="w"> </span>-h<span class="w"> </span>localhost<span class="w"> </span>-W<span class="w"> </span>-f<span class="w"> </span>/home/sysop/seiscomp/share/db/migrations/postgresql/0_11_to_0_12.sql
</pre></div>
</div>
</li>
</ul>
<p>Using the migration scripts provides a more user friendly way than copying the
lines of MySQL code from the changelog. In future versions we might add the option
to automatically run the migrations.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Upgrading the database make take some time. Do no interrupt the process!
During this time, the <cite>SeisComP</cite> messaging system is unavailable causing a downtime of the system.</p>
</div>
<p>After applying the migration scripts the database should be at the correct version.
Test again with:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>update-config
</pre></div>
</div>
<p>After successfully upgrading the database continue your previous upgrade procedure.</p>
</section>
<section id="seiscomp3-to-version-4">
<span id="tutorials-upgrade-v4"></span><h2>SeisComP3 to version &gt;=4<a class="headerlink" href="#seiscomp3-to-version-4" title="Permalink to this heading"></a></h2>
<p>SeisComP in version 4 has some major differences to SeisComP3 which require adjustments.
The main differences are in the <a class="reference internal" href="#sec-tutorials-upgrading-path"><span class="std std-ref">directories of the SeisComP installation</span></a>
and the <a class="reference internal" href="#sec-tutorials-upgrading-messaging"><span class="std std-ref">messaging system</span></a>.
The changes and the required actions are explained below. They must be considered
in addition to the steps set out in section <a class="reference internal" href="#tutorials-upgrade-normal"><span class="std std-ref">Normal Upgrade</span></a>.</p>
<section id="files-and-directories">
<span id="sec-tutorials-upgrading-path"></span><h3>Files and directories<a class="headerlink" href="#files-and-directories" title="Permalink to this heading"></a></h3>
<p>With <strong>SeisComP3</strong> all the default installation typically required all modules and configurations
in the directories</p>
<ul class="simple">
<li><p>seiscomp3/ , typically $HOME/seiscomp3 or /opt/seiscomp3/</p></li>
<li><p>$HOME/.seiscomp3/</p></li>
</ul>
<p>As of <strong>SeisComP in version 4</strong> the directories are:</p>
<ul class="simple">
<li><p>seiscomp/ , typically $HOME/seiscomp/ or /opt/seiscomp/</p></li>
<li><p>$HOME/.seiscomp/</p></li>
</ul>
<p><strong>All configuration files</strong> must be migrated to the new structures. This
includes:</p>
<ul>
<li><p>Configurations and inventory in seiscomp3/:</p>
<ul class="simple">
<li><p>seiscomp3/etc/*.cfg</p></li>
<li><p>seiscomp3/etc/inventory/</p></li>
<li><p>seiscomp3/etc/keys/</p></li>
</ul>
</li>
<li><p>Configurations in $HOME/.seiscomp3/</p></li>
<li><p>Logs in $HOME/.seiscomp3/log (optional)</p></li>
<li><p>All user-defined files and directories in seiscomp3/share/</p></li>
<li><p>All user-defined <a class="reference internal" href="../../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a> and other templates in seiscomp3/share/templates/</p></li>
<li><p>The waveform archive and other archives typically in seiscomp3/var/lib/</p></li>
<li><p>User-defined files and directories in other places.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Some configuration default and description files have changed. Spread, arclink
and arclinkproxy are not part of <cite>SeisComP</cite> anymore. <strong>Therefore, do not migrate:</strong></p>
<ul>
<li><p>any default configuration, description and init files. Better enable the desired
daemon modules again:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp/bin/seiscomp<span class="w"> </span><span class="nb">enable</span><span class="w"> </span><span class="o">[</span>module<span class="o">]</span>
</pre></div>
</div>
</li>
<li><p>any file related to spread or the arclink and arclinkproxy servers.</p></li>
</ul>
</div>
</li>
</ul>
<p>Configurations containing absolute paths, e.g. <code class="file docutils literal notranslate"><span class="pre">/home/sysop/seiscomp3/share/scautoloc/grid_custom.conf</span></code>,
must be adjusted. Better use <a class="reference internal" href="../concepts/configuration.html#concepts-configuration-variables"><span class="std std-ref">internal SeisComP variables</span></a>
such as <em>&#64;DATADIR&#64;</em> instead of <em>seiscomp3/share</em> or <em>seiscomp/share</em>.</p>
</section>
<section id="software-dependencies">
<h3>Software dependencies<a class="headerlink" href="#software-dependencies" title="Permalink to this heading"></a></h3>
<p>The software dependencies may have changed.
<a class="reference internal" href="../installation.html#software-dependencies"><span class="std std-ref">Install the missing ones</span></a>.</p>
</section>
<section id="system-variables">
<h3>System variables<a class="headerlink" href="#system-variables" title="Permalink to this heading"></a></h3>
<p>The system environment variables must be updated, e.g. in <code class="file docutils literal notranslate"><span class="pre">$HOME/.bashrc</span></code>.
Remove or uncomment the lines <code class="file docutils literal notranslate"><span class="pre">$HOME/.bashrc</span></code> referring to the depreciated SeisComP3
version. Then execute</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp/bin/seiscomp<span class="w"> </span>print<span class="w"> </span>env<span class="w"> </span>&gt;&gt;<span class="w"> </span><span class="nv">$HOME</span>/.bashrc
<span class="nb">source</span><span class="w"> </span><span class="nv">$HOME</span>/.bashrc
</pre></div>
</div>
</section>
<section id="pipelines">
<h3>Pipelines<a class="headerlink" href="#pipelines" title="Permalink to this heading"></a></h3>
<p>When using pipelines or alias modules, create and enable the alias module names again, e.g.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span><span class="nb">alias</span><span class="w"> </span>create<span class="w"> </span><span class="o">[</span>alias<span class="o">]</span><span class="w"> </span><span class="o">[</span>module<span class="o">]</span>
seiscomp<span class="w"> </span><span class="nb">enable</span><span class="w"> </span><span class="o">[</span>alias<span class="o">]</span>
</pre></div>
</div>
<p>Migrate the module and bindings configurations of the alias modules including all related additional files which are referred to
in the configurations.</p>
</section>
<section id="messaging-system">
<span id="sec-tutorials-upgrading-messaging"></span><h3>Messaging system<a class="headerlink" href="#messaging-system" title="Permalink to this heading"></a></h3>
<p>One of the main changes SeisComP3 to SeisComP in version 4.0 is the <a class="reference internal" href="../concepts/messaging.html#concepts-messaging"><span class="std std-ref">messaging system</span></a>.
Spread does not exist anymore and only <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> is started initially for
the messaging system. <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> allows to operate several queues in parallel with
different databases. This flexibility comes with additional parameters which require
configuration. Migrate the legacy database parameters and configure the new one:</p>
<ol class="arabic">
<li><p>Remove or comment the obsolete <em>dbplugin</em> plugin manually from
<code class="file docutils literal notranslate"><span class="pre">scmaster.cfg</span></code> and <code class="file docutils literal notranslate"><span class="pre">global.cfg</span></code></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># plugins = dbplugin</span>
</pre></div>
</div>
</li>
<li><p>Set up the messaging queues in the configuration of <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> in
<code class="file docutils literal notranslate"><span class="pre">scmaster.cfg</span></code>.</p>
<ul>
<li><p>Add and configure a new queue or stay with the default ones.</p>
<ul class="simple">
<li><p><em>production</em> considers a database by default.</p></li>
<li><p><em>playback</em> considers no database by default. Here, parameters can be
exchanged through the messaging without storing in the database.</p></li>
</ul>
<p>In the following examples, the <em>production</em> queue shall be assumed.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The <em>production</em> queue is used by default by all modules connected
to the messaging system. When removing this queue and a database shall be
used, another queue must exist
and the queue name must be configured for all modules in the global
<a class="reference internal" href="../../apps/global.html#confval-connection.server"><code class="xref std std-confval docutils literal notranslate"><span class="pre">connection.server</span></code></a> parameter. See below for an example.</p>
</div>
<ul>
<li><p>Add the required plugins per queue. Currently only <em>dbstore</em> is supported.
Example for the <em>production</em> queue:</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">queues.production.plugins</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">dbstore</span>
</pre></div>
</div>
</li>
<li><p>Add non-default message groups, e.g. <em>L1PICK</em> and <em>L1LOCATION</em> to the list
of groups <strong>in one of the ways</strong>:</p>
<ul>
<li><p><strong>Recommended:</strong> Add groups per queues to defaults in
<a class="reference internal" href="../../apps/scmaster.html#confval-queues.-name.groups"><code class="xref std std-confval docutils literal notranslate"><span class="pre">queues.$name.groups</span></code></a>, e.g. for the <em>production</em> group.
This convenient configuration per queue
considers the default groups in <a class="reference internal" href="../../apps/scmaster.html#confval-defaultGroups"><code class="xref std std-confval docutils literal notranslate"><span class="pre">defaultGroups</span></code></a> and simply adds
new groups in the configuration of queues</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">queues.production.groups</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">${defaultGroups}, L1PICK, L1LOCATION</span>
</pre></div>
</div>
</li>
<li><p>Set groups per queue in <a class="reference internal" href="../../apps/scmaster.html#confval-queues.-name.groups"><code class="xref std std-confval docutils literal notranslate"><span class="pre">queues.$name.groups</span></code></a>,
ignoring groups in <a class="reference internal" href="../../apps/scmaster.html#confval-defaultGroups"><code class="xref std std-confval docutils literal notranslate"><span class="pre">defaultGroups</span></code></a></p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">queues.production.groups</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">L1PICK, L1LOCATION, AMPLITUDE, PICK, LOCATION, MAGNITUDE, FOCMECH, EVENT, QC, PUBLICATION, GUI, INVENTORY, ROUTING, CONFIG, LOGGING, IMPORT_GROUP, SERVICE_REQUEST, SERVICE_PROVIDE</span>
</pre></div>
</div>
</li>
<li><p>Set groups in <a class="reference internal" href="../../apps/scmaster.html#confval-defaultGroups"><code class="xref std std-confval docutils literal notranslate"><span class="pre">defaultGroups</span></code></a></p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">defaultGroups</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">L1PICK, L1LOCATION, AMPLITUDE, PICK, LOCATION, MAGNITUDE, FOCMECH, EVENT, QC, PUBLICATION, GUI, INVENTORY, ROUTING, CONFIG, LOGGING, IMPORT_GROUP, SERVICE_REQUEST, SERVICE_PROVIDE</span>
</pre></div>
</div>
</li>
</ul>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>When setting groups in the queues all groups configured in
<a class="reference internal" href="../../apps/scmaster.html#confval-defaultGroups"><code class="xref std std-confval docutils literal notranslate"><span class="pre">defaultGroups</span></code></a> will be ignored unless <cite>${defaultGroups}</cite> is used.
Add all groups from <a class="reference internal" href="../../apps/scmaster.html#confval-defaultGroups"><code class="xref std std-confval docutils literal notranslate"><span class="pre">defaultGroups</span></code></a> to the queues to keep the
default groups.</p>
</div>
</li>
<li><p>Add the interface name, currently only <em>dbstore</em> is supported. Example for
a queue names <em>production</em></p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">queues.production.processors.messages</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">dbstore</span>
</pre></div>
</div>
</li>
<li><p>Add the database parameters which can be used from the legacy configuration</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">queues.production.processors.messages.dbstore.driver</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">mysql</span>
<span class="na">queues.production.processors.messages.dbstore.read</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">sysop:sysop@localhost/seiscomp3</span>
<span class="na">queues.production.processors.messages.dbstore.write</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">sysop:sysop@localhost/seiscomp3</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The name of the database can be freely chosen. The example assumes that
the database named <em>seiscomp3</em> exists already and that it shall be continued
to be used with the new SeisComP in version 4.x.x.</p>
</div>
</li>
</ul>
</li>
<li><p>Add one or more of the queues to the <a class="reference internal" href="../../apps/scmaster.html#confval-queues"><code class="xref std std-confval docutils literal notranslate"><span class="pre">queues</span></code></a> parameter to register
them by their names</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">queues</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">production, playback</span>
</pre></div>
</div>
</li>
</ul>
</li>
<li><p>Configure the connection parameters of all modules connecting to the messaging
system in the global configuration, e.g. in <code class="file docutils literal notranslate"><span class="pre">global.cfg</span></code>.
As in SeisComP3 the connection server is
localhost. The queue name is added to the host by “/”. The default queue
is <em>production</em>, e.g.</p>
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">connection.server</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">localhost/production</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If <em>production</em> shall be used, then no additional configuration is required.</p>
</div>
</li>
</ol>
</section>
<section id="database">
<h3>Database<a class="headerlink" href="#database" title="Permalink to this heading"></a></h3>
<p>After adjusting the structure, variables and configuration parameters, check if the
<a class="reference internal" href="#tutorials-upgrade-db"><span class="std std-ref">database requires an upgrade</span></a> as well.</p>
</section>
<section id="seedlink">
<h3>Seedlink<a class="headerlink" href="#seedlink" title="Permalink to this heading"></a></h3>
<p>When upgrading from SeisComp3 Jakrata-2018.327 or older and using <a class="reference internal" href="../../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a>,
consider the sections <a class="reference internal" href="#tutorials-upgrade-seedlink"><span class="std std-ref">SeedLink buffer</span></a> and
<a class="reference internal" href="#tutorials-proc-seedlink"><span class="std std-ref">SeedLink stream processor</span></a>.</p>
</section>
<section id="automatic-module-check">
<h3>Automatic module check<a class="headerlink" href="#automatic-module-check" title="Permalink to this heading"></a></h3>
<p>If applied, adjust the settings for automatic module status check, e.g. crontab entries.
For crontab use:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>crontab<span class="w"> </span>-e
</pre></div>
</div>
</section>
<section id="system-daemon">
<h3>System daemon<a class="headerlink" href="#system-daemon" title="Permalink to this heading"></a></h3>
<p>If <cite>SeisComP</cite> is controlled by the system daemon, e.g. to start enabled <cite>SeisComP</cite>
modules automatically during computer startup, then the startup script must be
adjusted.</p>
</section>
</section>
<section id="upgrade-from-seiscomp3-jakarta-2018-327-or-before">
<h2>Upgrade From SeisComP3 Jakarta-2018.327 or Before<a class="headerlink" href="#upgrade-from-seiscomp3-jakarta-2018-327-or-before" title="Permalink to this heading"></a></h2>
<section id="seedlink-buffer">
<span id="tutorials-upgrade-seedlink"></span><h3>SeedLink buffer<a class="headerlink" href="#seedlink-buffer" title="Permalink to this heading"></a></h3>
<p>In SeisComP3 prior to Jakarta-2020.330 two stations with the same
station but different network code were mixed in one buffer directory.
As of Jakarta-2020.330 and SeisComP in version 4 the buffer directories are now
unique!
Before upgrading <a class="reference internal" href="../../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a>, you should therefore rename the buffer directories
accordingly.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>You may discover data gaps if you do not rename the buffer directories.</p>
</div>
<p><strong>Example:</strong></p>
<ol class="arabic">
<li><p>Check the current situation:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sysop@host:~/seiscomp3/var/lib/seedlink/buffer$<span class="w"> </span>ls
<span class="w"> </span>PB02
</pre></div>
</div>
</li>
<li><p>Rename the directories properly:</p>
<ol class="arabic">
<li><p>Stop seedlink:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sysop@host:seiscomp<span class="w"> </span>stop<span class="w"> </span>seedlink
</pre></div>
</div>
</li>
<li><p>Upgrade to SeisComP3-jakarta-2020.330 or SeisComP in version 4 or higher.</p></li>
<li><p>Rename all seedlink buffer directories to NET.STA, e.g.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sysop@host:~/seiscomp3/var/lib/seedlink/buffer$<span class="w"> </span>mv<span class="w"> </span>PB02<span class="w"> </span>CX.PB02
sysop@host:~/seiscomp3/var/lib/seedlink/buffer$<span class="w"> </span>ls
<span class="w"> </span>CX.PB02
</pre></div>
</div>
</li>
<li><p>Update configuration:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sysop@host:seiscomp<span class="w"> </span>update-config
</pre></div>
</div>
</li>
<li><p>Start SeedLink</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sysop@host:seiscomp<span class="w"> </span>start<span class="w"> </span>seedlink
</pre></div>
</div>
</li>
</ol>
</li>
</ol>
<p id="seedlink-buffer-script">Script for renaming the seedlink buffer directories:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/bin/bash</span>
<span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span>-z<span class="w"> </span><span class="si">${</span><span class="nv">SEISCOMP_ROOT</span><span class="p">+x</span><span class="si">}</span><span class="w"> </span><span class="o">]</span><span class="p">;</span><span class="w"> </span><span class="k">then</span>
<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;Environment variable SEISCOMP_ROOT is not set.&quot;</span>
<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;Either use &#39;seiscomp exec [script]&#39; or set SEISCOMP_ROOT to the installation &quot;</span>
<span class="w"> </span><span class="nb">exit</span><span class="w"> </span><span class="m">1</span>
<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;path of your SeisComP installation.&quot;</span>
<span class="k">fi</span>
grep<span class="w"> </span>-A<span class="w"> </span><span class="m">2</span><span class="w"> </span>^station<span class="w"> </span><span class="nv">$SEISCOMP_ROOT</span>/var/lib/seedlink/seedlink.ini<span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="nb">read</span><span class="w"> </span>a<span class="w"> </span>b<span class="w"> </span>c<span class="p">;</span><span class="w"> </span><span class="k">do</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span><span class="s2">&quot;</span><span class="nv">$a</span><span class="s2">&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>station<span class="w"> </span>-a<span class="w"> </span><span class="s2">&quot;</span><span class="nv">$b</span><span class="s2">&quot;</span><span class="w"> </span>!<span class="o">=</span><span class="w"> </span>.dummy<span class="w"> </span><span class="o">]</span><span class="p">;</span><span class="w"> </span><span class="k">then</span>
<span class="w"> </span><span class="nv">id</span><span class="o">=</span><span class="nv">$b</span>
<span class="w"> </span><span class="nv">sta</span><span class="o">=</span><span class="s2">&quot;&quot;</span>
<span class="w"> </span><span class="nv">net</span><span class="o">=</span><span class="s2">&quot;&quot;</span>
<span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="nb">read</span><span class="w"> </span>a<span class="w"> </span>b<span class="w"> </span>c<span class="p">;</span><span class="w"> </span><span class="k">do</span>
<span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="nv">$a</span><span class="w"> </span><span class="k">in</span>
<span class="w"> </span>--<span class="o">)</span><span class="w"> </span><span class="k">break</span><span class="p">;;</span>
<span class="w"> </span>name<span class="o">)</span><span class="w"> </span><span class="nb">eval</span><span class="w"> </span><span class="nv">sta</span><span class="o">=</span><span class="nv">$c</span><span class="p">;;</span>
<span class="w"> </span>network<span class="o">)</span><span class="w"> </span><span class="nb">eval</span><span class="w"> </span><span class="nv">net</span><span class="o">=</span><span class="nv">$c</span><span class="p">;;</span>
<span class="w"> </span><span class="k">esac</span>
<span class="w"> </span><span class="k">done</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span>-z<span class="w"> </span><span class="s2">&quot;</span><span class="nv">$id</span><span class="s2">&quot;</span><span class="w"> </span>-o<span class="w"> </span>-z<span class="w"> </span><span class="s2">&quot;</span><span class="nv">$sta</span><span class="s2">&quot;</span><span class="w"> </span>-o<span class="w"> </span>-z<span class="w"> </span><span class="s2">&quot;</span><span class="nv">$net</span><span class="s2">&quot;</span><span class="w"> </span><span class="o">]</span><span class="p">;</span><span class="w"> </span><span class="k">then</span>
<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;Error parsing seedlink.ini&quot;</span>
<span class="w"> </span><span class="k">break</span>
<span class="w"> </span><span class="k">fi</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span><span class="s2">&quot;</span><span class="nv">$id</span><span class="s2">&quot;</span><span class="w"> </span>!<span class="o">=</span><span class="w"> </span><span class="s2">&quot;</span><span class="nv">$net</span><span class="s2">.</span><span class="nv">$sta</span><span class="s2">&quot;</span><span class="w"> </span><span class="o">]</span><span class="p">;</span><span class="w"> </span><span class="k">then</span>
<span class="w"> </span>mv<span class="w"> </span>-v<span class="w"> </span><span class="s2">&quot;</span><span class="nv">$SEISCOMP_ROOT</span><span class="s2">/var/lib/seedlink/buffer/</span><span class="nv">$id</span><span class="s2">&quot;</span><span class="w"> </span><span class="s2">&quot;</span><span class="nv">$SEISCOMP_ROOT</span><span class="s2">/var/lib/seedlink/buffer/</span><span class="nv">$net</span><span class="s2">.</span><span class="nv">$sta</span><span class="s2">&quot;</span>
<span class="w"> </span><span class="k">else</span>
<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;</span><span class="nv">$id</span><span class="s2">: No renaming required&quot;</span>
<span class="w"> </span><span class="k">fi</span>
<span class="w"> </span><span class="k">fi</span>
<span class="k">done</span>
</pre></div>
</div>
</section>
<section id="seedlink-stream-processor">
<span id="tutorials-proc-seedlink"></span><h3>SeedLink stream processor<a class="headerlink" href="#seedlink-stream-processor" title="Permalink to this heading"></a></h3>
<p>Since SeisComP3 in version Jakarta-2020.030 and SeisComP in version 4.0.0,
SeedLink stream processors (<code class="docutils literal notranslate"><span class="pre">proc</span></code> parameter) can be attached to both, stations
and plugin instances. In order to distinguish between the two cases, either
<code class="docutils literal notranslate"><span class="pre">proc</span></code> (attach to station) or <code class="docutils literal notranslate"><span class="pre">sources.*.proc</span></code> (attach to plugin instance)
parameter (or both) can be used in SeedLink bindings.</p>
<section id="chain-plugin">
<h4>chain plugin<a class="headerlink" href="#chain-plugin" title="Permalink to this heading"></a></h4>
<p>In case of the <a class="reference internal" href="../../apps/seedlink.html#seedlink-sources-chain-label"><span class="std std-ref">chain plugin</span></a> for
<a class="reference internal" href="../../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a>, there is
normally just one instance, so stream processors attached to this instance apply
to all stations. <strong>This is normally not what we want.</strong> Therefore the
chain plugin does not support the <code class="docutils literal notranslate"><span class="pre">sources.*.proc</span></code> option.</p>
<p>Before SeisComP3 in version Jakarta-2020.030 and SeisComP in version 4.0.0,
stream processors were always attached to stations, even when <code class="docutils literal notranslate"><span class="pre">sources.*.proc</span></code>
was used. This means when upgrading:</p>
<ol class="arabic simple">
<li><p><code class="docutils literal notranslate"><span class="pre">sources.chain.proc</span></code> must be renamed to <code class="docutils literal notranslate"><span class="pre">proc</span></code></p></li>
<li><p>streams_*.tpl templates must be moved one level up, from
<code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/seiscomp/share/templates/seedlink/chain/</span></code> to
<code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/seiscomp/share/templates/seedlink/</span></code>.</p></li>
</ol>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Using a stream processor with chain_plugin makes only sense when raw
data is generated (<a class="reference internal" href="../../apps/seedlink.html#confval-sources.chain.channels.unpack"><code class="xref std std-confval docutils literal notranslate"><span class="pre">sources.chain.channels.unpack</span></code></a>).</p>
</div>
</section>
<section id="id4">
<h4>Background<a class="headerlink" href="#id4" title="Permalink to this heading"></a></h4>
<p>A stream processor is an object defined in XML, which is used to create MiniSEED
from raw data and optionally downsample the data. What is the difference between
attaching a stream processor to station and plugin instance?</p>
<p>Lets take a look at the following stream processor definition in
<code class="file docutils literal notranslate"><span class="pre">$SEISCOMP_ROOT/share/templates/seedlink/streams_stream100.tpl</span></code>:</p>
<div class="highlight-XML notranslate"><div class="highlight"><pre><span></span><span class="nt">&lt;proc</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;stream100&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;tree&gt;</span>
<span class="w"> </span><span class="nt">&lt;input</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;Z&quot;</span><span class="w"> </span><span class="na">channel=</span><span class="s">&quot;Z&quot;</span><span class="w"> </span><span class="na">location=</span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="na">rate=</span><span class="s">&quot;100&quot;</span><span class="nt">/&gt;</span>
<span class="w"> </span><span class="nt">&lt;input</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;N&quot;</span><span class="w"> </span><span class="na">channel=</span><span class="s">&quot;N&quot;</span><span class="w"> </span><span class="na">location=</span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="na">rate=</span><span class="s">&quot;100&quot;</span><span class="nt">/&gt;</span>
<span class="w"> </span><span class="nt">&lt;input</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;E&quot;</span><span class="w"> </span><span class="na">channel=</span><span class="s">&quot;E&quot;</span><span class="w"> </span><span class="na">location=</span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="na">rate=</span><span class="s">&quot;100&quot;</span><span class="nt">/&gt;</span>
<span class="w"> </span><span class="nt">&lt;node</span><span class="w"> </span><span class="na">filter=</span><span class="s">&quot;FS2D5&quot;</span><span class="w"> </span><span class="na">stream=</span><span class="s">&quot;BH&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;node</span><span class="w"> </span><span class="na">filter=</span><span class="s">&quot;F96C&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;node</span><span class="w"> </span><span class="na">filter=</span><span class="s">&quot;ULP&quot;</span><span class="w"> </span><span class="na">stream=</span><span class="s">&quot;LH&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;node</span><span class="w"> </span><span class="na">filter=</span><span class="s">&quot;VLP&quot;</span><span class="w"> </span><span class="na">stream=</span><span class="s">&quot;VH&quot;</span><span class="nt">/&gt;</span>
<span class="w"> </span><span class="nt">&lt;/node&gt;</span>
<span class="w"> </span><span class="nt">&lt;/node&gt;</span>
<span class="w"> </span><span class="nt">&lt;/node&gt;</span>
<span class="w"> </span><span class="nt">&lt;/tree&gt;</span>
<span class="nt">&lt;/proc&gt;</span>
</pre></div>
</div>
<p>This creates 20Hz BH*, 1Hz LH* and 0.1Hz VH* streams from 100Hz Z, N, E raw
data. If one plugin instance is used for the station, it does not make a
difference whether this is attached to station or plugin instance. But suppose
the station is using two plugin instances—one for broad-band and the other for
strong-motion data—, both sending Z, N and E channels. Now if the stream processor
is attached to station, data from both plugin instances would mixed up. We must
attach a different stream processor to each plugin instance—one producing BH*,
LH* and VH* and the other one producing BN* and so on.</p>
</section>
</section>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Upgrading SeisComP</a><ul>
<li><a class="reference internal" href="#background">Background</a><ul>
<li><a class="reference internal" href="#seiscomp-versions">SeisComP versions</a></li>
<li><a class="reference internal" href="#upgrade-seiscomp-on-multiple-machines">Upgrade SeisComP on multiple machines</a></li>
</ul>
</li>
<li><a class="reference internal" href="#package-download">Package Download</a></li>
<li><a class="reference internal" href="#documentation-of-changes">Documentation of Changes</a></li>
<li><a class="reference internal" href="#normal-upgrade">Normal Upgrade</a></li>
<li><a class="reference internal" href="#upgrade-database-schema-version">Upgrade database schema version</a></li>
<li><a class="reference internal" href="#seiscomp3-to-version-4">SeisComP3 to version &gt;=4</a><ul>
<li><a class="reference internal" href="#files-and-directories">Files and directories</a></li>
<li><a class="reference internal" href="#software-dependencies">Software dependencies</a></li>
<li><a class="reference internal" href="#system-variables">System variables</a></li>
<li><a class="reference internal" href="#pipelines">Pipelines</a></li>
<li><a class="reference internal" href="#messaging-system">Messaging system</a></li>
<li><a class="reference internal" href="#database">Database</a></li>
<li><a class="reference internal" href="#seedlink">Seedlink</a></li>
<li><a class="reference internal" href="#automatic-module-check">Automatic module check</a></li>
<li><a class="reference internal" href="#system-daemon">System daemon</a></li>
</ul>
</li>
<li><a class="reference internal" href="#upgrade-from-seiscomp3-jakarta-2018-327-or-before">Upgrade From SeisComP3 Jakarta-2018.327 or Before</a><ul>
<li><a class="reference internal" href="#seedlink-buffer">SeedLink buffer</a></li>
<li><a class="reference internal" href="#seedlink-stream-processor">SeedLink stream processor</a><ul>
<li><a class="reference internal" href="#chain-plugin">chain plugin</a></li>
<li><a class="reference internal" href="#id4">Background</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="postinstall.html"
title="previous chapter">Installation on Ubuntu</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="addstation.html"
title="next chapter">Add a new station</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/upgrading.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,360 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Play back archived waveforms &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Help! Im stuck! Now what?" href="help.html" />
<link rel="prev" title="Magnitudes: Regionalization, Aliases, Mw" href="magnitude-regionalization.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="help.html" title="Help! Im stuck! Now what?"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="magnitude-regionalization.html" title="Magnitudes: Regionalization, Aliases, Mw"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="play-back-archived-waveforms">
<span id="tutorials-waveformplayback"></span><h1>Play back archived waveforms<a class="headerlink" href="#play-back-archived-waveforms" title="Permalink to this heading"></a></h1>
<p>Aims:</p>
<ul class="simple">
<li><p>Use previously recorded waveform files to re-run the analysis
of an old event using SeisComP. This is known as a <em>waveform playback</em>.</p></li>
<li><p>Insert results into your current SeisComP database for later processing.</p></li>
<li><p>Review the results from playbacks.</p></li>
</ul>
<p>Pre-requisites for this tutorial:</p>
<ul class="simple">
<li><p>Have SeisComP installed and configured</p></li>
<li><p>Have access to <a class="reference internal" href="../glossary.html#term-miniSeed"><span class="xref std std-term">miniSEED</span></a> waveforms</p></li>
</ul>
<p>Afterwards/Results/Outcomes:</p>
<ul class="simple">
<li><p>The results from the playback are in your SeisComP system, e.g. <a class="reference internal" href="../glossary.html#term-pick"><span class="xref std std-term">picks</span></a>,
<a class="reference internal" href="../glossary.html#term-origin"><span class="xref std std-term">origins</span></a>, <a class="reference internal" href="../glossary.html#term-amplitude"><span class="xref std std-term">amplitudes</span></a>, <a class="reference internal" href="../glossary.html#term-event"><span class="xref std std-term">events</span></a></p></li>
</ul>
<p>Time range estimate:</p>
<ul class="simple">
<li><p>60 minutes</p></li>
</ul>
<p>Related tutorial(s):</p>
<ul class="simple">
<li><p>Tutorial on <a class="reference internal" href="help.html#tutorials-help"><span class="std std-ref">getting help</span></a></p></li>
</ul>
<hr class="docutils" />
<p>Playbacks are an important way of testing module and whole-system configurations,
operator trainings, system demonstrations and validations and tuning of the SeisComP modules
used for detecting and locating events, e.g. involving</p>
<ul class="simple">
<li><p><a class="reference internal" href="../../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/slarchive.html#slarchive"><span class="std std-ref">slarchive</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scautopick.html#scautopick"><span class="std std-ref">scautopick</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scautoloc.html#scautoloc"><span class="std std-ref">scautoloc</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scamp.html#scamp"><span class="std std-ref">scamp</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scmag.html#scmag"><span class="std std-ref">scmag</span></a></p></li>
<li><p><a class="reference internal" href="../../apps/scevent.html#scevent"><span class="std std-ref">scevent</span></a></p></li>
<li><p>others.</p></li>
</ul>
<p>Playbacks rely on miniSEED data which are obtained from the <a class="reference internal" href="../glossary.html#term-SDS"><span class="xref std std-term">SDS</span></a> archive or
other sources. The miniSEED data records in the data files must be sorted by end time!</p>
<p>There are two types of playbacks:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#tutorials-rtplayback"><span class="std std-ref">Real-time playbacks</span></a>.</p></li>
<li><p><a class="reference internal" href="#tutorials-nonrtplayback"><span class="std std-ref">Non-real-time playbacks</span></a>.</p></li>
</ul>
<section id="data-preparation">
<h2>Data preparation<a class="headerlink" href="#data-preparation" title="Permalink to this heading"></a></h2>
<p>First extract the data. Make sure the miniSEED records are sorted by end time.
The data extraction depends on the data source.</p>
<p>Examples:</p>
<ul>
<li><p><strong>SDS archive:</strong> Extract the data from your own SDS archive using <a class="reference internal" href="../../apps/scart.html#scart"><span class="std std-ref">scart</span></a>
and save it in a new miniSEED file <code class="file docutils literal notranslate"><span class="pre">[your</span> <span class="pre">miniSEED</span> <span class="pre">file]</span></code>, sorted by
end time of the records.</p>
<p>Examples:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scart<span class="w"> </span>-dsE<span class="w"> </span>-l<span class="w"> </span><span class="o">[</span>list<span class="w"> </span>file<span class="o">]</span><span class="w"> </span><span class="nv">$SEISCOMP_ROOT</span>/var/lib/archive<span class="w"> </span>&gt;<span class="w"> </span><span class="o">[</span>your<span class="w"> </span>miniSEED<span class="w"> </span>file<span class="o">]</span>
</pre></div>
</div>
</li>
<li><p><strong>FDSNWS:</strong> Get the miniSEED data from an external FDSNWS server. The obtained
data are initially sorted by station and must therefore be sorted by end time
using <a class="reference internal" href="../../apps/scmssort.html#scmssort"><span class="std std-ref">scmssort</span></a>. Use the resulting file <code class="file docutils literal notranslate"><span class="pre">[your</span> <span class="pre">miniSEED</span> <span class="pre">file]</span></code>
for your playback.</p>
<p>Example for one hour of data from the GE network from
<a class="reference external" href="https://geofon.gfz-potsdam.de/waveform/webservices/fdsnws.php">FDSNWS at GEOFON</a>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>wget<span class="w"> </span>-O<span class="w"> </span>data.mseed<span class="w"> </span><span class="s2">&quot;http://geofon.gfz-potsdam.de/fdsnws/dataselect/1/query?net=GE&amp;cha=BH*&amp;starttime=2021-04-01T06:00:00Z&amp;endtime=2021-04-01T07:00:00Z&quot;</span>
scmssort<span class="w"> </span>-u<span class="w"> </span>-E<span class="w"> </span>data.mseed<span class="w"> </span>&gt;<span class="w"> </span><span class="o">[</span>your<span class="w"> </span>miniSEED<span class="w"> </span>file<span class="o">]</span>
</pre></div>
</div>
</li>
<li><p><strong>CAPS server:</strong> Extract the data from gempas CAPS server <span id="id1">[<a class="reference internal" href="../references.html#id91" title="CAPS. gempa module. URL: https://docs.gempa.de/caps/current/index.html.">3</a>]</span>
using <span id="id2"><em>capstool</em> [<a class="reference internal" href="../references.html#id94" title="capstool. gempa plugin. URL: https://docs.gempa.de/caps/current/apps/capstool.html.">27</a>]</span>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>capstool<span class="w"> </span>-H<span class="w"> </span><span class="o">[</span>host<span class="o">]</span>:<span class="o">[</span>port<span class="o">]</span><span class="w"> </span><span class="o">[</span>request<span class="w"> </span>file<span class="o">]</span><span class="w"> </span>&gt;<span class="w"> </span>data.mseed
</pre></div>
</div>
<p>or <a class="reference internal" href="../../apps/scart.html#scart"><span class="std std-ref">scart</span></a> with the <em>caps</em> <a class="reference internal" href="../glossary.html#term-RecordStream"><span class="xref std std-term">recordstream</span></a>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scart<span class="w"> </span>-I<span class="w"> </span>caps://<span class="o">[</span>host<span class="o">]</span>:<span class="o">[</span>port<span class="o">]</span><span class="w"> </span>-l<span class="w"> </span><span class="o">[</span>list<span class="w"> </span>file<span class="o">]</span><span class="w"> </span>--stdout<span class="w"> </span>&gt;<span class="w"> </span>data.mseed
</pre></div>
</div>
<p>Eventually, sort the downloaded data by end time with <a class="reference internal" href="../../apps/scmssort.html#scmssort"><span class="std std-ref">scmssort</span></a> creating
a new file, <code class="file docutils literal notranslate"><span class="pre">[your</span> <span class="pre">miniSEED</span> <span class="pre">file]</span></code>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scmssort<span class="w"> </span>-u<span class="w"> </span>-E<span class="w"> </span>data.mseed<span class="w"> </span>&gt;<span class="w"> </span><span class="o">[</span>your<span class="w"> </span>miniSEED<span class="w"> </span>file<span class="o">]</span>
</pre></div>
</div>
</li>
</ul>
<p>Use the resulting file <code class="file docutils literal notranslate"><span class="pre">[your</span> <span class="pre">miniSEED</span> <span class="pre">file]</span></code> for your playback.</p>
</section>
<section id="playbacks">
<h2>Playbacks<a class="headerlink" href="#playbacks" title="Permalink to this heading"></a></h2>
<section id="real-time-playbacks">
<span id="tutorials-rtplayback"></span><h3>Real-time playbacks<a class="headerlink" href="#real-time-playbacks" title="Permalink to this heading"></a></h3>
<p>In a real-time playback data are injected into the seedlink buffer from a file
using the command-line tool <a class="reference internal" href="../../apps/msrtsimul.html#msrtsimul"><span class="std std-ref">msrtsimul</span></a>. Therefore, seedlink requires a configuration.</p>
<ol class="arabic">
<li><p>Prepare <a class="reference internal" href="../../apps/seedlink.html#seedlink"><span class="std std-ref">seedlink</span></a> to except data from msrtsimul:</p>
<ul>
<li><p>In the <a class="reference internal" href="../concepts/configuration.html#concepts-configuration"><span class="std std-ref">module configuration</span></a>
of seedlink set</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nv">msrtsimul</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
</pre></div>
</div>
</li>
<li><p>Save the configuration, update the configuration and restart seedlink:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>update-config
seiscomp<span class="w"> </span>restart<span class="w"> </span>seedlink
</pre></div>
</div>
<p>Open :scrttv: to verify the success of this re-configuration. No new data must arrive.</p>
</li>
</ul>
</li>
<li><p>Restart all automatic data processing modules you wish to involve. Additionally start
<a class="reference internal" href="../../apps/slarchive.html#slarchive"><span class="std std-ref">slarchive</span></a> to archive the miniSEED data in the SDS archive for post-processing.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>seiscomp<span class="w"> </span>restart<span class="w"> </span>scmaster<span class="w"> </span>scautopick<span class="w"> </span>scautoloc<span class="w"> </span>scamp<span class="w"> </span>scmag<span class="w"> </span>scevent<span class="w"> </span>slarchive
</pre></div>
</div>
</li>
<li><p>Start all desired <a class="reference internal" href="../glossary.html#term-GUI"><span class="xref std std-term">GUI</span></a> modules to observe the data acquisition and processing
and the event results, e.g.:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scrttv<span class="w"> </span><span class="p">&amp;</span><span class="w"> </span>scmv<span class="w"> </span><span class="p">&amp;</span><span class="w"> </span>scesv<span class="w"> </span><span class="p">&amp;</span><span class="w"> </span>scolv
</pre></div>
</div>
</li>
<li><p>Start the playback using msrtsimul:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>msrtsimul<span class="w"> </span>-v<span class="w"> </span><span class="o">[</span>your<span class="w"> </span>miniSEED<span class="w"> </span>file<span class="o">]</span>
</pre></div>
</div>
<p>This will play back the data as if they where perfectly recorded and received now.
To preserve the time of the records use <strong class="program">msrtsimul</strong> with the historic
mode:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>msrtsimul<span class="w"> </span>-v<span class="w"> </span>-m<span class="w"> </span>historic<span class="w"> </span><span class="o">[</span>your<span class="w"> </span>miniSEED<span class="w"> </span>file<span class="o">]</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Using <strong class="program">msrtsimul</strong> with the historic mode requires to reset the
seedlink buffer and the buffer of other processing modules by removing
the buffer files and restarting the modules. This mode may
therefore be exclusively used by experienced users.</p>
</div>
</li>
</ol>
<p>Revert the seedlink configuration after the playback to return to the original real-time
data acquisition.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Be careful with executing real-time playbacks on production SeisComP systems:</p>
<ul class="simple">
<li><p>You potentially disrupt the real-time data acquisition</p></li>
<li><p>You potentially add data at wrong times to seedlink and your SDS waveform archive</p></li>
<li><p>You modify the history of the created events</p></li>
<li><p>You potentially add events at wrong origin times to your database.</p></li>
</ul>
<p>Better use separate test systems for real-time playbacks.</p>
</div>
</section>
<section id="non-real-time-playbacks">
<span id="tutorials-nonrtplayback"></span><h3>Non-real-time playbacks<a class="headerlink" href="#non-real-time-playbacks" title="Permalink to this heading"></a></h3>
<p>In non-real-time playbacks, also referred to as offline playbacks, data are processed
by each module as fast as possible. The results can be communicated by</p>
<ul class="simple">
<li><p>Messages: message-based playback</p></li>
<li><p>XML files in <a class="reference internal" href="../glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> format: XML playback. They require the processing
modules to provide the <em>- -ep</em> option.</p></li>
</ul>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>In non-real-time playbacks scheduling and the creation history are not representative of
real-time situations.</p>
</div>
</section>
</section>
<section id="reviewing-results">
<h2>Reviewing results<a class="headerlink" href="#reviewing-results" title="Permalink to this heading"></a></h2>
<p>Use <a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a> or other <a class="reference internal" href="../glossary.html#term-GUI"><span class="xref std std-term">GUIs</span></a> to review the results:</p>
<ul>
<li><p>Event parameters are in the default database. Configure <a class="reference internal" href="../concepts/recordstream.html#concepts-recordstream"><span class="std std-ref">RecordStream</span></a>
if the waveforms are in the seedlink or in the <a class="reference internal" href="../glossary.html#term-SDS"><span class="xref std std-term">SDS</span></a> archive:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scolv<span class="w"> </span>-d<span class="w"> </span>mysql://sysop:sysop@localhost/seiscomp
</pre></div>
</div>
</li>
<li><p>Event parameters are in the default database but the waveforms are read from the miniSEED file:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scolv<span class="w"> </span>-d<span class="w"> </span>mysql://sysop:sysop@localhost/seiscomp<span class="w"> </span>-I<span class="w"> </span>file://<span class="o">[</span>your<span class="w"> </span>file<span class="o">]</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Reading from the original file will only work if the actual times of the data
are preserved during the playback. This is <strong>not</strong> the case when starting
<strong class="program">msrtsimul</strong> without the historic mode.</p>
</div>
</li>
<li><p>Event parameters are available in one XML file and the waveforms are read from the miniSEED file:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scolv<span class="w"> </span>--offline<span class="w"> </span>-d<span class="w"> </span>mysql://sysop:sysop@localhost/seiscomp<span class="w"> </span>-I<span class="w"> </span>file://<span class="o">[</span>your<span class="w"> </span>miniSEED<span class="w"> </span>file<span class="o">]</span>
</pre></div>
</div>
<p>To open the XML file click on the <em>File</em> menu of scolv. When results are available in several
XML files, the files can be merged beforehand using <a class="reference internal" href="../../apps/scxmlmerge.html#scxmlmerge"><span class="std std-ref">scxmlmerge</span></a>.</p>
</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Adjust the arguments to match your configuration. Use your own values for arguments enclosed by
brackets, e.g. [your file]</p>
</div>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Play back archived waveforms</a><ul>
<li><a class="reference internal" href="#data-preparation">Data preparation</a></li>
<li><a class="reference internal" href="#playbacks">Playbacks</a><ul>
<li><a class="reference internal" href="#real-time-playbacks">Real-time playbacks</a></li>
<li><a class="reference internal" href="#non-real-time-playbacks">Non-real-time playbacks</a></li>
</ul>
</li>
<li><a class="reference internal" href="#reviewing-results">Reviewing results</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="magnitude-regionalization.html"
title="previous chapter">Magnitudes: Regionalization, Aliases, Mw</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="help.html"
title="next chapter">Help! Im stuck! Now what?</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/waveformplayback.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,297 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Get real-time data from a remote Seedlink server (single station) &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=823bb831"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Set up local waveform archiving" href="archiving.html" />
<link rel="prev" title="Add a new station" href="addstation.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="archiving.html" title="Set up local waveform archiving"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="addstation.html" title="Add a new station"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="get-real-time-data-from-a-remote-seedlink-server-single-station">
<span id="tutorials-waveforms"></span><h1>Get real-time data from a remote Seedlink server (single station)<a class="headerlink" href="#get-real-time-data-from-a-remote-seedlink-server-single-station" title="Permalink to this heading"></a></h1>
<p>You will use <strong class="program">scconfig</strong> to add waveforms for a single station
which is already in inventory.</p>
<p>Pre-requisites for this tutorial:</p>
<ul class="simple">
<li><p><a class="reference internal" href="postinstall.html#tutorials-postinstall"><span class="std std-ref">Installation</span></a></p></li>
<li><p>Inventory for the station already loaded.</p></li>
</ul>
<p>Afterwards/Results/Outcomes:</p>
<ul class="simple">
<li><p><strong class="program">slinktool -Q</strong> locally shows the stations streams are available.</p></li>
</ul>
<p>Time range estimate:</p>
<ul class="simple">
<li><p>10 minutes</p></li>
</ul>
<p>Related tutorial(s):</p>
<ul class="simple">
<li><p><a class="reference internal" href="archiving.html#tutorials-archiving"><span class="std std-ref">Set up local waveform archiving</span></a></p></li>
<li><p><a class="reference internal" href="servefdsnws.html#tutorials-servefdsnws"><span class="std std-ref">Enable local FDSNWS server</span></a></p></li>
<li><p><a class="reference internal" href="addstation.html#tutorials-addstation"><span class="std std-ref">Add a new station</span></a></p></li>
</ul>
<hr class="docutils" />
<p>We suppose there is an upstream Seedlink server, such as that
from GEOFON, IRIS, or some other public source.</p>
<section id="check-data-are-available">
<h2>Check data are available<a class="headerlink" href="#check-data-are-available" title="Permalink to this heading"></a></h2>
<p>First, well query the upstream Seedlink server,
to confirm that it has current data.
We do this with SeisComPs <strong class="program">slinktool</strong> command,
giving it the -L option to list the available stations.
For this example, well use the server at host <cite>geofon.gfz-potsdam.de</cite>
on port 18000 (the default)</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ slinktool -L geofon.gfz-potsdam.de
AW VNA1 VNA1
AW VNA2 VNA2
[..]
GR BSEG BSEG
GR BUG BUG
GR CLL CLL
GR CLZ CLZ
[..]
</pre></div>
</div>
<p>This can be a long list. It shows the network code and station code of each
of the stations for which data is available from this Seedlink server.
We can restrict the output to our station of interest using <cite>grep</cite>.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ slinktool -Q geofon.gfz-potsdam.de | grep GR.CLL
GR CLL LHN D 2020/05/06 15:13:41.2249 - 2020/05/06 21:15:28.0299
GR CLL BHZ D 2020/05/06 15:13:41.2249 - 2020/05/06 21:22:13.1300
GR CLL BHN D 2020/05/06 15:13:41.2249 - 2020/05/06 21:22:15.4300
GR CLL HHE D 2020/05/06 15:13:41.2249 - 2020/05/06 21:22:50.3450
GR CLL HHN D 2020/05/06 15:13:41.2249 - 2020/05/06 21:22:52.4650
GR CLL HHZ D 2020/05/06 15:13:41.2249 - 2020/05/06 21:22:53.6850
GR CLL LOG L 2020/05/06 15:13:41.2249 - 2020/05/06 19:59:53.3850
GR CLL BHE D 2020/05/06 15:13:41.2249 - 2020/05/06 21:22:08.9300
[..]
</pre></div>
</div>
<p>The -Q option provides a formatted stream list,
with one line for each stream available from the server.
The columns are: network code, station code, location code (which may
be empty) and channel code, a flag, and then the (UTC) time of the
first and last data available at the server.
(The <cite>grep</cite> command here is used to limit output to just those CLL streams;
without it, this server provides thousands of lines of output.)</p>
<p>For an active station the last data time (shown on the
right) will be very recent.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p><strong>(Advanced)</strong>
You can restrict who has access to a stations data (from your server)
in your Seedlink bindings.
This sets the <a class="reference internal" href="../../apps/seedlink.html#confval-0"><code class="xref std std-confval docutils literal notranslate"><span class="pre">access</span></code></a> variable in your <code class="file docutils literal notranslate"><span class="pre">seedlink.ini</span></code> file.
This can be done for all stations, or per station.
The documentation for <strong class="program">seedlink</strong> gives details.</p>
</div>
</section>
<section id="configure-bindings">
<h2>Configure bindings<a class="headerlink" href="#configure-bindings" title="Permalink to this heading"></a></h2>
<p>In <strong class="program">scconfig</strong>, under the Bindings tab:</p>
<ol class="arabic simple">
<li><p>Create a <em>seedlink</em> profile named “geofon”, named after the upstream server.</p>
<ul class="simple">
<li><p>Double click on the profile.</p></li>
<li><p>Select the chain plugin for the souce from the drop-down menu</p></li>
<li><p>To add the plugin click on the green “plus” button on the left. Name it anything or even leave the name blank.</p></li>
<li><p>Open this and set the name of the server (<a class="reference internal" href="../../apps/slmon.html#confval-address"><code class="xref std std-confval docutils literal notranslate"><span class="pre">address</span></code></a>)
and its TCP port, <a class="reference internal" href="../../apps/slmon.html#confval-port"><code class="xref std std-confval docutils literal notranslate"><span class="pre">port</span></code></a>. Normally you leave the port at 18000 which is the default.</p></li>
<li><p>If you wish to limit the data requested to particular channels,
based on channel or location code,
set Seedlinks <a class="reference internal" href="../../apps/seedlink.html#confval-sources.chain.selectors"><code class="xref std std-confval docutils literal notranslate"><span class="pre">selectors</span></code></a> to “BH?.D” say
for fetch all BH stream and no auxiliary streams. Add the location code without
a space to limit by location as well, e.g. 00BH?.D. You may add a comma-separated
list of streams, e.g. “00BH?.D, 10BH?.D”.
Otherwise you will be requesting all streams available for this
station, potentially wasting bandwidth and slowing your system.
No other changes are normally necessary.</p></li>
</ul>
</li>
<li><p>Drag and drop this profile from the right side to the network icon on the
left side (you may do that also at the station level)
to apply it to your station.</p></li>
<li><p>Press Ctrl+S to save the configuration.
This writes configuration files in <code class="file docutils literal notranslate"><span class="pre">~/seiscomp/etc/key</span></code>.</p></li>
</ol>
</section>
<section id="update-the-configuration">
<h2>Update the configuration<a class="headerlink" href="#update-the-configuration" title="Permalink to this heading"></a></h2>
<p>The SeisComP database must already be updated with the inventory
(see Tutorial <a class="reference internal" href="addstation.html#tutorials-addstation"><span class="std std-ref">Add a new station</span></a>).
SeisComPs modules then require restarting to load the updated information.</p>
<ul>
<li><p>Go to the System tab and press ESC (the Escape key, to de-select all modules).</p>
<ol class="arabic simple">
<li><p>Click on “Update configuration”, at the right of the window.
(<strong>Not</strong> “Refresh”, - that just refreshes <strong class="program">scconfig</strong>s
display of what is running!)</p></li>
<li><p>Press <em>Start</em> to start acquiring data from the already configured stations.</p></li>
</ol>
</li>
<li><p>Alternatively, at the command line:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ seiscomp update-config seedlink
$ seiscomp restart seedlink
</pre></div>
</div>
</li>
</ul>
</section>
<section id="check-it-works">
<h2>Check it works<a class="headerlink" href="#check-it-works" title="Permalink to this heading"></a></h2>
<ul>
<li><p>To confirm that you have waveform data for the station locally,
run</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">slinktool</span> <span class="o">-</span><span class="n">Q</span> <span class="n">localhost</span>
</pre></div>
</div>
</li>
</ul>
</section>
<section id="further-steps">
<h2>Further steps<a class="headerlink" href="#further-steps" title="Permalink to this heading"></a></h2>
<p>At this point,
you can follow the same procedure for other networks/stations, provided you</p>
<ol class="arabic simple">
<li><p>Have metadata available. You may follow the tutorial <a class="reference internal" href="addstation.html#tutorials-addstation"><span class="std std-ref">Add a new station</span></a>.</p></li>
<li><p>Know the location of a Seedlink server for, and have access to, the waveforms.</p></li>
</ol>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Get real-time data from a remote Seedlink server (single station)</a><ul>
<li><a class="reference internal" href="#check-data-are-available">Check data are available</a></li>
<li><a class="reference internal" href="#configure-bindings">Configure bindings</a></li>
<li><a class="reference internal" href="#update-the-configuration">Update the configuration</a></li>
<li><a class="reference internal" href="#check-it-works">Check it works</a></li>
<li><a class="reference internal" href="#further-steps">Further steps</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="addstation.html"
title="previous chapter">Add a new station</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="archiving.html"
title="next chapter">Set up local waveform archiving</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/waveforms.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>