Fit Zernike Terms to a wavefront.
The class notes of Schwiegerling UofA on ANSI Standard Zernike terms is the basis for this challenge. Pages 13 and 14 give the term definitions implemented in the zern_data_v01.m routine provided in the function template.
ANSI Standard Zernike Chart:
Algorithm Description:
M=surface array to be fit by Zernike terms;
-valid data is circle of normalized radius<=1
Use the R and T arrays to create the A array
R=radial normalized distance from center of array
T=angular radian value from center of array
A=fitting array [valid_data_pts,terms]
Create A * z_fit = M(valid_data_pts)
[valid_pts,terms] * [terms,1] = [valid_pts,1]
Loop term=0:terms-1
- Create the 2-D array of z-terms uisng z=zern_data_v01(term,R,T)
- A(:,term+1) = z(valid_data_pts)
End Loop
Solve for z_fit: pinv(A)*M(valid_pts) or A\M(valid_pts)
Inputs: [M N R T] where N is number of Zernike terms for fit
Outputs: [v] Zernike fit vector of length N
Creation of the M surface and expected v fit vector can be seen in the Test Suite.
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers3
Suggested Problems
-
Check to see if a Sudoku Puzzle is Solved
337 Solvers
-
Pull the variable y_correct from the Caller's Workspace
51 Solvers
-
116 Solvers
-
627 Solvers
-
115 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Could you please fix the function urlwrite? Or remove it...adding the code for the function zern_data_v01(j,r,t) at the end of the live script. Good problem.
Link fixed 9/29/20202.
All submissions being re-evaluated
Thanks, Richard.