Fourier Optics in Python
HTML-код
- Опубликовано: 5 авг 2024
- I must give credit to the channel "Simulating Physics", as the examples used in this video were motivated by some of the examples in the following GitHub repository:
github.com/rafael-fuente/diff...
In this video I briefly touch on the theory of Fourier optics and show how to implement the derived expressions in python to confirm common diffraction patterns, such as that of the single and double slit.
Code:
github.com/lukepolson/youtube...
Discord Server:
/ discord Наука
Mr. P Solver, the video is good but I think you should also give credit in the video description to my work and code since you used it as the base for your video, and I worked really hard to get it done.
It's a shame he didn't give you the credit, the hexagon example he used is even the same.
Your Diffractsim simulator on GitHub simulator is amazing.
Mr. P Solver behavior on this video is unfair and selfish.
Sure, I'll add it right away! Apologies for not including this immediately; truly my mistake.
@@MrPSolver Thank you! I saw you finally added it, it is enough 🙂
And best wishes with your channel and your PhD
Really exciting content, dude! It's very nice to revisit some stuffs that need some sort of beef up! Thank you so much!
I can definitely feel the increase in my IQ since I've discovered your channel!
Yes, we want more videos on Fourier Optics. Thank you very much.
Loved your pronounciation of Nyquist :D The proper pronounciation is like Newqvist. Thanks for the great video, once again!
This is really cool. Thanks for sharing your knowledge! :))
Amazing video! I'm in my learning curve of Fourier optics and these simulations are amazing. I think a video working with lens 1f system or more complex systems (4f systems) will be incredibly welcome 😀
Jorge, I made a video simulating 4f systems and more complex systems. Mr. P Solver has mostly copied and pasted my work, even with the same examples I did, without giving appropriate credit.
@@SimulatingPhysics I just found your work as well! I found odd the code looked so similar, it's a shame he didn't give you the credit! Your job is amazing btw!!
@ I talked with him, finally, he added the credit 🙂
Very good job man... may nature bless you.
Great video! Thank you!
Thank you so much for this video It saved my Masters project!!!
Jeeez thanks for these, best channel going
Just watched this one! Looks amazing! Rgb optics sounds awesome. Caustics too perhaps? Anything optics!
Through all my years of studying physics and engineering, I've found modeling with python as far and away the best method. It works or it doesn't, and the syntax is reasonably human readable. Great tutorials 🤙
Wow, you must have read my mind. I am currently working with Professor Goodman's book on Fourier Optics, looking at his treatment of holograms. Maybe you can look at that chapter also, hint, hint.
H H, I already made videos treatment holograms. Mr. P Solver has mostly copied and pasted my work and code, even with the same examples I did, without giving appropriate credit.
Im all for more fourier optics!
I would love to see the white light case. Also the case were the input to the slit comes from off axis plane waves would be another neat example.
very cool background score. production value has increased.
Cool video! Very interesting! Suggestion for a follow up video: Implement a lens or even multiple lenses. That would be nice!
Kai I already implement and did it with multiple lenses. Mr. P Solver has mostly copied and pasted my work, even with the same examples I did, without giving appropriate credit.
@@SimulatingPhysics I checked out your videos. I cannot not see where Mr. P Solver should have copied anything. Also your github code looks completely different.
Additionally, the video here covers basic fourier optics. Citing a physics text book is fine, but not another youtube channel.
Accusing Mr. P Solver of copying and pasting your work is very bad practice and not true.
@@Fuxx90 Yes, he used my work for this video, but it's not a problem anymore, I talked yesterday with him and he left a reference in the video description, which it's all was needed.
Thank you so much!
I have some confusions. When do we have to use the fftshift and ifftshift?
beautiful patterns
Mr. P Solver I have a question for you. How do you code plotting the resultant of three vectors using a polygon method? All in all there are four vectors that form a polygon.
Do more of these :)
Thanks Mr P Solver, amazing explanation,There is one thing I don't quite understand. when you try to solve The Helmholtz Equation, you wrote"The general solution for a particular problem won't be seperable, but it can be written as the sum of infinitely many seperable solutions". Is that because you assumed that each solution are orthogonal with each other? like what we do in fourier transfer? Can we always do this when solving pde? Thank you so much.
How about XRD pattern from a atomic lattice? Great stuff!
I hope to watch more about the application of python in making optical simulation.
Niladri, I already made more videos about the application of python in making optical simulations. Mr. P Solver has mostly copied and pasted my work and code, even with the same examples I did, without giving appropriate credit.
EDIT: I talked with Mr. P Solver and he finally added the reference credit in the video description, so nevermind
Thank you. The jupyter notebook is just very helpful. I've know light propagation theory quite well but I can hardly find any reference to teach me how to simulate propagation with python from scratch.
i have an error using the plt.style.use(['science', 'notebook']) on the libraries. Anyone knows how to fix it?
I thoroughly enjoyed your video - good job! I performed diffractive optical experiments which I confirmed with Fourier optical propagation models in Mathematica as part of my PhD. Do you make your code available? It would be a useful jumping-off point for students.
The link to the code is listed in the description.
The Other Me. I have already made a full python Fourier optical propagation simulator and videos about that.
Mr. P Solver has mostly copied and pasted my work and code, even with the same examples I did, without giving appropriate credit.
EDIT: I talked with Mr. P Solver and he finally added the reference credit in the video description 🙂
Can you teach finite difference time domain method to simulate the fourier optic problem somthing like compare to this channel problem?
Experiment 2:
And although, on trial,
plt.pcolormesh(xv, yv, U0)
was able to cope with `U0` as Boolean array,
it was indicated that an explicit type conversion to `float` was required.
Thus:
U0 = U0.astype(float) 🤔
Haha I am going to do it this summer for my summer project.
Can someone direct me to some good resources to learn Fourier optics? I have this course coming semester and I want to prepare a bit ahead.
Please upload some videos on CGH optimisation for optimised target 3D reconstruction.
Great
Why is at 17:30 there is no minus in the exponent? In 17:17 it's there, i don't quite understand
Excellent job on the video. I want to see more on Fourier optics all using python. Maybe make a series of videos on explaining Fourier optics right from the beginning, and all the necessary maths in python. I could certainly benefit from learning how to translate these equations into python programs so that I can clearly follow different concepts and their manifestations through python simulation, without having the need for an expensive optics lab.
Do you have resources to learn Fourier optics for beginners?
@@pascal3458 I'm looking for python based Fourier optics materials. Do you have any that you can recommend. Thanks 😊👍
@@optiondrone5468 Unfortunately no, I was looking for a good resource to learn Fourier optics
" self-study"
@@pascal3458 me too, I'll let you know if I come across a good source. I know there are materials but they're all very scattered. Like you I'm also doing self study
@@optiondrone5468 ok, thanks :)
Such useful videos. Email to reach out?
Subscribing might enhance mi IQ but I always feel dumber after watching your very interesting videos :-))
"Hello Stephen, I've seen your site bro.."
So the comment about fftshift is incorrect. It doesn't have to do with the negative frequencies or the Nyquist criterion, but with the structure of the FFT of your data. When you apply the FFT or the full DFT, the low frequencies are at the edges of the array and the high frequencies are at the center and then in mirrors the structure for the negative frequencies:
FFT[x] = [low -> high freq : high -> low].
But we're used to thinking of zero as being in the center of a plot, not at the start and the end. fftshift just moves the data around so the Fourier Transform looks like a FT we expect.
Thank you for this; I must have mis-spoken. Can you let me know what time this was at so I can make/pin a comment correcting this?
@@MrPSolver 16:03 is about where you begin discussing the function.
please do videos about simulating back focal plane imaging in python. thank you so much.
Would really like to see white light demo
Brody, I already implement and did it with white light. Mr. P Solver has mostly copied and pasted my work, even with the same examples I did, without giving appropriate credit.
Great videos thanks again your subject are always very interesting! Are you going to do one on fluid simulation or one related to astrophysics and especially how to read and analyse fits files for examples ? Thanks
I'd love to do more on imaging (related to cosmology maybe) but not really an expert on fluid simulation
this video series on fluid simulations was the most advanced and up to date I have found so far: ruclips.net/video/MXs_vkc8hpY/видео.html&ab_channel=braintruffle
Kindly explain theoretically mathematical expression of reconstruction of holography
Sir, I'm physicist and love your video, but to have more subscribers I suggest you to make one full course video,
e.g. Python from begneers to advanced (for data science, deep learning, machin learning, ....), and then
computational physics,
quantum or statistical physics,
medical physics
keep it up🙏
sheeeesshhh
keeps telling me Magnitude model not found in plotlib
bam thats how fresnel lenses were born
Hi Sir, the commands:
import imageio
import cv
import pint
caused errror in my notebook after I tried copying and running the program. I removed them and ran the program. I got a different result. 🥲
I really need your help. 😭