brcutpuw | R Documentation |
Solves a modification of the assignment problem to minimize the total length of branch cuts.
brcutpuw(phase, pen = 0, details = FALSE)
phase |
Matrix containing the wrapped phase map |
pen |
Optional penalty value for connecting a residue to an edge |
details |
boolean: if TRUE return some extra details for diagnostics |
A matrix containing the unwrapped wavefront. If details==TRUE a named list starting with the unwrapped wavefront in puw.
M.L. Peck
qpuw
idiffpuw
set.seed(1234)
PW <- wrap(matrix((0:100)*pi/10,101,101))
## need a border of NA's
PW <- cbind(rep(NA,101), PW, rep(NA,101))
PW <- rbind(rep(NA,103), PW, rep(NA,103))
PW <- PW + rnorm(103^2)
mtext(rmap(PW, plot=TRUE))
PU <- brcutpuw(PW, details=TRUE)
image(1:103, 1:103, PU$bcuts, col="blue", add=TRUE)
X11()
image(PU$puw, col=grey256, asp=1, useRaster=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.