Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

GMT_Appendix_J.tex 3.7 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
  1. %------------------------------------------
  2. % $Id$
  3. %
  4. % The GMT Documentation Project
  5. % Copyright (c) 2000-2012.
  6. % P. Wessel, W. H. F. Smith, R. Scharroo, and J. Luis
  7. %------------------------------------------
  8. %
  9. \chapter{Filtering of data in \gmt}
  10. \label{app:J}
  11. \thispagestyle{headings}
  12. The \GMT\ programs \GMTprog{filter1d} (for tables of data indexed
  13. to one independent variable) and \GMTprog{grdfilter} (for data
  14. given as 2-dimensional grids) allow filtering of data by a
  15. moving-window process. (To filter a grid by Fourier transform use
  16. \GMTprog{grdfft}.) Both programs use an argument
  17. \Opt{F}$<$\emph{type}$><$\emph{width}$>$ to specify the type of
  18. process and the window's width (in 1-d) or diameter (in 2-d).
  19. (In \GMTprog{filter1d} the width is a length of the time or
  20. space ordinate axis, while in \GMTprog{grdfilter} it is the
  21. diameter of a circular area whose distance unit is related to
  22. the grid mesh via the \Opt{D} option). If the process is a
  23. median, mode, or extreme value estimator then the window
  24. output cannot be written as a convolution and the filtering
  25. operation is not a linear operator. If the process is a weighted
  26. average, as in the boxcar, cosine, and gaussian filter types,
  27. then linear operator theory applies to the filtering process.
  28. These three filters can be described as convolutions with an
  29. impulse response function, and their transfer functions
  30. can be used to describe how they alter components in the input
  31. as a function of wavelength.
  32. Impulse responses are shown here for the boxcar, cosine, and
  33. gaussian filters. Only the relative amplitudes of the filter
  34. weights shown; the values in the center of the window have
  35. been fixed equal to 1 for ease of plotting. In this way the
  36. same graph can serve to illustrate both the 1-d and 2-d impulse
  37. responses; in the 2-d case this plot is a diametrical
  38. cross-section through the filter weights (Figure~\ref{fig:GMT_App_J_1}).
  39. \GMTfig[H]{GMT_App_J_1}{Impulse responses for \gmt\ filters.}
  40. Although the impulse responses look the same in 1-d and 2-d,
  41. this is not true of the transfer functions; in 1-d the transfer
  42. function is the Fourier transform of the impulse response,
  43. while in 2-d it is the Hankel transform of the impulse response.
  44. These are shown in Figures~\ref{fig:GMT_App_J_2} and
  45. \ref{fig:GMT_App_J_3}, respectively. Note that in 1-d the boxcar transfer
  46. function has its first zero crossing at $f = 1$, while in 2-d
  47. it is around $f \sim 1.2$. The 1-d cosine transfer function
  48. has its first zero crossing at $f = 2$; so a cosine filter needs
  49. to be twice as wide as a boxcar filter in order to zero the same
  50. lowest frequency. As a general rule, the cosine and gaussian
  51. filters are ``better'' in the sense that they do not have the
  52. ``side lobes'' (large-amplitude oscillations in the transfer
  53. function) that the boxcar filter has. However, they are
  54. correspondingly ``worse'' in the sense that they require more
  55. work (doubling the width to achieve the same cut-off wavelength).
  56. \clearpage
  57. \GMTfig[H]{GMT_App_J_2}{Transfer functions for 1-D \gmt\ filters.}
  58. One of the nice things about the gaussian filter is that its
  59. transfer functions are the same in 1-d and 2-d. Another nice
  60. property is that it has no negative side lobes. There are many
  61. definitions of the gaussian filter in the literature (see page
  62. 7 of Bracewell\footnote{R. Bracewell, \emph{The Fourier Transform
  63. and its Applications}, McGraw-Hill, London, 444p., 1965.}). We
  64. define $\sigma$ equal to 1/6 of the filter width, and the impulse
  65. response proportional to $\exp[-0.5(t/\sigma)^2)$. With this
  66. definition, the transfer function is $\exp[-2(\pi\sigma f)^2]$
  67. and the wavelength at which the transfer function equals 0.5 is
  68. about 5.34 $\sigma$, or about 0.89 of the filter width.
  69. \GMTfig[H]{GMT_App_J_3}{Transfer functions for 2-D (radial) \gmt\ filters.}
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...