FILTER1D(1gmt) | GMT | FILTER1D(1gmt) |
filter1d - Do time domain filtering of 1-D data tables
filter1d [ table ] -Ftype<width>[modifiers] [ -Dincrement ] [ -E ] [ -Llack_width ] [ -Nt_col ] [ -Qq_factor ] [ -Ssymmetry_factor ] [ -Tt_min/t_max/t_inc[+n] ] [ -V[level] ] [ -bbinary ] [ -dnodata ] [ -eregexp ] [ -fflags ] [ -ggaps ] [ -hheaders ] [ -iflags ] [ -oflags ] [ -:[i|o] ]
Note: No space is allowed between the option flag and the associated arguments.
filter1d is a general time domain filter for multiple column time series data. The user specifies which column is the time (i.e., the independent variable). (See -N option below). The fastest operation occurs when the input time series are equally spaced and have no gaps or outliers and the special options are not needed. filter1d has options -L, -Q, and -S for unevenly sampled data with gaps.
(b) Boxcar: All weights are equal.
(c) Cosine Arch: Weights follow a cosine arch curve.
(g) Gaussian: Weights are given by the Gaussian function.
(f) Custom: Instead of width give name of a one-column file with your own weight coefficients.
Non-convolution filter types are:
(m) Median: Returns median value.
(p) Maximum likelihood probability (a mode estimator): Return modal value. If more than one mode is found we return their average value. Append +l or +u if you rather want to return the lowermost or uppermost of the modal values.
(l) Lower: Return the minimum of all values.
(L) Lower: Return minimum of all positive values only.
(u) Upper: Return maximum of all values.
(U) Upper: Return maximum or all negative values only.
Upper case type B, C, G, M, P, F will use robust filter versions: i.e., replace outliers (2.5 L1 scale off median) with median during filtering.
In the case of L|U it is possible that no data passes the initial sign test; in that case the filter will return 0.0.
The ASCII output formats of numerical data are controlled by parameters in your gmt.conf file. Longitude and latitude are formatted according to FORMAT_GEO_OUT, absolute time is under the control of FORMAT_DATE_OUT and FORMAT_CLOCK_OUT, whereas general floating point values are formatted according to FORMAT_FLOAT_OUT. Be aware that the format in effect can lead to loss of precision in ASCII output, which can lead to various problems downstream. If you find the output is not written with enough precision, consider switching to binary output (-bo if available) or specify more decimals using the FORMAT_FLOAT_OUT setting.
To filter the data set in the file cruise.gmtd containing evenly spaced gravity, magnetics, topography, and distance (in m) with a 10 km Gaussian filter, removing outliers, and output a filtered value every 2 km between 0 and 100 km:
gmt filter1d cruise.gmtd -T0/1.0e5/2000 -FG10000 -N3 -V > filtered_cruise.gmtd
Data along track often have uneven sampling and gaps which we do not want to interpolate using sample1d. To find the median depth in a 50 km window every 25 km along the track of cruise v3312, stored in v3312.dt, checking for gaps of 10km and asymmetry of 0.3:
gmt filter1d v3312.dt -FM50 -T0/100000/25 -L10 -S0.3 > v3312_filt.dt
gmt , sample1d , splitxyz
2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
May 21, 2019 | 5.4.5 |