Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > os > by-pkgid > 4b194777eaf705e440bb2ce282d32772 > files > 649

GMT-doc-4.5.3-3.fc14.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>J. Filtering of data in GMT</TITLE>
<META NAME="description" CONTENT="J. Filtering of data in GMT">
<META NAME="keywords" CONTENT="GMT_Docs">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="GMT_Docs.css">

<LINK REL="next" HREF="node217.html">
<LINK REL="previous" HREF="node208.html">
<LINK REL="up" HREF="GMT_Docs.html">
<LINK REL="next" HREF="node217.html">
</HEAD>

<BODY  bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html5724"
  HREF="node217.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html5718"
  HREF="GMT_Docs.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html5712"
  HREF="node215.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html5720"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html5722"
  HREF="node256.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html5725"
  HREF="node217.html">K. The GMT High-Resolution</A>
<B> Up:</B> <A NAME="tex2html5719"
  HREF="GMT_Docs.html">GMT - Technical Reference</A>
<B> Previous:</B> <A NAME="tex2html5713"
  HREF="node215.html">I.7 CMYK color system</A>
 &nbsp; <B>  <A NAME="tex2html5721"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html5723"
  HREF="node256.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION002700000000000000000"></A>
<A NAME="app:J"></A>
<BR>
J. Filtering of data in <A NAME="tex2html1810"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A>
</H1>

<P>
The <A NAME="tex2html1821"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> programs <A NAME="tex2html1822"
  HREF="../man/filter1d.html"><I><B>filter1d</B></I></A><A NAME="32078"></A> (for tables of data indexed
to one independent variable) and <A NAME="tex2html1823"
  HREF="../man/grdfilter.html"><I><B>grdfilter</B></I></A><A NAME="32083"></A> (for data
given as 2-dimensional grids) allow filtering of data by a
moving-window process.  (To filter a grid by Fourier transform use
<A NAME="tex2html1824"
  HREF="../man/grdfft.html"><I><B>grdfft</B></I></A><A NAME="32088"></A>.)  Both programs use an argument
<B>-F</B><IMG
 WIDTH="16" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img12.png"
 ALT="$&lt;$"><I>type</I><IMG
 WIDTH="29" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img271.png"
 ALT="$&gt;&lt;$"><I>width</I><IMG
 WIDTH="16" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img13.png"
 ALT="$&gt;$"> to specify the type of
process and the window's width (in 1-d) or diameter (in 2-d).
(In <A NAME="tex2html1825"
  HREF="../man/filter1d.html"><I><B>filter1d</B></I></A><A NAME="32094"></A> the width is a length of the time or
space ordinate axis, while in <A NAME="tex2html1826"
  HREF="../man/grdfilter.html"><I><B>grdfilter</B></I></A><A NAME="32099"></A> it is the
diameter of a circular area whose distance unit is related to
the grid mesh via the <B>-D</B> option). If the process is a
median, mode, or extreme value estimator then the window 
output cannot be written as a convolution and the filtering
operation is not a linear operator.  If the process is a weighted
average, as in the boxcar, cosine, and gaussian filter types, 
then linear operator theory applies to the filtering process.
These three filters can be described as convolutions with an
impulse response function, and their transfer functions 
can be used to describe how they alter components in the input
as a function of wavelength.

<P>
Impulse responses are shown here for the boxcar, cosine, and
gaussian filters.  Only the relative amplitudes of the filter
weights shown; the values in the center of the window have 
been fixed equal to 1 for ease of plotting.  In this way the
same graph can serve to illustrate both the 1-d and 2-d impulse
responses; in the 2-d case this plot is a diametrical
cross-section through the filter weights (Figure&nbsp;<A HREF="#fig:GMT_App_J_1">J.1</A>).

<P>

<DIV ALIGN="CENTER"><A NAME="fig:GMT_App_J_1"></A><A NAME="32105"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
Impulse responses for <A NAME="tex2html1811"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> filters.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><IMG
 WIDTH="541" HEIGHT="305" ALIGN="BOTTOM" BORDER="0"
 SRC="img272.png"
 ALT="\includegraphics{scripts/GMT_App_J_1}"></DIV></TD></TR>
</TABLE>
</DIV>

<P>
Although the impulse responses look the same in 1-d and 2-d,
this is not true of the transfer functions; in 1-d the transfer
function is the Fourier transform of the impulse response, 
while in 2-d it is the Hankel transform of the impulse response.
These are shown in Figures&nbsp;<A HREF="#fig:GMT_App_J_2">J.2</A> and
<A HREF="#fig:GMT_App_J_3">J.3</A>, respectively.  Note that in 1-d the boxcar transfer
function has its first zero crossing at <IMG
 WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img273.png"
 ALT="$f = 1$">, while in 2-d 
it is around <IMG
 WIDTH="53" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img274.png"
 ALT="$f \sim 1.2$">.  The 1-d cosine transfer function
has its first zero crossing at <IMG
 WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img275.png"
 ALT="$f = 2$">; so a cosine filter needs
to be twice as wide as a boxcar filter in order to zero the same
lowest frequency.  As a general rule, the cosine and gaussian
filters are ``better'' in the sense that they do not have the
``side lobes'' (large-amplitude oscillations in the transfer
function) that the boxcar filter has.  However, they are
correspondingly ``worse'' in the sense that they require more
work (doubling the width to achieve the same cut-off wavelength).

<P>

<P>

<DIV ALIGN="CENTER"><A NAME="fig:GMT_App_J_2"></A><A NAME="32113"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
Transfer functions for 1-D <A NAME="tex2html1814"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> filters.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><IMG
 WIDTH="549" HEIGHT="305" ALIGN="BOTTOM" BORDER="0"
 SRC="img276.png"
 ALT="\includegraphics{scripts/GMT_App_J_2}"></DIV></TD></TR>
</TABLE>
</DIV>

<P>
One of the nice things about the gaussian filter is that its
transfer functions are the same in 1-d and 2-d.  Another nice
property is that it has no negative side lobes.  There are many 
definitions of the gaussian filter in the literature (see page
7 of Bracewell<A NAME="tex2html1817"
  HREF="footnode.html#foot32069"><SUP>J.1</SUP></A>).  We
define <IMG
 WIDTH="15" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img277.png"
 ALT="$\sigma$"> equal to 1/6 of the filter width, and the impulse
response proportional to <!-- MATH
 $\exp[-0.5(t/\sigma)^2)$
 -->
<IMG
 WIDTH="113" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
 SRC="img278.png"
 ALT="$\exp[-0.5(t/\sigma)^2)$">.  With this
definition, the transfer function is <!-- MATH
 $\exp[-2(\pi\sigma f)^2]$
 -->
<IMG
 WIDTH="105" HEIGHT="35" ALIGN="MIDDLE" BORDER="0"
 SRC="img279.png"
 ALT="$\exp[-2(\pi\sigma f)^2]$">
and the wavelength at which the transfer function equals 0.5 is 
about 5.34 <IMG
 WIDTH="15" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img277.png"
 ALT="$\sigma$">, or about 0.89 of the filter width.

<P>

<DIV ALIGN="CENTER"><A NAME="fig:GMT_App_J_3"></A><A NAME="32121"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
Transfer functions for 2-D (radial) <A NAME="tex2html1818"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> filters.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><IMG
 WIDTH="549" HEIGHT="305" ALIGN="BOTTOM" BORDER="0"
 SRC="img280.png"
 ALT="\includegraphics{scripts/GMT_App_J_3}"></DIV></TD></TR>
</TABLE>
</DIV>

<HR>
<!--Navigation Panel-->
<A NAME="tex2html5724"
  HREF="node217.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html5718"
  HREF="GMT_Docs.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html5712"
  HREF="node215.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html5720"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html5722"
  HREF="node256.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html5725"
  HREF="node217.html">K. The GMT High-Resolution</A>
<B> Up:</B> <A NAME="tex2html5719"
  HREF="GMT_Docs.html">GMT - Technical Reference</A>
<B> Previous:</B> <A NAME="tex2html5713"
  HREF="node215.html">I.7 CMYK color system</A>
 &nbsp; <B>  <A NAME="tex2html5721"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html5723"
  HREF="node256.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2010-07-14
</ADDRESS>
</BODY>
</HTML>