spacetelescope / poppy

Physical Optics Propagation in Python
https://poppy-optics.readthedocs.io
BSD 3-Clause "New" or "Revised" License
207 stars 68 forks source link

Interference of wavefronts? #470

Open mdhoney opened 2 years ago

mdhoney commented 2 years ago

Thanks for this great package! I have been able to propagate a FresnelWavefront and am now trying to interfere it with a reference wave (in order to model a simple hologram). Do you think this is possible with POPPY?

mperrin commented 2 years ago

Hi, and thanks for the kind words. In principle yes I think this should be straightforward enough, though I don’t know if anyone has yet tried modeling holograms (so there may be some subtleties or gotchas that I’m not aware of; holography is not an area of optics that I have much direct familiarity with)

Two wavefronts can be added together straightforwardly, via the + operator. This is overloaded for Wavefront objects so it will add them as complex wavefront arrays. Then you can take the intensity of the resulting combined wavefront to get the interference pattern. I believe something like that should work, so please give it a try and post results or problems here - I’ll do what I can to help support, time permitting (this is a very busy time for me!)