NAME

       sample1d - Resampling of 1-D data sets


SYNOPSIS

       sample1d  infile  [  -Fl|a|c  ]  [ -H[nrec] ] [ -Ixinc ] [ -M[flag] ] [
       -Nknotfile ] [ -Sxstart ] [ -Tx-col] [ -V ] [ -bi[s][n] ] [ -bo[s][n] ]
       [ -f[i|o]colinfo ]


DESCRIPTION

       sample1d  reads a multi-column ASCII [or binary] 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  or  decreasing)  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 [of binary, see -b] file with one
              column containing the independent variable (which must be  mono-
              tonically  in/de-creasing)  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.

       -F     Choose  from  l (Linear), a (Akima spline), and c (natural cubic
              spline) [Default is -Fa].  You may  change  the  default  inter-
              polant; see INTERPOLANT in your .gmtdefaults4 file.

       -H     Input file(s) has Header record(s). Number of header records can
              be changed by editing your  .gmtdefaults4  file.  If  used,  GMT
              default  is  1  header record. Use -Hi if only input data should
              have header records [Default will write out  header  records  if
              the input data have them].

       -I     xinc  defines  the sampling interval. [Default is the separation
              between the first and second abscissa point in the infile]

       -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)].

       -V     Selects verbose mode, which will send progress reports to stderr
              [Default runs "silently"].

       -bi    Selects binary input. Append s for single precision [Default  is
              double].   Append  n  for  the  number  of columns in the binary
              file(s).
              [Default is 2 (or at least the  number  of  columns  implied  by
              -T)].

       -bo    Selects binary output. Append s for single precision [Default is
              double].  Append n for the  number  of  columns  in  the  binary
              file(s).

       -f     Special  formatting  of  input  and output columns (time or geo-
              graphical data) Specify i(nput) or  o(utput)  [Default  is  both
              input  and output].  Give one or more columns (or column ranges)
              separated by commas.  Append T (Absolute calendar time), t (time
              relative  to  chosen TIME_EPOCH), x (longitude), y (latitude), g
              (geographic coordinate), or f (floating point) to each column or
              column range item.


EXAMPLES

       To   resample   the  file  profiles.tdgmb,  which  contains  (time,dis-
       tance,gravity,magnetics,bathymetry) records, at 1km equidistant  inter-
       vals using Akima’s spline, use

       sample1d profiles.tdgmb -I1 -Fa -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, use

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


SEE ALSO

       gmt(l), filter1d(l)



GMT4.0                            1 Oct 2004                       SAMPLE1D(l)

Man(1) output converted with man2html