Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

2D phase unwrapping

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109594] 2D phase unwrapping
  • From: "Maarten van der Burgt" <Maarten.VanDerBurgt at kla-tencor.com>
  • Date: Fri, 7 May 2010 06:29:36 -0400 (EDT)

Hallo,

Looking for Mathematica code for phase unwrapping I found the following
1-dimensional phase unwrappers:

from
http://documents.wolfram.com/applications/signals/CepstralAnalysis.html
:

unwrapphase[data_?VectorQ,tol_:Pi,inc_:2 Pi]:=data+inc
FoldList[Plus,0,Sign[Chop[Apply[Subtract,Partition[data,2,1],{1}],tol]]]

and from
http://forums.wolfram.com/mathgroup/archive/2007/Mar/msg00806.html

(***********UnwrapPhase follows*************)
UnwrapPhase[data_?VectorQ,tol_:Pi,inc_:2 Pi]:=
 FixedPoint[
  #+inc*FoldList[
      Plus,0.,Sign[
       Chop[
        ListCorrelate[{1,-1},#],tol
        ]   (*close Chop*)
       ]    (*close Sign*)
      ]&,(*close FoldList*)
  data]   (*close FixedPoint and overall function*)

UnwrapPhase[list:{{_,_}..}]:=Transpose[{list[[All,1]],UnwrapPhase[list[=
[
All,-1]]]}]
(***********UnwrapPhase above*************)

An example of its use:

data = Table[Mod[ 20 Sin[x], 2 \[Pi]], {x, 0, \[Pi], 0.01}];
ListLinePlot[data]
ListLinePlot[UnwrapPhase[data]]

These both work fine when the data is not too noisy and can be easily
used on 2D lists by applying the unwrap function once on the rows and
subsequentially on the columns.

In the presence of noise a lot of different methods have been work out
as e.g. in:
Two-Dimensional Phase Unwrapping: Theory, Algorithms, and Software
by Dennis C. Ghiglia and Mark D. Pritt.

Has anyone implemented any of these methods in Mathematica?
Are there andy Mathematica packages available with more advanced phase
unwrapping routines?

Thanks for any suggestion,

Maarten van der Burgt
Leuven
Belgium



  • Prev by Date: Re: Return intermediate reference using Hold*****?
  • Next by Date: PDE coupling boundary problem
  • Previous by thread: Plot3D problems: no plot in some cases
  • Next by thread: PDE coupling boundary problem