# filter1d(1gmt) [minix man page]

FILTER1D(l)FILTER1D(l)NAME

filter1d - Time domain filtering of 1-D time seriesSYNOPSIS

filter1d [ infile ] -F<type><width> [] [-Dincrement] [ -H[nrec] ] [-E] [-Iignore_val] [ -Nn_cols/t_col ] [-Llack_width] [-Qq_factor] [ -Tstart/stop/int ] [-Ssymmetry_factor] [ -bi[s][n] ] [ -bo[s][n] ]-VDESCRIPTION

filter1d is a general time domain filter for multiple column time series data. The user specifies the number of columns of input and which column is the time. (Seeoption 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. infile Multi-column ASCII (or binary, see -b) file holding data values to be filtered.-Nsets Filtertype, type is one of b(oxcar), c(osine arch), g(aussian), m(edian), or p(maximum likelihood Probability estimator-Fa mode estimator), and specify full filter width in same units as time column, OR, use--to give the name of a one-column file of your own coefficients. 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.-FfnameOPTIONS

increment is used when series is NOT equidistantly sampled. Then increment will be the abscissae resolution, i.e., all abscissae will be rounded off to a multiple of increment. Alternatively, resample data with sample1d.-DInclude Ends of time series in output. Default loses half the filter-width of data at each end.-EInput file(s) has Header record(s). Number of header records can be changed by editing your .gmtdefaults file. If used, GMT default is 1 header record.-HTo ignore values; If an input value equals ignore_val it will be set to NaN.-IChecks for Lack of data condition. If input data has a gap exceeding width then no output will be given at that point [Default does not check Lack].-LSets number of columns in input and which column contains the independent variable (time). The left-most column is # 0, the right- most is # (n_cols - 1). [Default is n_cols = 2, t_col = 0; i.e., file has t, f(t) pairs].-Nassess Quality of output value by checking mean weight in convolution. Enter q_factor between 0 and 1. If mean weight < q_factor, output is suppressed at this point [Default does not check Quality].-QChecks symmetry of data about window center. Enter a factor between 0 and 1. If ( (abs(n_left - n_right)) / (n_left + n_right) ) > factor, then no output will be given at this point [Default does not check Symmetry].-SMake evenly spaced timesteps from start to stop by int [Default uses input times].-TSelects verbose mode, which will send progress reports to stderr [Default runs "silently"].-VSelects binary input. Append s for single precision [Default is double]. Append n for the number of columns in the binary file(s).-biSelects binary output. Append s for single precision [Default is double].-boEXAMPLES

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, try filter1d cruise.gmtd -T0/1.0e5/2000-N4/3-FG10000> 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, try filter1d v3312.dt-V-T0/100000/25-FM50-S0.3 > v3312_filt.dt-L10SEE ALSO

gmt(1gmt), sample1d(1gmt) 1 Jan 2004 FILTER1D(l)