Learn R Programming

RSEIS (version 2.1-6)

LocalUnwrap: Unwrap spectrum phase

Description

unwrap the phase spectrum so it does not wrap around

Usage

LocalUnwrap(p, cutoff = cutoff)

Arguments

p
phase spectrum
cutoff
cut off angle = pi

Value

  • Unwrapped spectrum

Examples

Run this code
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')

Run the code above in your browser using DataLab