I just want you to know that you made an incredible work! It teaches me lots of things as an optics related product manager. Thanks and looking forward to more of it!
Great work! Helps me a lot in understanding aberrations. I have one question though, that you mentioned multiple times that in an ideal optical system, rays from a point converges to a point. But in wavefront aberration calculation, how does this starting point determined? will the starting point'l location affect the wavefront aberration we get? And how do we determine the shape of the idea optical system, when we don't have one design, say in corneal wavefront aberration analysis? Looking forward to your reply!
Indeed, in general the wavefront error can be different for different object points. The Seidel aberrations for example express a dependence on the object point location. However, there are many cases where the wavefront error can be approximated to be independent of the object point location (i.e. the aberrations are isoplanatic), for example in imaging systems with a low numerical aperture. Unfortunately, I have no particular expertise in corneal wavefront analysis. But if I had to guess, I would try to parametrize the shape of the cornea, measure the wavefront error for various wavelengths, and then try to fit the parameters to the measured data?
@Sander thanks for your great video! I am trying to reproduce your results shown at @30:29 using python. However I am unsure how to do so. I did define a 2D array containing 9 point sources. However I am unsure how to then determine the diffraction patterns as shown in your image. Could you maybe explain your steps taken (or provide a part if your code)?
Looking a bit closer at the expressions I am a bit confused as how you define the ''h'' in your Delta W. It appears as the magnitude of the vector (from optical axis to the point source). I did use the equation in which we set x=rho*cos(theta) (which then puts the h along the x-axis). So i guess I need to use the polar system instead. However then I still dont understand how you determine the angle theta and the magnitude rho in order to produce your plots.
@@brisingreye5209 Phi and rho are the polar coordinates of the pupil, which is in Fourier space. So you'd do the following: - Pick a point source in the object plane with a certain position vector . - Fourier transform the point source (this should give a linear phase ) and truncate it with the pupil/aperture. - Apply the phase error \Delta W in the pupil. rho and phi are the polar coordinates in the pupil (where phi is the angle between and , to ensure rotational symmetry of the system). At the edge of the pupil, rho should equal 1. The strength of this phase error can depend on h, i.e. the farther away the point source from the optical axis, the larger the phase error in the pupil. - (Inverse) Fourier transform the pupil function to obtain the PSF for the point source. - Do this for all point sources in the grid to obtain a figure as shown in the video I explain in more detail how to calculate PSFs with Fourier transforms here: ua-cam.com/video/z-2tdkJ0Yzc/v-deo.htmlsi=ytQRR-rmCooB1sfO
@@SanderKonijnenberg First and foremost thanks for your reply! Point 3 isnt clear to me. So if I understand you correctly: 1: define a point source in the object plane: Point = zeros(3000x3000) and then set Point(1000,2000)=1 for example. 2: Next take the FFT: Four_Point = fftshift(fft2(Point)) 3: truncate Four_point with the aperature function -> What exactly do you mean if you say ‘’truncate it with’’? Do you mean to say that I should set all values in the aperture matrix to zero whenever the Four_Point is nonzero? Should the aperture function (say P0) be defined in real space or should it also be the fourier transform? 4: Apply \Delta W: So the result from point 3 (say Matrix ‘’R”): R*exp(^i*k*\Delta W) 5: Inverse Fourier: this is straightforward (and if not, I guess the previous points are the problem for the time being anyways). On a more general note: Am I correct to say that the wavefront error is the additional optical path difference we need to add for rays to pass through the aperture to converge to the ideal image in the image plane? When calculating the PSF using the wavefront error, do we then determine it at the hight of the aperture or the image plane (in other words: If I wish to determine the image on my detector, do I still need to propagate the result. If yes: I guess I can use the FFT(PSF)*h, where h is the propagation function). Thanks a lot!
@@brisingreye5209 About point 3: the aperture function is defined in Fourier space. Your quantity 'Four_Point' is a plane wave, so it is non-zero everywhere. It should be truncated by the aperture, i.e. the field should be set to zero outside the aperture. If you (inverse) Fourier transform this truncated plane wave (without introducing the wafevront error \Delta W), you should get an Airy disk whose position depends on the location of the point source in the object plane (see 17:53). The smaller you make your aperture, the larger the Airy disk. The wavefront error is the additional optical pathlength compared to the ideal spherical wavefront. If the spherical wavefront is approximated as quadratic (Fresnel approximation), then it cancels out with the Fresnel propagator when we propagate the field from the pupil plane to the image plane (see 18:27). Therefore, the wavefront error is determined at the height of the aperture plane, and the PSF is determined at the height of the image plane. The propagation from aperture plane to image plane is fully incorporated in the Fourier transform, because the Fresnel propagator cancels with the ideal quadratic wavefront, onto which the wavefront error is added.
@@SanderKonijnenberg Thanks alot! I got 3 more questions I would like to ask: Question 1: I got it to work somewhat properly, in the sense that it now forms a PSF based on the distance with respect to the optical axis. However it does not correct for the angle it makes with regards to the x-axis. (so the PSF of the upper left corner would be identical to that of the right upper corner and (besides the somewhat smaller h) to those on the x-axis). Question 2: I am somewhat confused by the notion that the aperture is defined in fourier space, although it depends on spatial coordinates. As an experimentalist (trying out python calculations) I know that you can build an 4f system and place an (physical) aperture to block part of the spatial frequencies within the fourier plane. So I wrongly assumed the radius of the aperture used in the code (rho) to correspond to a spatial distance. In actually fact it thus corresponds to the spatial frequencies that are allowed to pass through the aperture. How then are the physical dimensions of the aperture related to those in fourier space (at what hight rho, would you expect a certain frequency k_y)? I am also wondering how it relates to the impulse response of an optical system (as I wrongly assumed them to be one and the same thing). Question 3: Did you make a video (or are you planning to make one) relating the aperture and the wavefront errors to an optical system (say some simple lens system)? I would be really helpful to how they relate and thus how one can effect the image quality by changing/adjusting the optical system? If the answer is no, do you happen to know a great source of information that can help me on my way (once I have successfully reproduced the results as shown in your great video!)
Great work! That's really a fantastic and clear presentation!
Simply fantastic video! Thanky for sharing and well done!
I just want you to know that you made an incredible work! It teaches me lots of things as an optics related product manager. Thanks and looking forward to more of it!
Congratulations ! Very well made !
Great work! Learn a lot from this video. Thanks!!
This is great. Thank you!
Thx
great work!
thank you
Great work! Helps me a lot in understanding aberrations. I have one question though, that you mentioned multiple times that in an ideal optical system, rays from a point converges to a point. But in wavefront aberration calculation, how does this starting point determined? will the starting point'l location affect the wavefront aberration we get? And how do we determine the shape of the idea optical system, when we don't have one design, say in corneal wavefront aberration analysis? Looking forward to your reply!
Indeed, in general the wavefront error can be different for different object points. The Seidel aberrations for example express a dependence on the object point location. However, there are many cases where the wavefront error can be approximated to be independent of the object point location (i.e. the aberrations are isoplanatic), for example in imaging systems with a low numerical aperture.
Unfortunately, I have no particular expertise in corneal wavefront analysis. But if I had to guess, I would try to parametrize the shape of the cornea, measure the wavefront error for various wavelengths, and then try to fit the parameters to the measured data?
@Sander thanks for your great video!
I am trying to reproduce your results shown at @30:29 using python. However I am unsure how to do so. I did define a 2D array containing 9 point sources. However I am unsure how to then determine the diffraction patterns as shown in your image.
Could you maybe explain your steps taken (or provide a part if your code)?
Looking a bit closer at the expressions I am a bit confused as how you define the ''h'' in your Delta W. It appears as the magnitude of the vector (from optical axis to the point source). I did use the equation in which we set x=rho*cos(theta) (which then puts the h along the x-axis).
So i guess I need to use the polar system instead. However then I still dont understand how you determine the angle theta and the magnitude rho in order to produce your plots.
@@brisingreye5209 Phi and rho are the polar coordinates of the pupil, which is in Fourier space. So you'd do the following:
- Pick a point source in the object plane with a certain position vector .
- Fourier transform the point source (this should give a linear phase ) and truncate it with the pupil/aperture.
- Apply the phase error \Delta W in the pupil. rho and phi are the polar coordinates in the pupil (where phi is the angle between and , to ensure rotational symmetry of the system). At the edge of the pupil, rho should equal 1. The strength of this phase error can depend on h, i.e. the farther away the point source from the optical axis, the larger the phase error in the pupil.
- (Inverse) Fourier transform the pupil function to obtain the PSF for the point source.
- Do this for all point sources in the grid to obtain a figure as shown in the video
I explain in more detail how to calculate PSFs with Fourier transforms here: ua-cam.com/video/z-2tdkJ0Yzc/v-deo.htmlsi=ytQRR-rmCooB1sfO
@@SanderKonijnenberg First and foremost thanks for your reply!
Point 3 isnt clear to me. So if I understand you correctly:
1: define a point source in the object plane: Point = zeros(3000x3000) and then set Point(1000,2000)=1 for example.
2: Next take the FFT: Four_Point = fftshift(fft2(Point))
3: truncate Four_point with the aperature function -> What exactly do you mean if you say ‘’truncate it with’’? Do you mean to say that I should set all values in the aperture matrix to zero whenever the Four_Point is nonzero? Should the aperture function (say P0) be defined in real space or should it also be the fourier transform?
4: Apply \Delta W: So the result from point 3 (say Matrix ‘’R”): R*exp(^i*k*\Delta W)
5: Inverse Fourier: this is straightforward (and if not, I guess the previous points are the problem for the time being anyways).
On a more general note:
Am I correct to say that the wavefront error is the additional optical path difference we need to add for rays to pass through the aperture to converge to the ideal image in the image plane?
When calculating the PSF using the wavefront error, do we then determine it at the hight of the aperture or the image plane (in other words: If I wish to determine the image on my detector, do I still need to propagate the result. If yes: I guess I can use the FFT(PSF)*h, where h is the propagation function).
Thanks a lot!
@@brisingreye5209
About point 3: the aperture function is defined in Fourier space. Your quantity 'Four_Point' is a plane wave, so it is non-zero everywhere. It should be truncated by the aperture, i.e. the field should be set to zero outside the aperture. If you (inverse) Fourier transform this truncated plane wave (without introducing the wafevront error \Delta W), you should get an Airy disk whose position depends on the location of the point source in the object plane (see 17:53). The smaller you make your aperture, the larger the Airy disk.
The wavefront error is the additional optical pathlength compared to the ideal spherical wavefront. If the spherical wavefront is approximated as quadratic (Fresnel approximation), then it cancels out with the Fresnel propagator when we propagate the field from the pupil plane to the image plane (see 18:27). Therefore, the wavefront error is determined at the height of the aperture plane, and the PSF is determined at the height of the image plane. The propagation from aperture plane to image plane is fully incorporated in the Fourier transform, because the Fresnel propagator cancels with the ideal quadratic wavefront, onto which the wavefront error is added.
@@SanderKonijnenberg Thanks alot! I got 3 more questions I would like to ask:
Question 1:
I got it to work somewhat properly, in the sense that it now forms a PSF based on the distance with respect to the optical axis. However it does not correct for the angle it makes with regards to the x-axis. (so the PSF of the upper left corner would be identical to that of the right upper corner and (besides the somewhat smaller h) to those on the x-axis).
Question 2:
I am somewhat confused by the notion that the aperture is defined in fourier space, although it depends on spatial coordinates. As an experimentalist (trying out python calculations) I know that you can build an 4f system and place an (physical) aperture to block part of the spatial frequencies within the fourier plane. So I wrongly assumed the radius of the aperture used in the code (rho) to correspond to a spatial distance. In actually fact it thus corresponds to the spatial frequencies that are allowed to pass through the aperture. How then are the physical dimensions of the aperture related to those in fourier space (at what hight rho, would you expect a certain frequency k_y)? I am also wondering how it relates to the impulse response of an optical system (as I wrongly assumed them to be one and the same thing).
Question 3:
Did you make a video (or are you planning to make one) relating the aperture and the wavefront errors to an optical system (say some simple lens system)? I would be really helpful to how they relate and thus how one can effect the image quality by changing/adjusting the optical system?
If the answer is no, do you happen to know a great source of information that can help me on my way (once I have successfully reproduced the results as shown in your great video!)