psifit | R Documentation |
High level function for Least squares analysis of phase shifted interferograms.
psifit(images, phases, cp = NULL, satarget = NULL, psialg = "ls", options = psfit_options())
images |
An array containing the interferogram images |
phases |
A vector of phase shifts |
cp |
A list describing the pupil boundary, as returned by |
satarget |
Target 4th and 6th order SA coefficients in non-null tests of aspheres |
psialg |
String identifying the PSI algorithm to use |
options |
a list of options |
images
is a 3 dimensional array with dimensions nrow x ncol x length(phases)
,
where nrow
and ncol
are the number of rows and columns in the individual
interferogram images.
The current values recognized for psialg
are
least squares with known phase shifts
the “advanced iterative algorithm“ aiapsi
pca with pcalg="pc1"
pca with pcalg="pc2"
pca with pcalg="pc3"
my generalized PC algorithm in gpcapsi
first pcapsi
then aiapsi
first pcapsi
then tiltpsi
first gpcapsi
then tiltpsi
tiltpsi
A list with the following components
phi |
wrapped phase estimate |
mod |
modulation estimate |
phases |
phase shifts |
cp |
the interferogram boundary |
wf.net |
net, unfiltered wavefront (see |
wf.smooth |
Zernike fit wavefront |
wf.residual |
the difference |
fit |
Coefficients of Zernike fit to wavefront |
zcoef.net |
Net Zernike coefficients |
extras |
any extra data returned by low level functions |
M.L. Peck mlpeck54@gmail.com
lspsi
,
aiapsi
,
tiltpsi
,
gpcapsi
,
pcapsi
## reuse the files from the demo for an example of two stage fitting
## using gpca then tiltpsi
require(zernike)
fpath <- file.path(find.package(package="zernike"), "psidata")
files <- scan(file.path(fpath, "files.txt"), what="character")
for (i in 1:length(files)) files[i] <- file.path(fpath, files[i])
# load the images into an array
images <- load.images(files)
# parameters for this run
source(file.path(fpath, "parameters.txt"))
# phase shifts
phases <- wrap((0:(dim(images)[3]-1))/frames.per.cycle*2*pi)
phases <- switch(ps.dir, ccw = -phases, cw = phases, phases)
# target SA coefficients for numerical null.
sa.t <- sconic(diam,roc,lambda=wavelength)
zopt <- psfit_options()
zopt$satarget <- sa.t
zopt$ptol <- 0.01
tfit <- psifit(images, phases, psialg="gpcthentilt", options=zopt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.