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
  • НаукаНаука

Комментарии • 75

  • @SimulatingPhysics
    @SimulatingPhysics 2 года назад +18

    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.

    • @williamjohnson7578
      @williamjohnson7578 2 года назад +3

      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.

    • @MrPSolver
      @MrPSolver  2 года назад +6

      Sure, I'll add it right away! Apologies for not including this immediately; truly my mistake.

    • @SimulatingPhysics
      @SimulatingPhysics 2 года назад +6

      @@MrPSolver Thank you! I saw you finally added it, it is enough 🙂
      And best wishes with your channel and your PhD

  • @ShinjiCarlos
    @ShinjiCarlos 2 года назад +1

    Really exciting content, dude! It's very nice to revisit some stuffs that need some sort of beef up! Thank you so much!

  • @Science4Ever
    @Science4Ever 2 года назад +5

    I can definitely feel the increase in my IQ since I've discovered your channel!

  • @tilkesh
    @tilkesh 11 месяцев назад

    Yes, we want more videos on Fourier Optics. Thank you very much.

  • @Nickname006
    @Nickname006 2 года назад +1

    Loved your pronounciation of Nyquist :D The proper pronounciation is like Newqvist. Thanks for the great video, once again!

  • @chinaskarina698
    @chinaskarina698 2 года назад +4

    This is really cool. Thanks for sharing your knowledge! :))

  •  2 года назад +10

    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 😀

    • @SimulatingPhysics
      @SimulatingPhysics 2 года назад +1

      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.

    •  2 года назад +2

      @@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!!

    • @SimulatingPhysics
      @SimulatingPhysics 2 года назад +2

      @ I talked with him, finally, he added the credit 🙂

  • @vignanabharathi3619
    @vignanabharathi3619 2 года назад +1

    Very good job man... may nature bless you.

  • @mikekertser5384
    @mikekertser5384 2 года назад +1

    Great video! Thank you!

  • @pokekeish
    @pokekeish 8 месяцев назад

    Thank you so much for this video It saved my Masters project!!!

  • @typeer
    @typeer 2 года назад

    Jeeez thanks for these, best channel going

  • @pythonixed4448
    @pythonixed4448 2 года назад +1

    Just watched this one! Looks amazing! Rgb optics sounds awesome. Caustics too perhaps? Anything optics!

  • @treborsenaj9169
    @treborsenaj9169 2 года назад +10

    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 🤙

  • @HH-mw4sq
    @HH-mw4sq 2 года назад +5

    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.

    • @SimulatingPhysics
      @SimulatingPhysics 2 года назад +2

      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.

  • @aliexpress.official
    @aliexpress.official 2 года назад +1

    Im all for more fourier optics!

  • @andrewdavies2358
    @andrewdavies2358 3 месяца назад

    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.

  • @vivekacharya3652
    @vivekacharya3652 2 года назад

    very cool background score. production value has increased.

  • @Fuxx90
    @Fuxx90 2 года назад +3

    Cool video! Very interesting! Suggestion for a follow up video: Implement a lens or even multiple lenses. That would be nice!

    • @SimulatingPhysics
      @SimulatingPhysics 2 года назад

      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.

    • @Fuxx90
      @Fuxx90 2 года назад

      @@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.

    • @SimulatingPhysics
      @SimulatingPhysics 2 года назад

      ​@@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.

  • @sorawichmaichum1705
    @sorawichmaichum1705 Год назад +1

    Thank you so much!
    I have some confusions. When do we have to use the fftshift and ifftshift?

  • @0xde57
    @0xde57 2 года назад

    beautiful patterns

  • @lajuelar
    @lajuelar 2 года назад +1

    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.

  • @sphericalfoxooo1446
    @sphericalfoxooo1446 2 года назад +1

    Do more of these :)

  • @jx4864
    @jx4864 Год назад +1

    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.

  • @NaneRulz
    @NaneRulz 2 года назад +3

    How about XRD pattern from a atomic lattice? Great stuff!

  • @niladriganguly8601
    @niladriganguly8601 2 года назад

    I hope to watch more about the application of python in making optical simulation.

    • @SimulatingPhysics
      @SimulatingPhysics 2 года назад

      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

  • @liukdiihmieu
    @liukdiihmieu 7 месяцев назад

    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.

  • @victorcampos5598
    @victorcampos5598 Год назад

    i have an error using the plt.style.use(['science', 'notebook']) on the libraries. Anyone knows how to fix it?

  • @LieslBurger
    @LieslBurger 2 года назад +3

    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.

    • @joshissa8420
      @joshissa8420 2 года назад +1

      The link to the code is listed in the description.

    • @SimulatingPhysics
      @SimulatingPhysics 2 года назад +1

      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 🙂

  • @kuanruchiou583
    @kuanruchiou583 2 года назад

    Can you teach finite difference time domain method to simulate the fourier optic problem somthing like compare to this channel problem?

  • @frankkoslowski6917
    @frankkoslowski6917 Год назад +1

    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) 🤔

  • @ramanujraman_
    @ramanujraman_ 2 года назад

    Haha I am going to do it this summer for my summer project.

  • @NN-en2vg
    @NN-en2vg 7 месяцев назад

    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.

  • @niladriganguly8601
    @niladriganguly8601 2 года назад

    Please upload some videos on CGH optimisation for optimised target 3D reconstruction.

  • @MuhammadAwais-vi8de
    @MuhammadAwais-vi8de 2 года назад

    Great

  • @alexandronny
    @alexandronny 2 года назад

    Why is at 17:30 there is no minus in the exponent? In 17:17 it's there, i don't quite understand

  • @optiondrone5468
    @optiondrone5468 2 года назад +1

    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.

    • @pascal3458
      @pascal3458 Год назад +1

      Do you have resources to learn Fourier optics for beginners?

    • @optiondrone5468
      @optiondrone5468 Год назад

      @@pascal3458 I'm looking for python based Fourier optics materials. Do you have any that you can recommend. Thanks 😊👍

    • @pascal3458
      @pascal3458 Год назад

      @@optiondrone5468 Unfortunately no, I was looking for a good resource to learn Fourier optics
      " self-study"

    • @optiondrone5468
      @optiondrone5468 Год назад

      @@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

    • @pascal3458
      @pascal3458 Год назад

      @@optiondrone5468 ok, thanks :)

  • @ravishanker8539
    @ravishanker8539 Год назад

    Such useful videos. Email to reach out?

  • @prietjepruck
    @prietjepruck Год назад

    Subscribing might enhance mi IQ but I always feel dumber after watching your very interesting videos :-))

  • @idiosinkrazijske.rutine
    @idiosinkrazijske.rutine 2 года назад

    "Hello Stephen, I've seen your site bro.."

  • @thomasdarlington4916
    @thomasdarlington4916 2 года назад

    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.

    • @MrPSolver
      @MrPSolver  2 года назад

      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?

    • @thomasdarlington4916
      @thomasdarlington4916 2 года назад

      @@MrPSolver 16:03 is about where you begin discussing the function.

  • @linhtruong7053
    @linhtruong7053 Год назад

    please do videos about simulating back focal plane imaging in python. thank you so much.

  • @brodysnook1231
    @brodysnook1231 2 года назад

    Would really like to see white light demo

    • @SimulatingPhysics
      @SimulatingPhysics 2 года назад

      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.

  • @Louis-ml1zr
    @Louis-ml1zr 2 года назад +4

    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

    • @MrPSolver
      @MrPSolver  2 года назад

      I'd love to do more on imaging (related to cosmology maybe) but not really an expert on fluid simulation

    • @markusheimerl8735
      @markusheimerl8735 2 года назад

      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

  • @mercychepkurui5866
    @mercychepkurui5866 5 месяцев назад

    Kindly explain theoretically mathematical expression of reconstruction of holography

  • @HizBela_16
    @HizBela_16 2 года назад +2

    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🙏

  • @muhammadaarizmarzuq295
    @muhammadaarizmarzuq295 2 года назад

    sheeeesshhh

  • @saidteacher3331
    @saidteacher3331 Год назад

    keeps telling me Magnitude model not found in plotlib

  • @thewokal5641
    @thewokal5641 2 года назад +1

    bam thats how fresnel lenses were born

  • @marcolaurencebudlayan4749
    @marcolaurencebudlayan4749 Год назад

    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. 😭