Unwrap spectrum phase

Share:

Description

unwrap the phase spectrum so it does not wrap around

Usage

1
LocalUnwrap(p, cutoff = cutoff)

Arguments

p

phase spectrum

cutoff

cut off angle = pi

Value

Unwrapped spectrum

Note

Algorithm minimizes the incremental phase variation by constraining it to the range [-pi,pi]

Author(s)

Jonathan M. Lees<jonathan.lees.edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
x  <-  1:512
amp <- sin(1*2*pi*x/16) + sin(2*2*pi*x/16)  + sin(3*2*pi*x/16)


spc <- fft(amp)

plot(Mod(spc), type='l')

angle  <-  Arg(spc)

plot(angle, type='l')

unang  <-  LocalUnwrap(angle, cutoff =pi )
plot(unang, type='l')

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.