예제 #1
0
              / (1 + r_ab[p-1] * U(p)*exp(2j*kz[p]*d[p]))
        return res

    return U(0)

# Power reflexion coefficient for different incidence angles and polarisations
R_th_ss_0 = (abs(ReflectionCoeff(0, 's')))**2       # Phi_i = 0 
R_th_ss = (abs(ReflectionCoeff(pi/4, 's')))**2      # Phi_i = pi/4
R_th_pp = (abs(ReflectionCoeff(pi/4, 'p')))**2

############################################################################
# Calculation with Berreman4x4
# Incidence angle Phi_i = 0, 's' polarization
Kx = front.get_Kx_from_Phi(0)
data = numpy.array([s.getJones(Kx, 2*pi/lbda) for lbda in lbda_list])
r_ss = Berreman4x4.extractCoefficient(data, 'r_ss')
R_ss_0 = abs(r_ss)**2

# Incidence angle Phi_i = pi/4, 's' and 'p' polarizations
Kx = front.get_Kx_from_Phi(pi/4)
data = numpy.array([s.getJones(Kx, 2*pi/lbda) for lbda in lbda_list])
r_ss = Berreman4x4.extractCoefficient(data, 'r_ss')
r_pp = Berreman4x4.extractCoefficient(data, 'r_pp')
R_ss = abs(r_ss)**2
R_pp = abs(r_pp)**2

############################################################################
# Plotting
fig = pyplot.figure(figsize=(12., 6.))
pyplot.rcParams['axes.color_cycle'] = ['b','g','r']
ax = fig.add_axes([0.1, 0.1, 0.7, 0.8])
예제 #2
0
A = -2j*k0*n2*h

R_th = abs((w**2+1)*(1-exp(-2j*k0*n2*h)) \
           / (2*w*(1+exp(-2j*k0*n2*h)) \
           - 1j*(w**2-1)*(1-exp(-2j*k0*n2*h))))**2

############################################################################
# Calculation with Berreman4x4
J = numpy.array([s.getJones(Kx,_k0) for _k0 in k0])

# Jones matrices for the circular wave basis
Jc = Berreman4x4.circularJones(J)
power = abs(Jc)**2
# Right-circular wave is reflected in the stop-band
# R_LR, T_LR close to zero
R_RR = Berreman4x4.extractCoefficient(power, 'r_RR')

############################################################################
# Plotting
fig = pyplot.figure()
ax = fig.add_subplot("111")

ax.plot(lbda, R_RR, label='R_RR')
ax.plot(lbda, R_th, 'r', label='R_th')

ax.legend(loc='center right', bbox_to_anchor=(1.00, 0.50))

ax.set_title("Right-handed Cholesteric Liquid Crystal, " +
             "{:.1f} helix pitches".format(N/2.))
ax.set_xlabel(r"Wavelength $\lambda_0$ (m)")
ax.set_ylabel(r"Power reflexion $R$")
예제 #3
0
t2_th_p= (abs((t_bs_p*t_sf_p*exp(1j*kz_s*d)) \
          /(1+r_bs_p*r_sf_p*exp(2j*kz_s*d))))**2

correction = real(n_b*cos(Phi_b)/(n_f*cos(Phi_list.astype(complex))))
# This is a correction term used in R +T*correction = 1

T_th_s = t2_th_s*correction
T_th_p = t2_th_p*correction

############################################################################
# Calculation with Berreman4x4
data = numpy.array([s.getJones(kx,k0) for kx in Kx])

data = abs(data)**2
R_p  = Berreman4x4.extractCoefficient(data, 'r_pp')
R_s  = Berreman4x4.extractCoefficient(data, 'r_ss')
t2_p = Berreman4x4.extractCoefficient(data, 't_pp')
t2_s = Berreman4x4.extractCoefficient(data, 't_ss')
T_s = t2_s*correction
T_p = t2_p*correction

############################################################################
# Plotting
fig = pyplot.figure(figsize=(12., 6.))
pyplot.rcParams['axes.color_cycle'] = ['b','g','r','c','b','g']
ax = fig.add_axes([0.1, 0.1, 0.7, 0.8])

y = numpy.vstack((R_s,R_p,t2_s,t2_p,T_s,T_p)).T
legend1 = ("R_s","R_p","t2_s","t2_p","T_s","T_p")
lines1 = ax.plot(Kx, y)
예제 #4
0
L = Berreman4x4.RepeatedLayers([L_TiO2, L_SiO2], 8, 0, 1)

# To reduce the number of printed characters in the numbers:
# numpy.set_printoptions(suppress=True, precision=3)
Kx = 0.0

# Structure
s = Berreman4x4.Structure(front, [L], back)

# Calculation
(lbda1, lbda2) = (1.1e-6, 2.5e-6)
lbda_list = numpy.linspace(lbda1, lbda2, 200)

data = numpy.array([s.getJones(Kx, 2*pi/lbda) for lbda in lbda_list])

r = Berreman4x4.extractCoefficient(data, 'r_ss')
R = abs(r)**2
t = Berreman4x4.extractCoefficient(data, 't_ss')
T = s.getPowerTransmissionCorrection(Kx) * abs(t)**2

# Plotting 
fig = pyplot.figure()
ax = fig.add_subplot("111")
ax.plot(lbda_list, R, label="$R$")
ax.plot(lbda_list, T, label="$T$")

ax.legend(loc='center right')
ax.set_xlabel(r"Wavelength $\lambda$ (m)")
ax.set_ylabel(r"Power reflection $R$ or transmission $T$")
ax.set_title(r"Bragg mirror: Air/{TiO$_2$/SiO$_2$}x8/TiO$_2$/Glass")
예제 #5
0
def plotTransmission(label):
    """Plots power transmission vs. wavenumber."""
    data = numpy.array([s.getJones(Kx,k0) for k0 in k0_list])
    t_pp = Berreman4x4.extractCoefficient(data, 't_pp')
    T = abs(t_pp)**2    # valid if back and front media are identical
    ax.plot(k0_list, T, 'x', label=label)
예제 #6
0
# Calculation parameters
lbda_min, lbda_max = 0.8e-6, 1.2e-6   # (m)
lbda_B = p * n_med
lbda_list = numpy.linspace(lbda_min, lbda_max, 100)
k0_list = 2*pi/lbda_list

############################################################################
# Analytical calculation for the maximal reflection
R_th = numpy.tanh(Dn/n_med*pi*h/p)**2
lbda_B1, lbda_B2 = p*no, p*ne

############################################################################
# Calculation with Berreman4x4
J = numpy.array([s.getJones(Kx,k0) for k0 in k0_list])
power = abs(J)**2
T_pp = Berreman4x4.extractCoefficient(power, 't_pp')
T_ps = Berreman4x4.extractCoefficient(power, 't_ps')
T_ss = Berreman4x4.extractCoefficient(power, 't_ss')
T_sp = Berreman4x4.extractCoefficient(power, 't_sp')
# Note: the expression for T is valid if back and front media are identical

# Transmission coefficients for incident unpolarized light:
T_pn = 0.5 * (T_pp + T_ps)
T_sn = 0.5 * (T_sp + T_ss)
T_nn = T_sn + T_pn

# Transmission coefficients for 's' and 'p' polarized light, with 
# unpolarized measurement.
T_ns = T_ps + T_ss
T_np = T_pp + T_sp
예제 #7
0
IL = Berreman4x4.InhomogeneousLayer(TN)
# IL.setMethod("symplectic","Padé",3)

# Structure
s = Berreman4x4.Structure(front, [IL], back)

# Normal incidence: 
Kx = 0.0

# Calculation
lbda_min, lbda_max = 200e-9, 1   # (m)
k0_list = numpy.linspace(2*pi/lbda_max, 2*pi/lbda_min)
data = [s.getJones(Kx,k0) for k0 in k0_list]
data = numpy.array(data)

t_pp = Berreman4x4.extractCoefficient(data, 't_pp')

# Plotting
fig = pyplot.figure()
ax = fig.add_subplot("111")
ax.plot(k0_list, abs(t_pp)**2, 'o', label="Berreman4x4")

# Verification with Gooch-Tarry law:
u = 2*d*Dn*k0_list/(2*pi)
T_GT = sin(pi/2*sqrt(1+u**2))**2 / (1+u**2)
ax.plot(k0_list, T_GT, label="Gooch-Tarry")

ax.set_title(u"Transmission of a 90° twisted nematic liquid crystal")
ax.set_xlabel(r"Wavenumber $k_0$ (m$^{-1}$)")
ax.set_ylabel(r"Power transmission, $T$")
ax.legend()