Date   

Re: Fourier transforms of Zernike polynomials

Bruce Griffiths
 
Edited

I had noticed that using a Gaussian blur adds a non existent hollow to the centre of the computed surface when analysing an interferogram that only  has defocus. The amplitude/depth of the hole approaches zero as the width of the Gaussian blur approaches zero.


Bruce

On 12 May 2021 at 03:39 Michael Peck <mpeck1@...> wrote:

This has nothing to do directly with DFTFringe, so feel free to ignore this post. Fourier transforms of Zernike polynomials have some interesting properties and important applications -- the famous paper by Noll (1976) uses them as the starting point for an analysis of atmospheric turbulence. Zernike himself used them in the development of the phase contrast method, which is what won him the Nobel prize. His first papers on the topic actually concerned mirror testing: Zernike (2004a) (in German and still paywalled!) and Zernike (2004b) (shorter English version, but freely available). They also form the basis for the Nijboer-Zernike aberration theory, which evolved into the Extended Nijboer-Zernike theory of image formation which is still highly relevant in optics. This is mostly beyond the scope of this group though.

It turns out the FT of any Zernike polynomial has a closed form expression in terms of Bessel functions of the first kind as follows:

In polar coordinates the FT factorizes into a radial part that depends on spatial frequency and the radial Zernike order, and an azimuthal part that has the same angular dependence as the Zernikes themselves. I think the frequency k in the expression above has units of cycles per pupil diameter. Various literature sources give different values for the normalizing factors, but no matter. Here's what the radial part looks like for a few selected radial orders:

All of these except the FT of piston (top left graph) are 0 at a spatial frequency of zero. The power in each transform is always negligible up to some threshold that depends only on the radial order and they decay fairly slowly at higher spatial frequencies.

The paper I took that expression at the top from was by G. Dai (2006) titled " Zernike aberration coefficients transformed to and from Fourier series coefficients for wavefront representation," which attempts to do exactly what the title suggests. The problem is it won't work if the wavefront data is transformed using a DFT while the analytical expression is used for the FT of the Zernikes. The problem is the DFT gives a poor approximation to the FT. This can be seen for a couple of fairly high order pure aberrations below. The top panes depict the modulus and phase of the aberrations per the expression above. The bottom panes show the same values for the DFT of a 4K x 4K matrix filled with the same aberrations. The DFT gets the shape of the modulus about right although it undersamples the oscillating high frequency region. The phases are completely wrong though.


What I was actually interested in with this exercise was understanding the performance of Zernike fitting as a low pass filter, especially compared to a Gaussian blur which I think is the preferred method of smoothing in DFTFringe. Here is an example from some randomly selected real data I had laying around. First is a Zernike fit. The top left pane is the net but otherwise unfiltered wavefront (by net I mean with the software null applied and usual low order stuff removed). The two panes below it are the (modulus of) DFT of the wavefront and a zoomed in version of the same. The middle panes are the Zernike fit wavefront. The right is the residual, that is the difference between the net wavefront and the Zernike fit. Notice the dark disk in the center -- that region has virtually no power at all. The two bright specs in the residual DFT appear to be from some sinusoidal (electronic?) artifact that you can faintly see in the map.

And here's the same using a Gaussian blur. I think this used the value that Dale recommends as a default amount of smoothing. Even though this appears to have captured more detail the smoothed wavefront actually has a slightly lower RMS deviation than the Zernike fit one. Also, the former shows what looks like a complete ring at ~80% radius that's hard to pick out in the blurred map. In addition the residual from the Gaussian blur (which I think is equivalent to applying an unsharp mask) shows more power at low spatial frequencies.

So one characteristic of Zernike fitting that I think is advantageous is that it completely captures the low spatial frequency content of the measured wavefront. How much it captures can be adjusted by increasing or decreasing the number of terms in the fit (see below). The disadvantage is it's more computationally intensive and maybe prohibitively so if you really wanted to capture high frequency details. It might be worth investigating other forms of low pass filter. Something like a top hat but with a tapering edge might work.

This final graph shows the position of the first maximum of the radial part of the FT for radial orders up to 50. A fit up to order 50 using the indexing scheme of the extended Fringe set would require 676 Zernike components.


Fourier transforms of Zernike polynomials

Michael Peck
 
Edited

This has nothing to do directly with DFTFringe, so feel free to ignore this post. Fourier transforms of Zernike polynomials have some interesting properties and important applications -- the famous paper by Noll (1976) uses them as the starting point for an analysis of atmospheric turbulence. Zernike himself used them in the development of the phase contrast method, which is what won him the Nobel prize. His first papers on the topic actually concerned mirror testing: Zernike (2004a) (in German and still paywalled!) and Zernike (2004b) (shorter English version, but freely available). They also form the basis for the Nijboer-Zernike aberration theory, which evolved into the Extended Nijboer-Zernike theory of image formation which is still highly relevant in optics. This is mostly beyond the scope of this group though.

It turns out the FT of any Zernike polynomial has a closed form expression in terms of Bessel functions of the first kind as follows:

In polar coordinates the FT factorizes into a radial part that depends on spatial frequency and the radial Zernike order, and an azimuthal part that has the same angular dependence as the Zernikes themselves. I think the frequency k in the expression above has units of cycles per pupil diameter. Various literature sources give different values for the normalizing factors, but no matter. Here's what the radial part looks like for a few selected radial orders:

All of these except the FT of piston (top left graph) are 0 at a spatial frequency of zero. The power in each transform is always negligible up to some threshold that depends only on the radial order and they decay fairly slowly at higher spatial frequencies.

The paper I took that expression at the top from was by G. Dai (2006) titled "Zernike aberration coefficients transformed to and from Fourier series coefficients for wavefront representation," which attempts to do exactly what the title suggests. The problem is it won't work if the wavefront data is transformed using a DFT while the analytical expression is used for the FT of the Zernikes. The problem is the DFT gives a poor approximation to the FT. This can be seen for a couple of fairly high order pure aberrations below. The top panes depict the modulus and phase of the aberrations per the expression above. The bottom panes show the same values for the DFT of a 4K x 4K matrix filled with the same aberrations. The DFT gets the shape of the modulus about right although it undersamples the oscillating high frequency region. The phases are completely wrong though.


What I was actually interested in with this exercise was understanding the performance of Zernike fitting as a low pass filter, especially compared to a Gaussian blur which I think is the preferred method of smoothing in DFTFringe. Here is an example from some randomly selected real data I had laying around. First is a Zernike fit. The top left pane is the net but otherwise unfiltered wavefront (by net I mean with the software null applied and usual low order stuff removed). The two panes below it are the (modulus of) DFT of the wavefront and a zoomed in version of the same. The middle panes are the Zernike fit wavefront. The right is the residual, that is the difference between the net wavefront and the Zernike fit. Notice the dark disk in the center -- that region has virtually no power at all. The two bright specs in the residual DFT appear to be from some sinusoidal (electronic?) artifact that you can faintly see in the map.

And here's the same using a Gaussian blur. I think this used the value that Dale recommends as a default amount of smoothing. Even though this appears to have captured more detail the smoothed wavefront actually has a slightly lower RMS deviation than the Zernike fit one. Also, the former shows what looks like a complete ring at ~80% radius that's hard to pick out in the blurred map. In addition the residual from the Gaussian blur (which I think is equivalent to applying an unsharp mask) shows more power at low spatial frequencies.

So one characteristic of Zernike fitting that I think is advantageous is that it completely captures the low spatial frequency content of the measured wavefront. How much it captures can be adjusted by increasing or decreasing the number of terms in the fit (see below). The disadvantage is it's more computationally intensive and maybe prohibitively so if you really wanted to capture high frequency details. It might be worth investigating other forms of low pass filter. Something like a top hat but with a tapering edge might work.

This final graph shows the position of the first maximum of the radial part of the FT for radial orders up to 50. A fit up to order 50 using the indexing scheme of the extended Fringe set would require 676 Zernike components.


Re: Zernike term calculation ?

George Roberts (Boston)
 

Nice!  Now maybe watch the part of this video where I talk about Spherical Aberration and the DFTFringe null feature:
https://youtu.be/T5DNzVPwrzc?t=455


Re: Zernike term calculation ?

jeanpierre_chiappini@...
 
Edited

I used a pure sinus coma as an example.
With DFTFringe and its Zernike wavefront simulation tool I created a front with the value 0.771.
Then I saved that wavefront and turned it into an image.

     

Each point of the pupil at these coordinates and its height (h).
With the Excel spreadsheet I calculated the Wyant factor for each point I name (E).
I calculated  (Z7) = sum [E * h] / sum [E²] and found the exact term of 0.771.

To verify I have redone the calculation with these examples from other Wyants: (Z4) astigmatism, (Z6) coma cosine and (Z8) sphericity and all give 0 (in fact a very small number of powers -10 so zero).
So the principle of decomposition works well.

Thank you
@Dale Eason
@Bruce Griffiths
@Michael Peck
@George Roberts (Boston)
thanks to your help i was able to understand at my level.


Re: Zernike term calculation ?

Bruce Griffiths
 

Michael's explanation uses orthonomal Zernike polynomials which are weighted so that the integral of the square of each Zernike polynomial over the unit circle is 1. The Wyant Zernike polynomials aren't orthonormal but the scale factor required for each Wyant Zernike polynomial to convert it to orthonormal form is known.

The calculations are simpler if Orthonormal Zernike polynomials are used. However DFTFringe uses the Wyant form of the Zernike polynomials which are not orthonormal.

Bruce

On 11 May 2021 at 15:19 "George Roberts (Boston)" <bb@...> wrote:

On Mon, May 10, 2021 at 05:19 PM, <jeanpierre_chiappini@...> wrote:
Something like (Z7) is the mean of (h) / [r * (- 2 + 3 * r²) * sin (a)] ?
Yes!  Very close.  I think instead of "h / Z7" it's "h * Z7".  Instead of the "mean", it's the "integral".  Basically the same idea (for each pixel value h, find h*Z7 then divide by the surface area if radius of mirror=1 - this is basically the mean, except divide by surface area of each pixel instead of by qty of pixels).  Bruce explains it more accurately.  I guess you multiply by 8 at the end as Bruce says.

- George


Re: Zernike term calculation ?

George Roberts (Boston)
 

On Mon, May 10, 2021 at 05:19 PM, <jeanpierre_chiappini@...> wrote:
Something like (Z7) is the mean of (h) / [r * (- 2 + 3 * r²) * sin (a)] ?
Yes!  Very close.  I think instead of "h / Z7" it's "h * Z7".  Instead of the "mean", it's the "integral".  Basically the same idea (for each pixel value h, find h*Z7 then divide by the surface area if radius of mirror=1 - this is basically the mean, except divide by surface area of each pixel instead of by qty of pixels).  Bruce explains it more accurately.  I guess you multiply by 8 at the end as Bruce says.

- George


Re: Zernike term calculation ?

Michael Peck
 

If we know the wave front (W) or in other words we know the height of the deformation (h) at each point expressed in wave value, how are the zernike terms calculated?

Here's a brief outline of the algorithm for working with actual data sampled at a discrete grid of points:

1) Given the previously determined size and location parameters of the interferogram(s) calculate the polar coordinates (r_n, θ_n) of each unmasked pixel. The wavefront data in its original form will be in a matrix that for numerical convenience needs to be reshaped into a vector.

2) After deciding which set of Zernike polynomials you want to fit (or having the decision made for you) calculate at each pixel n the values of the selected set of ZP's. If there are N unmasked pixels and J polynomials in the selected set this will result in an N x J matrix Z.This can be done efficiently using published recurrence relationships.

3) The fit to the wavefront is given by the relation W = Zc + ε where W are the measured wavefront values, c is a length J vector (one coefficient for each ZP used in the fit) and ε a length N vector of residuals. Assuming J<N this can be solved as a least squares problem, for which there are many known methods of solution. Alternatively, noting that Z is approximately orthogonal if the pupil was uniformly sampled -- Z'Z ≈ NI where I is the identity matrix and (') the transpose,we have c ≈ Z'W/N. For N reasonably large this should give a reasonable approximation to the least squares solution with considerably less computational expense.

This is probably more detail than you want,but if you do want it there's source code out there.

Mike


Re: Zernike term calculation ?

Bruce Griffiths
 

C7 = (Integral of product of h*Z7 over the surface)/(Integral of Z7*Z7 over the surface)

Where Z7 is the Zernike polynomial and C7 its amplitude

The Integral of Z7*Z7 over the surface = 1/8.

The surface has a normalised radius of 1 at its edge.

Bruce

On 11 May 2021 at 09:19 "jeanpierre_chiappini via groups.io" <jeanpierre_chiappini@...> wrote:

Good morning all,
If we know the wave front (W) or in other words we know the height of the deformation (h) at each point expressed in wave value, how are the zernike terms calculated?

For example how to calculate the term (coma sinus)?
Each point is defined by its coordinates and the deformation at this point.

(p) in polar coordinates is defined is defined by (r, a)
with 0 <r <1 and 0 <a <2PI
and (h) the height of the strain.

Wyant gives a factor for (Z7) in polar coordinates
This factor is [r * (- 2 + 3 * r²) * sin (a)]
How to use the (h) at each point to calculate the coma sine term (Z7) ?
Something like (Z7) is the mean of (h) / [r * (- 2 + 3 * r²) * sin (a)] ?


Re: Zernike term calculation ?

Dale Eason
 
Edited

On Mon, May 10, 2021 at 04:19 PM, <jeanpierre_chiappini@...> wrote:
This factor is [r * (- 2 + 3 * r²) * sin (a)]
How to use the (h) at each point to calculate the coma sine term (Z7) ?
Much like fitting a line to a group of points.  
You can use a "least squares fit" of each point to the polynomial.   It is complex but straight forward if you know the math.  You can find it in the source of DFTFringe in the ZernikeProcess.cpp file.  In the routine called unwrap_to_zernikes.

Dale


Zernike term calculation ?

jeanpierre_chiappini@...
 

Good morning all,
If we know the wave front (W) or in other words we know the height of the deformation (h) at each point expressed in wave value, how are the zernike terms calculated?

For example how to calculate the term (coma sinus)?
Each point is defined by its coordinates and the deformation at this point.

(p) in polar coordinates is defined is defined by (r, a)
with 0 <r <1 and 0 <a <2PI
and (h) the height of the strain.

Wyant gives a factor for (Z7) in polar coordinates
This factor is [r * (- 2 + 3 * r²) * sin (a)]
How to use the (h) at each point to calculate the coma sine term (Z7) ?
Something like (Z7) is the mean of (h) / [r * (- 2 + 3 * r²) * sin (a)] ?


Re: Testing old mirrors

 
Edited

Paul, thanks for your letter.
About Gregorian telescopes on the mid. of 18 century - they could be left all spherical and be diffraction limited.
Attached please find a design sample of 2.25" diameter Gregorian telescope by the same master. The data are from Smith's Optics,1738 and it is related to Short's earlier telescopes.
 The second image is a sketch of telescope construction - just for a reference, I have this unit (278/1325 = 9 1/2").
Most of the scopes I have in collection are completed and in working condition. Testing of primary mirrors had a goal to check the shape and appr. quality.
I may consider testing whole telescopes, but it would not be as easy task.
Regards, Yuri


Re: Updated Wiki Page: Diverger lens Residual Spherical aberration #wiki-notice

jkmetrology
 

Thanks for that!!
Lost me at "Thin lens"


Kind regards,

John



From: Interferometry@groups.io <Interferometry@groups.io> on behalf of Interferometry@groups.io Notification <noreply@groups.io>
Sent: 08 May 2021 08:30
To: Interferometry@groups.io <Interferometry@groups.io>
Subject: [Interferometry] Updated Wiki Page: Diverger lens Residual Spherical aberration #wiki-notice
 

The wiki page Diverger lens Residual Spherical aberration has been updated by Bruce Griffiths <bruce.griffiths@...>.

Compare Revisions


Updated Wiki Page: Diverger lens Residual Spherical aberration #wiki-notice

Interferometry@groups.io Notification <noreply@...>
 

The wiki page Diverger lens Residual Spherical aberration has been updated by Bruce Griffiths <bruce.griffiths@...>.

Compare Revisions


Re: Testing old mirrors

paul valleli
 

Yuri,
Remember that James Short was making Gregorian Telescopes of a crude nature before there
was a full understanding of the properties of the Gregorian Configuration.
If he was matching secondary mirrors to the primary, then your interferograms will have limited value.
The best you could do is relate the Primary surface figure to the desired prolate spheroid and then 
either make a Null Test setup for Conjugate foci or just report the shape of the Primary as related 
to a spherical reference at the Center of Curvature. Diameter and Radius of Curvature could be reported
but results of star imaging could be very poor if the mirrors are mis-spaced compared to a nominal design.
A missing secondary could mess up the imaging performance or introduce erroneous Spherical Aberration.
Personally, I would record a set of interferograms for each Primary and RoC, Best Fitting Conic, and 
amount of Astigmatism if it is a property of the test setup.
What to do, if the mirrors are flexing as mounted? That is where the stand-alone interferograms provide
a reference point, depending on gravity caused distortion, vs. mounting problems. 
To keep this analysis as practical evidence of Short's work would require amassing a large, but 
incomplete, database for each mirror. 
It might be reasonable just to provide the serialized interferograms with a manual profile reduction. Same for
the secondary mirrors. 
Is a convex test plate available ?
Interferograms of Secondary surfaces, made to avoid making erroneous measurements at incorrect 
spacings could simplify the analysis.
For the cases where the complete telescope is available, a qualitative evaluation of image quality at 
intended range and at infinity could help define relative quality.
In my opinion, the surface profiles obtained as topographic surface maps would be most meaningful.
Paul V. 
  
  
  


On Fri, May 7, 2021 at 10:36 PM Yuri via groups.io <tec=idcomm.com@groups.io> wrote:
Dale and All,
I have to put this project on hold. Just need to study more about testing of a non-spherical mirrors.
Yuri


Re: Testing old mirrors

 

Dale and All,
I have to put this project on hold. Just need to study more about testing of a non-spherical mirrors.
Yuri


Re: Testing old mirrors

George Roberts (Boston)
 

Another way to find focus point is almost identical to how you do it with Foucault tester:

First remove all tilt - in other words try to get a "bulls eye" pattern visible.  Then push gently on the bath left or right.  Watch which way the "bulls eye" moves when you push left or right.  If the bulls eye moves the same direction as you are pushing then I call this "same".  If they move opposite directions I call this "different".  When you pass through the focus point it will switch to the other .  

Now I need to know if you are looking at the igram through a camera or on paper and how your bath is setup.

If your bath is like the left picture where the laser points towards the mirror under test then
a) if you are projecting onto paper then "same" means inside focus and "different" means outside focus
b) if you are looking at the igram directly with your eye or with a camera then "same" means outside focus

If your bath is like the right picture where the laser points 90 degrees from the mirror then
c) if you are projecting onto paper then "same" means outside focus and "different" means inside focus
d) if you are looking at the igram directly with your eye or with a camera then "same" means inside focus

"inside" means the bath is closer to the mirror than "at focus".  "outside" means the bath is farther from the mirror.
For me, "d" is most common and the one I memorized.  I memorized this "for me, 'same' is inside".

Note also that if you are setup like the left photo you need to check the box in the dftfringe mirror configuration that says "flip interferogram left to right on loading".  If you don't do that you may be rotating the images the wrong way or polishing your mirror in the wrong spot.



Re: Testing old mirrors

 

Dale,
I will play with a defocus on the weekend. Moving 1mm from the ROC point will make too many fringes, I will try a smaller amount (up to 10 micron level). So far I have checked the result by averaging 2÷3 shots + rotation + final averaging. The result is similar to yesterday's data from a single shot.
As per theory, the Gregorian type of telescope asks for a parabolic shape for the primary and elliptical for secondary. But in the mid. of the 18-th century there were no control methods. Primary mirrors were tested from ROC, secondaries had spherical shape at the best.
Yuri


Re: Testing old mirrors

 

George, thanks for videos, I watch the first one at lunch and got some info I missed, thanks a lot!
As per the Bath, I am not familiar with it, doing all test with a very compact TG for APOs testing.
Regards, Yuri


Re: Testing old mirrors

Dale Eason
 

Yuri,

When using a Bath interferometer how far you set it from the ROC of the Mirror determines the defocus value.   I assume that will be the same for the interferometer you are using.   So move the your interferometer back from the ROC a very small amount  (a mm or so) with your fine motions stage if that is what you have.   Then take a few igrams and analyze them to see what their defocus value is.   Do that until you get a defocus value of 1 or larger.

We have several issues to work through.   The first is I assumed the desired surface was a parabola with a conic of -1.   That might not be the case for that mirror.   I just don't know.   You will have to figure that out from the telescope optical equations needed for that style of scope.

The next issue is that DFTFringe does not use annular Zernike polynomials.   That is ok if the central hole is less than 25%.   But that hole is 28%.   How much of an error does that make I do not know.

I have found that the center blue filter diameter does not change the best fit conic much.   Mostly a large value causes the edge of the mirror to get an upward fringe where the filter overlaps the side lobe.  I don't know why one time the best fit conic changed a lot with the filter but it does not now.  Attached is an image comparing a filter value of 1 and 12.   The profile shows both but the other plots and data are for the filter values of 12.  From that you can see where the lower right quadrant edge gets raised using the value of 12.


Re: Testing old mirrors

George Roberts (Boston)
 

Wait - I just realized I'm replying to Yuri.  I think Yuri knows just as much about Bath Interferometers as I do and probably doesn't need to watch my videos.  Hmm.  So why disable the null?

1081 - 1100 of 31807