Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > fa8759c1f2240ce030f5ac6d5041a2a1 > files > 463

GMT-doc-4.5.9-1.fc18.noarch.rpm

<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Wed Jan  2 08:40:08 2013 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title>SAMPLE1D</title>

</head>
<body bgcolor="#ffffff">

<h1 align=center>SAMPLE1D</h1>

<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#ASCII FORMAT PRECISION">ASCII FORMAT PRECISION</a><br>
<a href="#CALENDAR TIME SAMPLING">CALENDAR TIME SAMPLING</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>

<hr>


<a name="NAME"></a>
<h2>NAME</h2>


<p style="margin-left:11%; margin-top: 1em">sample1d
&minus; Resampling of 1-D data sets</p>

<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>



<p style="margin-left:11%; margin-top: 1em"><b>sample1d</b>
<i>infile</i> [ <b>&minus;Fl</b>|<b>a</b>|<b>c</b>|<b>n</b>
] [ <b>&minus;H</b>[<b>i</b>][<i>nrec</i>] ] [
<b>&minus;I</b><i>xinc</i> ] [
<b>&minus;N</b><i>knotfile</i> ] [
<b>&minus;S</b><i>xstart</i> ] [ <b>&minus;T</b><i>x_col</i>
] [ <b>&minus;V</b> ] [
<b>&minus;b</b>[<b>i</b>|<b>o</b>][<b>s</b>|<b>S</b>|<b>d</b>|<b>D</b>[<i>ncol</i>]|<b>c</b>[<i>var1</i><b>/</b><i>...</i>]]
] [ <b>&minus;f</b>[<b>i</b>|<b>o</b>]<i>colinfo</i> ] [
<b>&minus;m</b>[<b>i</b>|<b>o</b>][<i>flag</i>] ]</p>

<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>



<p style="margin-left:11%; margin-top: 1em"><b>sample1d</b>
reads a multi-column ASCII [or binary] data set from file
[or standard input] and interpolates the timeseries/profile
at locations where the user needs the values. The user must
provide the column number of the independent (monotonically
increasing <b>or</b> decreasing) variable. Equidistant or
arbitrary sampling can be selected. All columns are
resampled based on the new sampling interval. Several
interpolation schemes are available. Extrapolation outside
the range of the input data is not supported.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p style="margin-top: 1em" valign="top"><i>infile</i></p></td>
<td width="2%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">This is a
multi-column ASCII [of binary, see <b>&minus;b</b>] file
with one column containing the independent variable (which
must be monotonically in/de-creasing) and the remaining
columns holding misc. data values. If no file is provided,
<b>sample1d</b> reads from standard input.</p></td>
</table>

<a name="OPTIONS"></a>
<h2>OPTIONS</h2>


<p style="margin-left:11%; margin-top: 1em">No space
between the option flag and the associated arguments.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;F</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Choose from
<b>l</b> (Linear), <b>a</b> (Akima spline), <b>c</b>
(natural cubic spline), and <b>n</b> (no interpolation:
nearest point) [Default is <b>&minus;Fa</b>]. You may change
the default interpolant; see <b><A HREF="gmtdefaults.html#INTERPOLANT">INTERPOLANT</A></b> in your
.gmtdefaults4 file.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;H</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Input file(s) has
header record(s). If used, the default number of header
records is <b><A HREF="gmtdefaults.html#N_HEADER_RECS">N_HEADER_RECS</A></b>. Use <b>&minus;Hi</b> if
only input data should have header records [Default will
write out header records if the input data have them]. Blank
lines and lines starting with # are always skipped.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;I</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top"><i>xinc</i> defines
the sampling interval. [Default is the separation between
the first and second abscissa point in the
<i>infile</i>]</p> </td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;N</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top"><i>knotfile</i> is
an optional ASCII file with the x locations where the data
set will be resampled in the first column. Note: if
<b>&minus;H</b> is selected it applies to both <i>infile</i>
and <i>knotfile</i>.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;S</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">For equidistant
sampling, <i>xstart</i> indicates the location of the first
output value. [Default is the smallest even multiple of
<i>xinc</i> inside the range of <i>infile</i>]</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;T</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Sets the column
number of the independent variable [Default is 0
(first)].</p> </td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;V</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Selects verbose
mode, which will send progress reports to stderr [Default
runs &quot;silently&quot;].</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;bi</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Selects binary
input. Append <b>s</b> for single precision [Default is
<b>d</b> (double)]. Uppercase <b>S</b> or <b>D</b> will
force byte-swapping. Optionally, append <i>ncol</i>, the
number of columns in your binary input file if it exceeds
the columns needed by the program. Or append <b>c</b> if the
input file is netCDF. Optionally, append
<i>var1</i><b>/</b><i>var2</i><b>/</b><i>...</i> to specify
the variables to be read. [Default is 2 (or at least the
number of columns implied by <b>&minus;T</b>)].</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;bo</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Selects binary
output. Append <b>s</b> for single precision [Default is
<b>d</b> (double)]. Uppercase <b>S</b> or <b>D</b> will
force byte-swapping. Optionally, append <i>ncol</i>, the
number of desired columns in your binary output file.
[Default is same as input].</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;f</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Special formatting
of input and/or output columns (time or geographical data).
Specify <b>i</b> or <b>o</b> to make this apply only to
input or output [Default applies to both]. Give one or more
columns (or column ranges) separated by commas. Append
<b>T</b> (absolute calendar time), <b>t</b> (relative time
in chosen <b><A HREF="gmtdefaults.html#TIME_UNIT">TIME_UNIT</A></b> since <b><A HREF="gmtdefaults.html#TIME_EPOCH">TIME_EPOCH</A></b>),
<b>x</b> (longitude), <b>y</b> (latitude), or <b>f</b>
(floating point) to each column or column range item.
Shorthand <b>&minus;f</b>[<b>i</b>|<b>o</b>]<b>g</b> means
<b>&minus;f</b>[<b>i</b>|<b>o</b>]0<b>x</b>,1<b>y</b>
(geographic coordinates).</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;m</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Multiple segment
file(s). Segments are separated by a special record. For
ASCII files the first character must be <i>flag</i> [Default
is &rsquo;&gt;&rsquo;]. For binary files all fields must be
NaN and <b>&minus;b</b> must set the number of output
columns explicitly. By default the <b>&minus;m</b> setting
applies to both input and output. Use <b>&minus;mi</b> and
<b>&minus;mo</b> to give separate settings to input and
output.</p> </td>
</table>

<a name="ASCII FORMAT PRECISION"></a>
<h2>ASCII FORMAT PRECISION</h2>


<p style="margin-left:11%; margin-top: 1em">The ASCII
output formats of numerical data are controlled by
parameters in your .gmtdefaults4 file. Longitude and
latitude are formatted according to
<b><A HREF="gmtdefaults.html#OUTPUT_DEGREE_FORMAT">OUTPUT_DEGREE_FORMAT</A></b>, whereas other values are
formatted according to <b><A HREF="gmtdefaults.html#D_FORMAT">D_FORMAT</A></b>. Be aware that the
format in effect can lead to loss of precision in the
output, which can lead to various problems downstream. If
you find the output is not written with enough precision,
consider switching to binary output (<b>&minus;bo</b> if
available) or specify more decimals using the
<b><A HREF="gmtdefaults.html#D_FORMAT">D_FORMAT</A></b> setting.</p>

<a name="CALENDAR TIME SAMPLING"></a>
<h2>CALENDAR TIME SAMPLING</h2>


<p style="margin-left:11%; margin-top: 1em">If the abscissa
are calendar times then you must use the <b>&minus;f</b>
option to indicate this. Furthermore, <b>&minus;I</b> then
expects an increment in the current <b><A HREF="gmtdefaults.html#TIME_UNIT">TIME_UNIT</A></b> units.
There is not yet support for variable intervals such as
months.</p>

<a name="EXAMPLES"></a>
<h2>EXAMPLES</h2>


<p style="margin-left:11%; margin-top: 1em">To resample the
file profiles.tdgmb, which contains
(time,distance,gravity,magnetics,bathymetry) records, at 1km
equidistant intervals using Akima&rsquo;s spline, use</p>


<p style="margin-left:11%; margin-top: 1em"><b>sample1d</b>
profiles.tdgmb <b>&minus;I</b>1 <b>&minus;Fa &minus;T</b>1
&gt; profiles_equi_d.tdgmb</p>

<p style="margin-left:11%; margin-top: 1em">To resample the
file depths.dt at positions listed in the file grav_pos.dg,
using a cubic spline for the interpolation, use</p>


<p style="margin-left:11%; margin-top: 1em"><b>sample1d</b>
depths.dt <b>&minus;N</b>grav_pos.dg <b>&minus;Fc</b> &gt;
new_depths.dt</p>

<a name="SEE ALSO"></a>
<h2>SEE ALSO</h2>


<p style="margin-left:11%; margin-top: 1em"><i><A HREF="GMT.html">GMT</A></i>(1),
<i><A HREF="filter1d.html">filter1d</A></i>(1)</p>
<hr>
</body>
</html>