Giter VIP home page Giter VIP logo

Comments (4)

FredvanGoor avatar FredvanGoor commented on August 11, 2024

Hi bzbaz,
You have to choose a correct aberration to reproduce the figure. It is vertical coma, the aberration is some wavelengths. The code below will reproduce the figure closely. (Sorry, I forgot the exact parameters for the figure...)

Fred van Goor.

#! /usr/bin/env python
from LightPipes import *
import matplotlib.pyplot as plt

wavelength=632.8*nm #wavelength of HeNe laser
size=15*mm # size of the grid
N=500 # number (NxN) of grid pixels
R=7*mm # laser beam radius
z1=8*cm # length of arm 1
z2=7*cm # length of arm 2
z3=3*cm # distance laser to beamsplitter
z4=5*cm # distance beamsplitter to screen
Rbs=0.5 # reflection beam splitter
tx=0*mrad; ty=0.0*mrad # tilt of mirror 1


#Generate a weak converging laser beam using a weak positive lens:
F=Begin(size,wavelength,N)
F=GaussBeam(F, R)

#Propagate to the beamsplitter:
F=Forvard(z3,F)

#Split the beam and propagate to mirror #2:
F2=IntAttenuator(1-Rbs,F)
F2=Forvard(z2,F2)

#Introduce aberration and propagate back to the beamsplitter:
F2=Tilt(tx,ty,F2)
F2=Zernike(F2, 3, -1, 6*mm, A=1.03*wavelength)
F2=Forvard(z2,F2)
F2=IntAttenuator(Rbs,F2)

#Split off the second beam and propagate to- and back from the mirror #1:
F10=IntAttenuator(Rbs,F)
F1=Forvard(z1*2,F10)
F1=IntAttenuator(1-Rbs,F1)

#Recombine the two beams and propagate to the screen:
F=BeamMix(F1,F2)
F=Forvard(z4,F)
I=Intensity(1,F)

plt.imshow(I,cmap='jet'); plt.axis('off');plt.title('intensity pattern')
plt.show()

from lightpipes.

FredvanGoor avatar FredvanGoor commented on August 11, 2024

I forgot to mention that you should also change one of the lengths (z1 or z2) of an arm with some fraction of a wavelength to fine-tune the result...

from lightpipes.

bcbaz avatar bcbaz commented on August 11, 2024

Thanks a lot. This works for me. I want to use the result in an art project. Hope this is OK for you.

from lightpipes.

FredvanGoor avatar FredvanGoor commented on August 11, 2024

from lightpipes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.