Open meller92 opened 7 years ago
Hi meller,
Thank you!
I will test it and add it in the module! Cool!
Marvin
Hi Marvin, any improvement on this? I think it could be a nice feature. Thanks
Hi @dguerra, you may be interested in prysm, an alternative python optics module. Among its features are image simulation, with respect for units and a lack of necessity for the PSF and image to have equal spacing. I do need to polish the code for that type of thing more, but you can find an example of using image simulation here.
failed in
psfmatrix = Z.psf(matrix=True)
return
TypeError: psf() got an unexpected keyword argument 'matrix'
I dive into the code, for .psf
def psf(self,r=1,lambda_1=632*10**(-9),z=0.1):
"""
------------------------------------------------
psf()
Return the point spread function of a wavefront described by
Zernike Polynomials
------------------------------------------------
Input:
r: exit pupil radius(mm)
lambda_1: wavelength(m)
z: exit pupil to image plane distance(m)
"""
print(r,lambda_1,z)
PSF = self.__psfcaculator__(r=r,lambda_1=lambda_1,z=z)
fig = __plt__.figure(figsize=(9, 6), dpi=80)
__plt__.imshow(abs(PSF),cmap=__cm__.RdYlGn)
__plt__.colorbar()
__plt__.show()
return 0
Z.psf() always return 0, not PSF from psfcaculator
Maybe one int 0 get into the calculation.
Hi, I don't know Python a lot but i think that adding something like this to the zernike.py module could be useful: