CosmoStat / wf-psf

Data-driven wavefront-based PSF modelling framework.
MIT License
19 stars 9 forks source link

Build function to generate Zernike maps #10

Closed tobias-liaudat closed 3 years ago

tobias-liaudat commented 3 years ago

It should give a matrix for a given diameter and a given polynomial_order .

It is not a priority but it would be nice to be independent of the 200Mb 3D matrix containing the Zernike maps passed by PA.

There are some Galsim functions that could be useful. Otherwise, we only have to implement Zernike polynomials.

tobias-liaudat commented 3 years ago

For this task we could use the functions in this repo https://github.com/jacopoantonello/zernike or the helper classes for Zernikes in GalSim here.

tobias-liaudat commented 3 years ago

This was done in the last commit.

The function is based in the zernike package. There are some minor differences between the Zernike maps generated using this package and the conventions used by PA.

Some change of signs and specially some minor differences. In the 3rd mode where we see that the minimum is clearly on the center of the [1024x1024] image, the PA map gives the position of the minimum at [512,512] and the new Zernike map generator gives it at [511,511].

Examples of the first Zernike maps and the differences.

Screenshot 2021-06-17 at 18 11 28
tobias-liaudat commented 3 years ago

I don't think that this new convention will be a future issue regardless that we maintain the new convention. Therefore, I will close the issue.