Learn R Programming

RSEIS (version 4.2-4)

LocalUnwrap: Unwrap spectrum phase

Description

unwrap the phase spectrum so it does not wrap around

Usage

LocalUnwrap(p, cutoff = cutoff)

Value

Unwrapped spectrum

Arguments

p

phase spectrum

cutoff

cut off angle = pi

Author

Jonathan M. Lees<jonathan.lees.edu>

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