lightpipes icon indicating copy to clipboard operation
lightpipes copied to clipboard

How to get interferogram from michelson interferometer instead of fringe pattern

Open millermuttu opened this issue 3 years ago • 4 comments

Hi, i am curious to study and look into interferogram pattern, rather than looking at spherical fringe pattern in Michelson interferometer. can anyone please help me with this?

I tried tapping the intensity at middle value of my N*N fringe pattern, but getting weird pattern of interferogram. when a single wavelength goes under a interference it should loom like a cos or sine wave, but i am not able to get that am i missing something?

millermuttu avatar Oct 23 '20 06:10 millermuttu

Could you provide us with a script to demonstrate the problem?

FredvanGoor avatar Oct 26 '20 11:10 FredvanGoor

@FredvanGoor, thanks for the reply,

i am attaching the code i used to get the Michelson interferogram with movement of mirrors.

from LightPipes import *
import matplotlib.pyplot as plt
import numpy as np
import csv

wavelength=550*nm #wavelength of laser
size=10*mm # size of the grid
N=300 # number (NxN) of grid pixels
R=3*mm # laser beam radius
z1=8*cm # length of arm 1
z2=8.5*cm # length of arm 2
z3=3*cm # distance laser to beamsplitter
z4=3*cm # distance beamsplitter to screen
Rbs=0.5 # reflection beam splitter
tx=0.0*mrad; ty=0.0*mrad # tilt of mirror 2
f=50*cm # focal length of positive lens
stepsize = 100*1000*nm
start = z2
end = 7.5*cm
I_all_up = []
I_all_down = []
delta_up = []
delta_down = []
I_mid_line_up = []
I_mid_line_down = []


##### Up movement
for i in np.arange(start,end,-stepsize):
    print(i)
    z2 = i
    delta = 2*(z1-z2)
    #Generate a weak converging laser beam using a weak positive lens:
    F=Begin(size,wavelength,N)
    #F=GaussBeam(F, R)
    #F=GaussHermite(F,R,0,0,1) #new style
    #F=GaussHermite(F,R) #new style
    F=GaussHermite(0,0,1,R,F) #old style
    F=Lens(f,0,0,F)

    #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 tilt and propagate back to the beamsplitter:
    F2=Tilt(tx,ty,F2)
    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(F,0)

    # tap the mid line of fringe pattern
    I_mid_line_up.append(I[:,150])

    # I_sum = np.sum(I)
    I_sum_20 = I[int(N/2)-1,int(N/2)-1]
    # I_sum_up = I[140:160,140:160]
    # I_sum_20 = np.sum(I_sum_up)
    I_all_up.append(I_sum_20)
    # I_all.append(I_sum)
    delta_up.append(delta)

plt.figure(1)
plt.plot(delta_up,I_all_up)
plt.title("Taking center point of fringe pattern")
plt.xlabel('Optical path diffrence')
plt.ylabel('Intensity')
plt.show()
# plt.imshow(I,cmap='jet'); plt.axis('off');plt.title('intensity pattern')
# plt.show()

### down movement

for i in np.arange(end,start,stepsize):
    print(i)
    z2 = i
    delta = 2*(z1-z2)
    #Generate a weak converging laser beam using a weak positive lens:
    F=Begin(size,wavelength,N)
    #F=GaussBeam(F, R)
    #F=GaussHermite(F,R,0,0,1) #new style
    #F=GaussHermite(F,R) #new style
    F=GaussHermite(0,0,1,R,F) #old style
    F=Lens(f,0,0,F)

    #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 tilt and propagate back to the beamsplitter:
    F2=Tilt(tx,ty,F2)
    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(F,0)

    # I_sum = np.sum(I)
    I_sum_20 = I[int(N/2)-1,int(N/2)-1]
    # I_sum = I[140:160,140:160]
    # I_sum_20 = np.sum(I_sum)
    I_all_down.append(I_sum_20)
    # I_all.append(I_sum)
    delta_down.append(delta)

plt.figure(2)
plt.plot(delta_down,I_all_down)
plt.title("Taking center point of fringe pattern")
plt.xlabel('Optical path diffrence')
plt.ylabel('Intensity')
plt.show()
# plt.imshow(I,cmap='jet'); plt.axis('off');plt.title('intensity pattern')
# plt.show()

Interferogram = [i+j for i,j in zip(I_all_down,I_all_up)]
plt.figure(3)
plt.plot(Interferogram)
plt.xlabel('steps')
plt.ylabel('I')
plt.show()

######## saving data to csv

file = open(f'{int(wavelength*10**9)}.csv', 'a+', newline ='')
with file:
    writer = csv.writer(file)
    writer.writerow(['Wavelength(nm)',wavelength*10**9])
    writer.writerow(['move_up'])
    writer.writerow(I_all_up)
    writer.writerow(['move_down'])
    writer.writerow(I_all_down)
    writer.writerow(['Interferogram'])
    writer.writerow(Interferogram)
    writer.writerow('\n')

as tried upward and downward movement of the mirror and was trying to tap the intensity at the middle point of springe pattern (in this case we have 300x300 fringe pattern and i am taking intensity at (300/2)-1.

millermuttu avatar Oct 27 '20 07:10 millermuttu

You should scan a few wavelengths and with a step size a fraction of the wavelength. In this way you get a smooth (co)sine. Below your script with a few changes:

from LightPipes import *
import matplotlib.pyplot as plt
import numpy as np
import csv

wavelength=550*nm #wavelength of laser
size=10*mm # size of the grid
N=300 # number (NxN) of grid pixels
R=3*mm # laser beam radius
z1=8*cm # length of arm 1
z2=8.5*cm # length of arm 2
z3=3*cm # distance laser to beamsplitter
z4=3*cm # distance beamsplitter to screen
Rbs=0.5 # reflection beam splitter
tx=0.0*mrad; ty=0.0*mrad # tilt of mirror 2
f=50*cm # focal length of positive lens
#stepsize = 100*1000*nm
stepsize=wavelength/50
start = z2
#end = 7.5*cm
end = z2-3*wavelength
I_all_up = []
I_all_down = []
delta_up = []
delta_down = []
I_mid_line_up = []
I_mid_line_down = []



##### Up movement
for i in np.arange(start,end,-stepsize):
    print(i)
    z2 = i
    delta = 2*(z1-z2)
    #Generate a weak converging laser beam using a weak positive lens
    F=Begin(size,wavelength,N)
    #F=GaussBeam(F, R)
    #F=GaussHermite(F,R,0,0,1) #new style
    #F=GaussHermite(F,R) #new style
    F=GaussHermite(0,0,1,R,F) #old style
    F=Lens(f,0,0,F)
    
    #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 tilt and propagate back to the beamsplitter:
    F2=Tilt(tx,ty,F2)
    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(F,0)

    # tap the mid line of fringe pattern
    I_mid_line_up.append(I[:,150])

    # I_sum = np.sum(I)
    I_sum_20 = I[int(N/2)-1,int(N/2)-1]
    # I_sum_up = I[140:160,140:160]
    # I_sum_20 = np.sum(I_sum_up)
    I_all_up.append(I_sum_20)
    # I_all.append(I_sum)
    delta_up.append(z2/nm) #plot delta in nm's

plt.figure(1)
plt.plot(delta_up,I_all_up)
plt.title("Taking center point of fringe pattern")
plt.xlabel('Optical path diffrence')
plt.ylabel('Intensity')
plt.show()
# plt.imshow(I,cmap='jet'); plt.axis('off');plt.title('intensity pattern')
# plt.show()

### down movement

for i in np.arange(end,start,stepsize):
    print(i)
    z2 = i
    delta = 2*(z1-z2)
    #Generate a weak converging laser beam using a weak positive lens:
    F=Begin(size,wavelength,N)
    #F=GaussBeam(F, R)
    #F=GaussHermite(F,R,0,0,1) #new style
    #F=GaussHermite(F,R) #new style
    F=GaussHermite(0,0,1,R,F) #old style
    F=Lens(f,0,0,F)

    #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 tilt and propagate back to the beamsplitter:
    F2=Tilt(tx,ty,F2)
    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(F,0)

    # I_sum = np.sum(I)
    I_sum_20 = I[int(N/2)-1,int(N/2)-1]
    # I_sum = I[140:160,140:160]
    # I_sum_20 = np.sum(I_sum)
    I_all_down.append(I_sum_20)
    # I_all.append(I_sum)
    delta_down.append(delta/nm) #plot delta in nm's

plt.figure(2)
plt.plot(delta_down,I_all_down)
plt.title("Taking center point of fringe pattern")
plt.xlabel('Optical path diffrence')
plt.ylabel('Intensity')
plt.show()
# plt.imshow(I,cmap='jet'); plt.axis('off');plt.title('intensity pattern')
# plt.show()

Interferogram = [i+j for i,j in zip(I_all_down,I_all_up)]
plt.figure(3)
plt.plot(Interferogram)
plt.xlabel('steps')
plt.ylabel('I')
plt.show()

######## saving data to csv

file = open(f'{int(wavelength*10**9)}.csv', 'a+', newline ='')
with file:
    writer = csv.writer(file)
    writer.writerow(['Wavelength(nm)',wavelength*10**9])
    writer.writerow(['move_up'])
    writer.writerow(I_all_up)
    writer.writerow(['move_down'])
    writer.writerow(I_all_down)
    writer.writerow(['Interferogram'])
    writer.writerow(Interferogram)
    writer.writerow('\n')`

FredvanGoor avatar Oct 29 '20 10:10 FredvanGoor

@FredvanGoor thank you so much for the pointing out the problem and correction, it helps a lot. and i observed that tilt in the mirror effects the co(sine) by changing the intensity value unless as in fringe Patten where shape of fringe gets distorted. is it the right behavior?

I was also thinking is it possible to simulate the interferogram for bunch of wavelengths instead of single wavelength?

millermuttu avatar Oct 30 '20 12:10 millermuttu