Aufgrund einer Wartung wird GitLab am 21.09. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 21.09. between 8:00 and 9:00 am.

Commit 0a78e3d0 authored by Orkun Şensebat's avatar Orkun Şensebat
Browse files

Fix wrong assignment of j1, l1, j2, l2

parent 9c68ac01
......@@ -11,7 +11,7 @@ HWP2 = 0 # degrees, orientation of wave plate 2 (EOM
T0 = 1000 # (ns), maximum time delay
W = 1 # (ns), time coincidence window
def analyzer(c, s, cHWP, sHWP, T0, j, l):
def analyzer(c, s, cHWP, sHWP, T0):
# EOM : plane rotation
c2 = cHWP*c+sHWP*s
s2 = -sHWP*c+cHWP*s
......@@ -28,6 +28,7 @@ def analyzer(c, s, cHWP, sHWP, T0, j, l):
# F90: call random_number(r1)
r1 = np.random.rand()
l = y*y*y*y*T0*r1 # delay time: T_0 sin(2*(theta1 - x))**4
return j, l
cHWP2 = np.cos(HWP2*np.pi/180)
......@@ -45,9 +46,9 @@ for ipsi0 in range(0, nsteps): # loop over different settings of EOM1
c2 = -s1
s2 = c1
# station 1
analyzer(c1, s1, cHWP1, sHWP1, T0, j1, l1)
j1, l1 = analyzer(c1, s1, cHWP1, sHWP1, T0)
# station 2
analyzer(c2, s2, cHWP2, sHWP2, T0, j2, l2)
j2, l2 = analyzer(c2, s2, cHWP2, sHWP2, T0)
# count
Count(j1,j2,0,ipsi0) = Count(j1,j2,0,ipsi0)+1 # Malus law model
if(abs(l1-l2)<W):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment