vortexfit | R Documentation |
Fringe analysis by Vortex aka Spiral Quadrature transform.
vortexfit(
imagedata,
cp = NULL,
filter = NULL,
fw.o = 10,
options = psfit_options()
)
imagedata |
matrix containing the interferogram data |
cp |
list with circle parameters describing interferogram location. Defaults to NULL |
filter |
size of filter to remove background |
fw.o |
size of gaussian blur to smooth orientation estimate |
options |
A list with general fitting and display options. See |
Implements the Vortex or spiral phase quadrature transform method of Larkin et al. (2001) https://doi.org/10.1364/JOSAA.18.001862 including the fringe orientation estimation approach in Larkin (2005) https://doi.org/10.1364/OPEX.13.008097. Thanks to Steve Koehler for ideas on implementation details.
a list with wavefront estimates, wrapped phase, modulation, etc. The return has S3 class 'wf_zfit' with plot, print, summary, and report methods.
This routine is offered as is with no license, as it may be in violation of one or more US and international patents.
This is one of two routines provided for analysis of single interferograms,
along with fftfit()
. This may be suitable for interferograms with
closed fringes.
require(zernike)
fpath <- file.path(find.package(package="zernike"), "psidata")
fname <- "Image197.jpg"
img <- load.images(file.path(fpath, fname))
# parameters for this run
source(file.path(fpath, "parameters.txt"))
# target SA coefficients for numerical null.
sa.t <- sconic(diam,roc,lambda=wavelength)
zopt <- psfit_options()
zopt$satarget <- sa.t
# display an interferogram
if (tolower(.Platform$OS.type) == "windows") windows() else x11()
image(1:nrow(img), 1:ncol(img), img, col=grey256, asp=1,
xlab="X", ylab="Y", useRaster=TRUE)
mtext("Sample Interferogram")
if (tolower(.Platform$OS.type) == "windows") windows() else x11()
vfit <- vortexfit(img, filter=15, fw.o=10, options=zopt)
# do "classical FFT" based fit and compare results
dev.set(dev.next())
ftfit <- fftfit(img, cp=vfit$cp, sl=c(32, 0), filter=15, options=zopt)
plotn(ftfit, vfit, labels=c("fft", "vortex"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.