faitdivers / pyao

PyAO - Adaptive Optics simulation package
6 stars 0 forks source link

WFS update, and added function for rectangular setups in the main #78

Closed NKant13 closed 10 years ago

NKant13 commented 10 years ago

Increased the readability of mainWFS.py. Normalized the intensity distribution and the lensletCentx/y. Added support length for FFT in the parameters for the sensors. Added function in main to handle rectangular lenslet configurations.

forcaeluz commented 10 years ago

Please correct me if I'm wrong: When I run your test file testWFS, the second plot, I see a picture where the x axis goes from 0 to ~1.5, and I see the same for the y axis.

Shouldn't this be the dimensions of your lenslet array (so lx and ly?) If that is not the case, what should I see on that plot?

I think I get what the plots should represent, but when I look into the values in the x and y axes I get a bit confused. (Maybe my way of thinking is incorrect)

NKant13 commented 10 years ago

I get your confusion, but the axes are correct. In the case of a rectangular lenslet array configuration the minimal width of the array is determined by the amount of lenslets, the diameter of the lenslet and the distance between the lenslets. Now if the supplied widths lx and ly are smaller than these calculated minimal widths for the rectangular configuration to fit, the supplied widths get overruled by the minimal calculated widths.

Then the question arises about the need of the supplied lx and ly. As I see it there needed for the generic setup of the whole toolbox together with lensCentx/y. Because for the toolbox to be generic we shouldn't need noApertx/y, dl and the lensletCentres function. I than also see these things as temporary solutions. It could also be that other parts of the toolbox are just not capable of handling it with only the lensCentx/y even in the future.

About where the lensletCentres function belongs, well indeed not in the main but also not in the WFS. Honestly I dont know where to put it, maybe best would be to make a seperate tool out of it. But for now other parts are depended on the rectangular array which makes it difficult to really separate it into a different tool.

It just boils down to that I don't know what to do with it. So if anyone has suggestions I'm all ears! Maybe we could just leave it like this for now and make an issue out of it?

forcaeluz commented 10 years ago

My suggestion is another module inside the wfs package for now. If later on this should change, we can do it. For me that is still more logical than inside the main.

NKant13 commented 10 years ago

Made an other module for.