Closed Jashcraf closed 11 months ago
@hyukmo I do think priority #1 is coming up with some code to do zernike decomposition in poke
do you think you can write some code in python to generate a zernike polynomial given some index?
edit: taking a given x,y coordinate as inputs would be great too
@Jashcraf I can try, captain. But it would take some time....
No worries just need the contribution before SPIE haha
we can either write our own, or make poke dependent on another package. If possible i think it'd be nice to do our own for low order polynomials (say Z1-36 or whatever). I can also help out with it and we can use this issue to workshop the code.
Jaren, how much do we need to generate code from scratch? Would it be okay if I prompted ChatGPT for some boilerplate code?
le mao I have a preference against it so that contributors can use this as a learning experience, also I have no clue how to cite ChatGPT or it's products.
but zernike decomposition is just a problem of generating the polynomials, which wikipedia tells you how to do, and computing the dot product of them with your data.
Turns out it might be better to use np.linalg.lstq
to solve for the coefficient vector!
Emory added the ability to do Zernike decomposition, so now we can do that with OPD data. Might be worth the assertion that OPD has consistent units in poke.raytrace.
We are storing the optical path difference of the rays in both CODE V and Zemax but need a way to actually make the data meaningful. As of now it's a raveled array of data, but diffraction calculations are done on square grids!
So, we need
Hyukmo was interested in this utility so we can work with him on that.