263 lines
15 KiB
HTML
263 lines
15 KiB
HTML
<!doctype html>
|
|
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<title>data2caps — CAPS: Common Acquisition Protocol Server documentation</title>
|
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/gempa.css" type="text/css" />
|
|
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
|
|
<link rel="stylesheet" type="text/css" href="../_static/gempa.css?v=c960eebf" />
|
|
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
|
|
<script type="text/javascript" src="../_static/gempa.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=b3ba4146"></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="gdi2caps" href="gdi2caps.html" />
|
|
<link rel="prev" title="crex2caps" href="crex2caps.html" />
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<div class="container">
|
|
<img class="background" src="../_static/icon.png"/>
|
|
<div class="content">
|
|
<span class="title">CAPS: Common Acquisition Protocol Server </span>
|
|
<span class="version">2025.254#f0c77b29e</span></h1>
|
|
</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="gdi2caps.html" title="gdi2caps"
|
|
accesskey="N">
|
|
next
|
|
</a>
|
|
</li>
|
|
<li class="right">
|
|
<a href="crex2caps.html" title="crex2caps"
|
|
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="../base/plugins.html" accesskey="U">Data Acquisition and Manipulation by Plugins</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="container">
|
|
<div class="fitted content" id="anchors-container">
|
|
<div class="body" role="main">
|
|
|
|
<section id="data2caps">
|
|
<span id="id1"></span><h1>data2caps<a class="headerlink" href="#data2caps" title="Permalink to this heading">¶</a></h1>
|
|
<p><strong>Send data in easy-to-change formats to CAPS.</strong></p>
|
|
<section id="description">
|
|
<h2>Description<a class="headerlink" href="#description" title="Permalink to this heading">¶</a></h2>
|
|
<p><em>data2caps</em> reads data from file and send them in <a class="reference internal" href="../base/archive.html#sec-pt-raw"><span class="std std-ref">RAW format</span></a>
|
|
to a CAPS server. The list of supported file formats can be easily extended
|
|
allowing to import almost any custom data file containing time series. The data
|
|
samples are converted to integer values. A multiplier can be applied to reach
|
|
the desired precision. The multiplier can be passed by the command-line option
|
|
<a class="reference internal" href="#cmdoption-m"><code class="xref std std-option docutils literal notranslate"><span class="pre">--multiplier</span></code></a>. During data processing the multiplier must be considered.
|
|
The best way to do so is to correct the gain in the <a class="reference internal" href="../base/glossary.html#term-inventory"><span class="xref std std-term">inventory</span></a> by the
|
|
multiplier.</p>
|
|
<p>Supported file formats which can be given along with <a class="reference internal" href="#cmdoption-f"><code class="xref std std-option docutils literal notranslate"><span class="pre">--format</span></code></a>:</p>
|
|
<ul>
|
|
<li><p>slist</p>
|
|
<div class="highlight-properties notranslate"><div class="highlight"><pre><span></span><span class="na">TIMESERIES</span><span class="w"> </span><span class="s">AM_ABCDE_00_SHZ_R, 8226 samples, 50 sps, 2020-01-01T10:20:03.862000, SLIST, FLOAT, M/S</span>
|
|
<span class="na">0.000134157</span>
|
|
<span class="na">0.000286938</span>
|
|
<span class="na">...</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>data2caps assumes files with exactly one block of data starting, e.g., with
|
|
<em>TIMESERIES</em>. Files containing multiple blocks must be split into multiple
|
|
one-block files before processing these files individually with data2caps. For
|
|
splitting you may use external programs, e.g., csplit.</p>
|
|
<p>Example for processing one file, <em>vz.data.raw</em>, containing multiple blocks:</p>
|
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>csplit<span class="w"> </span>-z<span class="w"> </span>vz.data.raw<span class="w"> </span>/TIMESERIES/<span class="w"> </span><span class="s1">'{*}'</span>
|
|
<span class="k">for</span><span class="w"> </span>i<span class="w"> </span><span class="k">in</span><span class="w"> </span>xx*<span class="p">;</span><span class="w"> </span><span class="k">do</span><span class="w"> </span>data2caps<span class="w"> </span>-i<span class="w"> </span><span class="nv">$i</span><span class="w"> </span>-f<span class="w"> </span>flist<span class="p">;</span><span class="w"> </span><span class="k">done</span>
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p>unavco</p>
|
|
<p>The format supports tilt and pressure data on the data website of <span id="id2"><em>Unavco - Strain & Seismic</em> [<a class="reference internal" href="../base/references.html#id318" title="Unavco - Strain & Seismic. EarthScope Consortium. URL: https://www.unavco.org/data/strain-seismic/strain-seismic.html.">8</a>]</span>
|
|
in the versions</p>
|
|
<ul class="simple">
|
|
<li><p>version 1.0: Requires to set the network code using <a class="reference internal" href="#cmdoption-n"><code class="xref std std-option docutils literal notranslate"><span class="pre">--network</span></code></a> since the
|
|
it is not provided within the data files.</p></li>
|
|
<li><p>version 1.1</p></li>
|
|
</ul>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<ul class="simple">
|
|
<li><p>The versions 1.0 and 1.1 are automatically recognized.</p></li>
|
|
<li><p>If no multiplier is speficied by <a class="reference internal" href="#cmdoption-m"><code class="xref std std-option docutils literal notranslate"><span class="pre">--multiplier</span></code></a>, unit conversion is
|
|
applied to the data for maintaining high resolution in <a class="reference internal" href="../base/glossary.html#term-miniSeed"><span class="xref std std-term">miniSEED</span></a> format:</p>
|
|
<ul>
|
|
<li><p>hPa : Pa</p></li>
|
|
<li><p>microradians : nRad</p></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<p>If no input file is given, <strong class="program">data2caps</strong> creates a generic data series and sends
|
|
it to the CAPS server.</p>
|
|
<div class="admonition warning">
|
|
<p class="admonition-title">Warning</p>
|
|
<p>The CAPS server to which data2caps should send data to must be up and running.</p>
|
|
</div>
|
|
</section>
|
|
<section id="examples">
|
|
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this heading">¶</a></h2>
|
|
<ul>
|
|
<li><p>Send data from a file in slist format to a CAPS server on <em>localhost:18003</em>:</p>
|
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>data2caps<span class="w"> </span>-H<span class="w"> </span>localhost:18003<span class="w"> </span>-i<span class="w"> </span>AM.ABCDE.00.SHZ-acc.slist<span class="w"> </span>-f<span class="w"> </span>slist
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p>Send tilt data from a file in unavco 1.1 format to a CAPS server on <em>localhost:18003</em>.
|
|
The data is automatically converted from myRad (microradiant) to nRad (nanoradiant):</p>
|
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>data2caps<span class="w"> </span>-H<span class="w"> </span>localhost:18003<span class="w"> </span>-i<span class="w"> </span>B2012327816TiltYuRad.txt<span class="w"> </span>-f<span class="w"> </span>unavco
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section id="command-line-options">
|
|
<h2>Command-Line Options<a class="headerlink" href="#command-line-options" title="Permalink to this heading">¶</a></h2>
|
|
<p><strong class="program">data2caps [options]</strong></p>
|
|
<section id="options">
|
|
<span id="id3"></span><h3>Options<a class="headerlink" href="#options" title="Permalink to this heading">¶</a></h3>
|
|
<dl class="std option">
|
|
<dt class="sig sig-object std" id="cmdoption-H">
|
|
<span id="cmdoption-host"></span><span class="sig-name descname"><span class="pre">-H</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--host</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-H" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Default: <code class="docutils literal notranslate"><span class="pre">localhost</span></code></p>
|
|
<p>Data output host. Format: host:port. Port 18003 is assumed
|
|
if not given explicitly. Default: localhost:18003.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="std option">
|
|
<dt class="sig sig-object std" id="cmdoption-h">
|
|
<span id="cmdoption-help"></span><span class="sig-name descname"><span class="pre">-h</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--help</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-h" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Print help.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="std option">
|
|
<dt class="sig sig-object std" id="cmdoption-i">
|
|
<span id="cmdoption-input"></span><span class="sig-name descname"><span class="pre">-i</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--input</span></span><span class="sig-prename descclassname"> <span class="pre">file</span></span><a class="headerlink" href="#cmdoption-i" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Name of input data file.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="std option">
|
|
<dt class="sig sig-object std" id="cmdoption-f">
|
|
<span id="cmdoption-format"></span><span class="sig-name descname"><span class="pre">-f</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--format</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-f" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Values: <code class="docutils literal notranslate"><span class="pre">slist,unavco</span></code></p>
|
|
<p>Format of input data file. Supported: slist, unavco.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="std option">
|
|
<dt class="sig sig-object std" id="cmdoption-m">
|
|
<span id="cmdoption-multiplier"></span><span class="sig-name descname"><span class="pre">-m</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--multiplier</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-m" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Multiplier applied to data samples for generating integers.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="std option">
|
|
<dt class="sig sig-object std" id="cmdoption-n">
|
|
<span id="cmdoption-network"></span><span class="sig-name descname"><span class="pre">-n</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--network</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-n" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Network code to be used for the data. Required for format unavco in
|
|
version 1.0 since this format does not provide a network 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="#">data2caps</a><ul>
|
|
<li><a class="reference internal" href="#description">Description</a></li>
|
|
<li><a class="reference internal" href="#examples">Examples</a></li>
|
|
<li><a class="reference internal" href="#command-line-options">Command-Line Options</a><ul>
|
|
<li><a class="reference internal" href="#options">Options</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
<div>
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="crex2caps.html"
|
|
title="previous chapter">crex2caps</a></p>
|
|
</div>
|
|
<div>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="gdi2caps.html"
|
|
title="next chapter">gdi2caps</a></p>
|
|
</div>
|
|
<div role="note" aria-label="source link">
|
|
<h3>This Page</h3>
|
|
<ul class="this-page-menu">
|
|
<li><a href="../_sources/apps/data2caps.rst.txt"
|
|
rel="nofollow">Show Source</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<div class="container">
|
|
<div class="content">
|
|
Release <b></b> version <b>2025.254#f0c77b29e</b>
|
|
<div class="copyright">
|
|
© Copyright <a href="https://www.gempa.de">2013, gempa GmbH.</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |