Files
2025/share/doc/seiscomp/html/base/time-grammar.html

561 lines
31 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>