267 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			267 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<!DOCTYPE html>
 | 
						||
 | 
						||
<html  lang="en">
 | 
						||
  <head>
 | 
						||
    <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
 | 
						||
 | 
						||
    <title>LocExt — 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="LocRouter" href="global_locrouter.html" />
 | 
						||
    <link rel="prev" title="StdLoc" href="global_stdloc.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.1</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="global_locrouter.html" title="LocRouter"
 | 
						||
             accesskey="N">
 | 
						||
            next
 | 
						||
          </a>
 | 
						||
        </li>
 | 
						||
        <li class="right">
 | 
						||
          <a href="global_stdloc.html" title="StdLoc"
 | 
						||
             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="../toc/extensions.html" >Extensions</a>
 | 
						||
        </li>
 | 
						||
        <li class="nav-item nav-item-2">
 | 
						||
          <a href="../toc/extensions/global.html" accesskey="U">global</a>
 | 
						||
        </li> 
 | 
						||
      </ul>
 | 
						||
    </div>
 | 
						||
        </div>
 | 
						||
      </div>
 | 
						||
    </div>
 | 
						||
    <div class="container">
 | 
						||
      <div class="fitted content" id="anchors-container">
 | 
						||
        <div class="body" role="main">
 | 
						||
          
 | 
						||
  <section id="locext">
 | 
						||
<span id="global-locext"></span><h1>LocExt<a class="headerlink" href="#locext" title="Permalink to this heading">¶</a></h1>
 | 
						||
<p>Locator which forwards the processing to external scripts</p>
 | 
						||
<section id="description">
 | 
						||
<h2>Description<a class="headerlink" href="#description" title="Permalink to this heading">¶</a></h2>
 | 
						||
<p>The ExternalLocator implements a wrapper for scripts which do the actual location
 | 
						||
process. The input and output are represented as XML and communicated via the
 | 
						||
input/output channels of the called process: stdin and stdout.</p>
 | 
						||
</section>
 | 
						||
<section id="plugin">
 | 
						||
<h2>Plugin<a class="headerlink" href="#plugin" title="Permalink to this heading">¶</a></h2>
 | 
						||
<p>To enable the ExternalLocator the plugin <code class="docutils literal notranslate"><span class="pre">locext</span></code> must be loaded.</p>
 | 
						||
</section>
 | 
						||
<section id="commandline-parameters">
 | 
						||
<h2>Commandline Parameters<a class="headerlink" href="#commandline-parameters" title="Permalink to this heading">¶</a></h2>
 | 
						||
<p>There are several commandline parameters passed to the script depending on
 | 
						||
the locator configuration. The following table summarizes them.</p>
 | 
						||
<table class="docutils align-default">
 | 
						||
<thead>
 | 
						||
<tr class="row-odd"><th class="head"><p>Parameter</p></th>
 | 
						||
<th class="head"><p>Description</p></th>
 | 
						||
</tr>
 | 
						||
</thead>
 | 
						||
<tbody>
 | 
						||
<tr class="row-even"><td><p>–max-dist=X</p></td>
 | 
						||
<td><p>The cut-off distance if set</p></td>
 | 
						||
</tr>
 | 
						||
<tr class="row-odd"><td><p>–ignore-initial-location</p></td>
 | 
						||
<td><p>Whether to ignore the initial origin location or not</p></td>
 | 
						||
</tr>
 | 
						||
<tr class="row-even"><td><p>–fixed-depth=X</p></td>
 | 
						||
<td><p>The depth in km to be fixed if enabled</p></td>
 | 
						||
</tr>
 | 
						||
</tbody>
 | 
						||
</table>
 | 
						||
</section>
 | 
						||
<section id="input">
 | 
						||
<h2>Input<a class="headerlink" href="#input" title="Permalink to this heading">¶</a></h2>
 | 
						||
<p>The input document written to stdin of the child process is a valid SeisComP
 | 
						||
XML document containing <code class="docutils literal notranslate"><span class="pre">EventParameters</span></code>. The event parameters hold exactly
 | 
						||
one origin to be relocated and all picks references from the origins arrivals.</p>
 | 
						||
<p>Example:</p>
 | 
						||
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><?xml version="1.0" encoding="UTF-8"?>
 | 
						||
<seiscomp xmlns="http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.11" version="0.11">
 | 
						||
  <EventParameters>
 | 
						||
    <pick ...>...</pick>
 | 
						||
    <pick ...>...</pick>
 | 
						||
    ...
 | 
						||
    <origin ...>
 | 
						||
      ...
 | 
						||
      <arrival>
 | 
						||
        ...
 | 
						||
      </arrival>
 | 
						||
      <arrival>
 | 
						||
        ...
 | 
						||
      </arrival>
 | 
						||
      ...
 | 
						||
    </origin>
 | 
						||
  </EventParameters>
 | 
						||
</seiscomp>
 | 
						||
</pre></div>
 | 
						||
</div>
 | 
						||
</section>
 | 
						||
<section id="output">
 | 
						||
<h2>Output<a class="headerlink" href="#output" title="Permalink to this heading">¶</a></h2>
 | 
						||
<p>The output is read from stdout and is expected to be a SeisComP XML document
 | 
						||
just containing an origin.</p>
 | 
						||
<p>Example:</p>
 | 
						||
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp"><?xml version="1.0" encoding="UTF-8"?></span>
 | 
						||
<span class="nt"><seiscomp</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.11"</span><span class="w"> </span><span class="na">version=</span><span class="s">"0.11"</span><span class="nt">></span>
 | 
						||
<span class="w">  </span><span class="nt"><Origin</span><span class="w"> </span><span class="na">publicID=</span><span class="s">"..."</span><span class="nt">></span>
 | 
						||
<span class="w">  </span><span class="nt"></Origin></span>
 | 
						||
<span class="nt"></seiscomp></span>
 | 
						||
</pre></div>
 | 
						||
</div>
 | 
						||
</section>
 | 
						||
<section id="example-configuration">
 | 
						||
<h2>Example Configuration<a class="headerlink" href="#example-configuration" title="Permalink to this heading">¶</a></h2>
 | 
						||
<ol class="arabic">
 | 
						||
<li><p>Define the external locator by global configuration e.g. in <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>plugins = ${plugins}, locext
 | 
						||
 | 
						||
ExternalLocator.profiles = locator1:"python /path/to/locator/script1.py",\
 | 
						||
                           locator2:"/path/to/other/locator/script1.sh"
 | 
						||
</pre></div>
 | 
						||
</div>
 | 
						||
<p>with</p>
 | 
						||
<ul class="simple">
 | 
						||
<li><p><em>locator1</em>/<em>locator2</em>: The names of the profiles as shown in <a class="reference internal" href="scolv.html#scolv"><span class="std std-ref">scolv</span></a>
 | 
						||
or use in ther modules like <a class="reference internal" href="screloc.html#screloc"><span class="std std-ref">screloc</span></a> for calling the external locator,</p></li>
 | 
						||
<li><p><em>script1.py</em>/<em>script2.sh</em>: The names of Python/Bash scripts with full path
 | 
						||
called by the profile to execute the locator given within the scripts.</p></li>
 | 
						||
</ul>
 | 
						||
</li>
 | 
						||
<li><p>Once defined, the external locator can be further configured and called
 | 
						||
within <a class="reference internal" href="scolv.html#scolv"><span class="std std-ref">scolv</span></a> or by other modules e.g. <a class="reference internal" href="screloc.html#screloc"><span class="std std-ref">screloc</span></a>.</p></li>
 | 
						||
</ol>
 | 
						||
</section>
 | 
						||
<section id="module-configuration">
 | 
						||
<span id="global-locext-configuration"></span><h2>Module Configuration<a class="headerlink" href="#module-configuration" title="Permalink to this heading">¶</a></h2>
 | 
						||
<div class="admonition note">
 | 
						||
<p class="admonition-title">Note</p>
 | 
						||
<p><strong>ExternalLocator.*</strong>
 | 
						||
<em>Locator parameters: External. This locator requires the plugin</em>
 | 
						||
<em>“locext” to be loaded.</em></p>
 | 
						||
</div>
 | 
						||
<dl class="std confval">
 | 
						||
<dt class="sig sig-object std" id="confval-ExternalLocator.profiles">
 | 
						||
<span class="sig-name descname"><span class="pre">ExternalLocator.profiles</span></span><a class="headerlink" href="#confval-ExternalLocator.profiles" title="Permalink to this definition">¶</a></dt>
 | 
						||
<dd><p>Type: <em>list:string</em></p>
 | 
						||
<p>A list of profiles defined as tuples of name
 | 
						||
and path to a script separated by colon.</p>
 | 
						||
</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="#">LocExt</a><ul>
 | 
						||
<li><a class="reference internal" href="#description">Description</a></li>
 | 
						||
<li><a class="reference internal" href="#plugin">Plugin</a></li>
 | 
						||
<li><a class="reference internal" href="#commandline-parameters">Commandline Parameters</a></li>
 | 
						||
<li><a class="reference internal" href="#input">Input</a></li>
 | 
						||
<li><a class="reference internal" href="#output">Output</a></li>
 | 
						||
<li><a class="reference internal" href="#example-configuration">Example Configuration</a></li>
 | 
						||
<li><a class="reference internal" href="#module-configuration">Module Configuration</a></li>
 | 
						||
</ul>
 | 
						||
</li>
 | 
						||
</ul>
 | 
						||
 | 
						||
  </div>
 | 
						||
  <div>
 | 
						||
    <h4>Previous topic</h4>
 | 
						||
    <p class="topless"><a href="global_stdloc.html"
 | 
						||
                          title="previous chapter">StdLoc</a></p>
 | 
						||
  </div>
 | 
						||
  <div>
 | 
						||
    <h4>Next topic</h4>
 | 
						||
    <p class="topless"><a href="global_locrouter.html"
 | 
						||
                          title="next chapter">LocRouter</a></p>
 | 
						||
  </div>
 | 
						||
  <div role="note" aria-label="source link">
 | 
						||
    <h3>This Page</h3>
 | 
						||
    <ul class="this-page-menu">
 | 
						||
      <li><a href="../_sources/apps/global_locext.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.1</b> Release
 | 
						||
          </div>
 | 
						||
            <div class="copyright">
 | 
						||
              Copyright © 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> |