Description Usage Arguments Value Author(s) Examples
This unwrap function removes pi or 2*pi phase jumps from an input dataset.
1 | unwrap.phase(Data, tol = pi, step = (2 * pi))
|
Data |
Phase data to be unwrapped as a vector. |
tol |
is the amount between steps which is considered large enough to be a jump, default value is pi. |
step |
indicates the amount size of the jump in the phase data inputted, default value is 2*pi. |
Returns the unwrapped dataset as a vector.
S.J.Berry
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (Data, tol = pi, step = (2 * pi))
{
Data_Length <- length(Data)
for (a in 1:(Data_Length - 1)) {
b <- a + 1
Data_Difference <- Data[a] - Data[b]
if (Data_Difference <= (-tol)) {
for (c in b:Data_Length) {
Data[c] <- Data[c] - step
}
}
if (Data_Difference >= (tol)) {
for (c in b:Data_Length) {
Data[c] <- Data[c] + step
}
}
}
return(Data)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.