SAMPLE1D

Section: Misc. Reference Manual Pages (l)
Updated: DATE
Index Return to Main Contents
 

NAME

sample1d - Resampling of 1-D data sets  

SYNOPSIS

sample1d infile [ -A ] [ -C ] [ -H ] [ -Ixinc ] [ -L ] [ -M[flag] ] [ -Nknotfile ] [ -Sxstart ] [ -Tx-col]  

DESCRIPTION

sample1d reads a multi-column ASCII data set from file [or standard input] and resamples the timeseries/profile at locations where the user needs the values. The user must provide the column number of the independent (monotonically increasing) variable. Equidistant or arbitrary sampling can be selected. All columns are resampled based on the new sampling interval. Several interpolation schemes are available.
infile
This is a multi-column ASCII file with one column containing the independent variable (which must be monotonically increasing) and the remaining columns holding misc. data values. If no file is provided, sample1d reads from standard input.
 

OPTIONS

No space between the option flag and the associated arguments.
-A
Use Akima's spline for the interpolation (Quasi Hermite spline that does not introduce artificial oscillations near outliers/sharp gradients in the data file) [Default].
-C
Use a natural Cubic spline interpolant. #include "explain_-H.txt"
-I
xinc defines the sampling interval. [Default is the separation between the first and second abcissa point in the infile]
-L
Use a Linear interpolant.
-M
Multiple segment file. Segments are separated by a record whose first character is flag. [Default is '>'].
-N
knotfile is an optional ASCII file with the x locations where the data set will be resampled in the first column
-S
For equidistant sampling, xstart indicates the location of the first output value. [Default is the smallest even multiple of xinc inside the range of infile]
-T
Sets the column number of the independent variable [Default is 0 (first)].
 

EXAMPLES

To resample the file profiles.tdgmb, which contains (time,distance,gravity,magnetics,bathymetry) records, at 1km equidistant intervals using Akima's spline, try

sample1d profiles.tdgmb -I1 -A -T1 > profiles_equi_d.tdgmb

To resample the file depths.dt at positions listed in the file grav_pos.dg, using a cubic spline for the interpolation, try

sample1d depths.dt -Ngrav_pos.dg -C > new_depths.dt  

SEE ALSO

gmt, filter1d #include "refs.i"


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 07:11:06 GMT, January 07, 2025