Closed josePhoenix closed 9 years ago
Can confirm that at least tip/tilt are swapped: zernike.noll_indices(2)
returns (1, 1)
when it should be (1, -1)
for the first entry on the second row of the triangle. Everything else looks fine up to Z_15
I am confused.
Both wikipedia (https://en.wikipedia.org/wiki/Zernike_polynomials#Noll.27s_sequential_indices) and the Online Encyclopedia of Integer Sequences (https://oeis.org/A176988) indicate a mapping of j=2 --> (n,m) = (1,1). I.e. those agree with what is currently coded in poppy.
What reference are you using for j=2 --> (1, -1) ?
See also:
In [7]: poppy.zernike.noll_indices(2)
Out[7]: (1, 1)
In [8]: poppy.zernike.str_zernike(1,1)
Out[8]: '\\sqrt{4}* ( 1 r^1 ) * \\cos(1 \\theta)'
This agrees with the definition for $Z_2 = 2 r \cos \theta$ given in Table 1 of Noll 1976. See the following horrible URL:
Ah, Wikipedia is not in agreement with itself. I was going off what Anand said and this figure: https://upload.wikimedia.org/wikipedia/commons/9/9f/ZernikePolynome6.svg
Argh. Perhaps the appropriate bug fix here is replacing that figure on wikipedia?
Wait, ha, if you click through to the figure page, the caption has an erratum that the Noll indices for tip and tilt are interchanged. See https://en.wikipedia.org/wiki/Zernike_polynomials#/media/File:ZernikePolynome6.svg
Yeah that should just flat out be fixed on wikipedia. Do you want to edit the svg or shall I?
I can do it. Took me a minute to find my login info.
Ugh, uploading proves more complicated than anticipated.
https://commons.wikimedia.org/wiki/Commons:FAQ#How_can_I_upload_a_new_version_of_a_file.3F
Guess I'll check back next week!
Fixed the picture on Wikipedia (and the copy I pinned to my wall)
Anand says tip and tilt are swapped, and maybe entries on lower rows of the Zernike pyramid as well. Note to self to check this and see if I can reproduce.