1FILTER1D(1)                           GMT                          FILTER1D(1)
2
3
4

NAME

6       filter1d - Do time domain filtering of 1-D data tables
7

SYNOPSIS

9       filter1d [ table ]  -Ftype<width>[modifiers] [  -Dincrement ] [  -E ] [
10       -Llack_width ] [  -Nt_col ] [  -Qq_factor ] [   -Ssymmetry_factor  ]  [
11       -Tt_min/t_max/t_inc[+n]  ]  [   -V[level] ] [ -bbinary ] [ -dnodata ] [
12       -eregexp ] [ -fflags ] [ -ggaps ] [ -hheaders ] [ -iflags ] [ -oflags ]
13       [ -:[i|o] ]
14
15       Note:  No  space  is allowed between the option flag and the associated
16       arguments.
17

DESCRIPTION

19       filter1d is a general time  domain  filter  for  multiple  column  time
20       series  data.  The  user  specifies which column is the time (i.e., the
21       independent variable). (See -N option  below).  The  fastest  operation
22       occurs  when  the input time series are equally spaced and have no gaps
23       or outliers and the  special  options  are  not  needed.  filter1d  has
24       options -L, -Q, and -S for unevenly sampled data with gaps.
25

REQUIRED ARGUMENTS

27       -Ftypewidth[modifiers]
28              Sets  the filter type. Choose among convolution and non-convolu‐
29              tion filters. Append the filter code followed by the full filter
30              width  in  same  units  as  time  column.  By default we perform
31              low-pass filtering; append +h  to  select  high-pass  filtering.
32              Some  filters allow for optional arguments and modifiers. Avail‐
33              able convolution filter types are:
34
35              (b) Boxcar: All weights are equal.
36
37              (c) Cosine Arch: Weights follow a cosine arch curve.
38
39              (g) Gaussian: Weights are given by the Gaussian function.
40
41              (f) Custom: Instead of width give name of a one-column file with
42              your own weight coefficients.
43
44              Non-convolution filter types are:
45
46              (m) Median: Returns median value.
47
48              (p)  Maximum  likelihood  probability (a mode estimator): Return
49              modal value. If more than one mode  is  found  we  return  their
50              average  value. Append +l or +u if you rather want to return the
51              lowermost or uppermost of the modal values.
52
53              (l) Lower: Return the minimum of all values.
54
55              (L) Lower: Return minimum of all positive values only.
56
57              (u) Upper: Return maximum of all values.
58
59              (U) Upper: Return maximum or all negative values only.
60
61              Upper case type B, C, G, M, P, F will  use  robust  filter  ver‐
62              sions:  i.e.,  replace  outliers  (2.5 L1 scale off median) with
63              median during filtering.
64
65              In the case of L|U it is possible that no data passes  the  ini‐
66              tial sign test; in that case the filter will return 0.0.
67

OPTIONAL ARGUMENTS

69       table  One  or  more ASCII (or binary, see -bi[ncols][type]) data table
70              file(s) holding a number of data columns. If no tables are given
71              then we read from standard input.
72
73       -Dincrement
74              increment is used when series is NOT equidistantly sampled. Then
75              increment will be the abscissae resolution, i.e., all  abscissae
76              will  be  rounded off to a multiple of increment. Alternatively,
77              resample data with sample1d.
78
79       -E     Include Ends of time series in output. Default  loses  half  the
80              filter-width of data at each end.
81
82       -Llack_width
83              Checks  for  Lack  of  data  condition.  If input data has a gap
84              exceeding width then no output  will  be  given  at  that  point
85              [Default does not check Lack].
86
87       -Nt_col
88              Indicates which column contains the independent variable (time).
89              The left-most column is # 0, the right-most is # (n_cols  -  1).
90              [Default is 0].
91
92       -Qq_factor
93              Assess Quality of output value by checking mean weight in convo‐
94              lution. Enter q_factor between 0 and 1. If mean weight <  q_fac‐
95              tor,  output is suppressed at this point [Default does not check
96              Quality].
97
98       -Ssymmetry_factor
99              Checks symmetry of data about  window  center.  Enter  a  factor
100              between  0  and  1.  If  (  (abs(n_left  - n_right)) / (n_left +
101              n_right) ) > factor, then no output will be given at this  point
102              [Default does not check Symmetry].
103
104       -Tt_min/t_max/t_inc[+]
105              Make  evenly  spaced  time-steps  from  t_min  to t_max by t_inc
106              [Default uses input times]. Append +n to t_inc if you are speci‐
107              fying the number of equidistant points instead.
108
109       -V[level] (more ...)
110              Select verbosity level [c].
111
112       -bi[ncols][t] (more ...)
113              Select native binary input.
114
115       -bo[ncols][type] (more ...)
116              Select native binary output. [Default is same as input].
117
118       -d[i|o]nodata (more ...)
119              Replace  input  columns  that  equal  nodata with NaN and do the
120              reverse on output.
121
122       -e[~]"pattern" | -e[~]/regexp/[i] (more ...)
123              Only accept data records that match the given pattern.
124
125       -f[i|o]colinfo (more ...)
126              Specify data types of input and/or output columns.
127
128       -g[a]x|y|d|X|Y|D|[col]z[+|-]gap[u] (more ...)
129              Determine data gaps and line breaks.
130
131       -h[i|o][n][+c][+d][+rremark][+rtitle] (more ...)
132              Skip or produce header record(s).
133
134       -icols[+l][+sscale][+ooffset][,...] (more ...)
135              Select input columns and transformations (0 is first column).
136
137       -ocols[,...] (more ...)
138              Select output columns (0 is first column).
139
140       -:[i|o] (more ...)
141              Swap 1st and 2nd column on input and/or output.
142
143       -^ or just -
144              Print a short message about the  syntax  of  the  command,  then
145              exits (NOTE: on Windows just use -).
146
147       -+ or just +
148              Print  an extensive usage (help) message, including the explana‐
149              tion of any module-specific  option  (but  not  the  GMT  common
150              options), then exits.
151
152       -? or no arguments
153              Print a complete usage (help) message, including the explanation
154              of all options, then exits.
155

ASCII FORMAT PRECISION

157       The ASCII output formats of numerical data are controlled by parameters
158       in  your  gmt.conf file. Longitude and latitude are formatted according
159       to  FORMAT_GEO_OUT,  absolute  time  is  under  the  control  of   FOR‐
160       MAT_DATE_OUT  and FORMAT_CLOCK_OUT, whereas general floating point val‐
161       ues are formatted according to FORMAT_FLOAT_OUT. Be aware that the for‐
162       mat  in effect can lead to loss of precision in ASCII output, which can
163       lead to various problems downstream. If you  find  the  output  is  not
164       written with enough precision, consider switching to binary output (-bo
165       if available) or specify more decimals using the FORMAT_FLOAT_OUT  set‐
166       ting.
167

EXAMPLES

169       To filter the data set in the file cruise.gmtd containing evenly spaced
170       gravity, magnetics, topography, and distance (in m) with a 10 km Gauss‐
171       ian  filter,  removing outliers, and output a filtered value every 2 km
172       between 0 and 100 km:
173
174              gmt filter1d cruise.gmtd -T0/1.0e5/2000 -FG10000 -N3 -V > filtered_cruise.gmtd
175
176       Data along track often have uneven sampling and gaps which  we  do  not
177       want to interpolate using sample1d. To find the median depth in a 50 km
178       window every 25 km along the track of cruise v3312, stored in v3312.dt,
179       checking for gaps of 10km and asymmetry of 0.3:
180
181              gmt filter1d v3312.dt -FM50 -T0/100000/25 -L10 -S0.3 > v3312_filt.dt
182

SEE ALSO

184       gmt , sample1d , splitxyz
185
187       2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
188
189
190
191
1925.4.5                            Feb 24, 2019                      FILTER1D(1)
Impressum