Пример #1
0
def LCD():
    greenwavelength = 532*pow(10,-9)
    nx              = 1
    ny              = 0.9
    d               = pow(10,-3)
    jones           = odak.jonescalculus()
    InputE          = jones.electricfield(1.,0.)
    rot1            = 40.; ret1 = 27.
    Outputs         = zeros((91,91))
    for rot1 in xrange(0,91):
        for ret1 in xrange(0,91,10):
#    rot1            = 45.; ret1 = 30.
            LCD1            = jones.waveplate(InputE,ret1,rot1)
#            LCD2            = jones.waveplate(InputE,ret1,rot1)
#    rot2            = 40.; ret2 = 27.
#    rot2            = 45.; ret2 = 30.
#    LCD2            = jones.waveplate(LCD1,ret2,rot2)
#    Output          = jones.linearpolarizer(LCD2,90)
            Output          = jones.linearpolarizer(LCD1,90)
            Intensity       = abs(Output[1])            
            Outputs[rot1,ret1] = Intensity
    plot(Outputs)
    ylabel('Intensity (Normalized)')
    xlabel('Angle between fast axis of the LCD and the input light polarization (degrees)')
    show()
#    print 'Input electric field vector: \n', InputE
#    print 'After the first LCD (Operational): \n', LCD1
#    print 'After the second LCD (Operational): \n', LCD2
#    print 'Ouput:', Output
#    print 'Intensity:', abs(Output[1])
    return True
Пример #2
0
def LCD():
    greenwavelength = 532 * pow(10, -9)
    nx = 1
    ny = 0.9
    d = pow(10, -3)
    jones = odak.jonescalculus()
    InputE = jones.electricfield(1., 0.)
    rot1 = 40.
    ret1 = 27.
    Outputs = zeros((91, 91))
    for rot1 in xrange(0, 91):
        for ret1 in xrange(0, 91, 10):
            #    rot1            = 45.; ret1 = 30.
            LCD1 = jones.waveplate(InputE, ret1, rot1)
            #            LCD2            = jones.waveplate(InputE,ret1,rot1)
            #    rot2            = 40.; ret2 = 27.
            #    rot2            = 45.; ret2 = 30.
            #    LCD2            = jones.waveplate(LCD1,ret2,rot2)
            #    Output          = jones.linearpolarizer(LCD2,90)
            Output = jones.linearpolarizer(LCD1, 90)
            Intensity = abs(Output[1])
            Outputs[rot1, ret1] = Intensity
    plot(Outputs)
    ylabel('Intensity (Normalized)')
    xlabel(
        'Angle between fast axis of the LCD and the input light polarization (degrees)'
    )
    show()
    #    print 'Input electric field vector: \n', InputE
    #    print 'After the first LCD (Operational): \n', LCD1
    #    print 'After the second LCD (Operational): \n', LCD2
    #    print 'Ouput:', Output
    #    print 'Intensity:', abs(Output[1])
    return True
Пример #3
0
def main():
    # Initial variables
    greenwavelength = 532*pow(10,-9)
    redwavelength   = 432*pow(10,-9)
    bluewavelength  = 640*pow(10,-9)
    nx              = 2
    ny              = 1
    ni              = 360
    nj              = 360
    ratio           = numpy.zeros((ni,nj))
    crosstalk       = numpy.zeros((ni,nj))
    jones           = odak.jonescalculus()
    aperture        = odak.aperture()
    # Initial electric field vector defined
    u               = jones.electricfield(1/pow(2,0.5),1/pow(2,0.5))
    # Apply rotation combination
    for wavelength in [redwavelength,greenwavelength,bluewavelength]:
        for i in xrange(0,ni):
            for j in xrange(0,nj):
                # Solve the system
                urot           = jones.birefringentplate(u,nx,ny,greenwavelength/2,wavelength,i)
                uqwp           = jones.birefringentplate(urot,nx,ny,greenwavelength/4,wavelength,j)
                ul             = jones.circullarpolarizer(uqwp,'lefthanded')
                ur             = jones.circullarpolarizer(uqwp,'righthanded')
                # Calculate crosstalk and illumination ratio on left and right
                crosstalk[i,j] = (abs(ur[0])+abs(ur[1]))/(abs(u[0])+abs(u[1]))
                ratio[i,j]     = (abs(ur[0])+abs(ur[1]))/(abs(ul[0])+abs(ul[1]))
        # Show crosstalk and illumination ratio on left and right
        aperture.show(crosstalk,1,wavelength,'Crosstalk at wavelength %s' % wavelength,'normal',filename='Crosstalk%s.png' % wavelength,xlabel='Rotation of QWP (degrees)', ylabel='Rotation of polarization rotator (degrees)')
        aperture.show(ratio,1,wavelength, 'Ratios of the eyes at wavelength %s' % wavelength,'normal',filename='Ratio%s.png' % wavelength,xlabel='Rotation of QWP (degrees)',ylabel='Rotation of polarization rotator (degrees)')
    return True
Пример #4
0
def main():
    # Initial variables
    greenwavelength = 532 * pow(10, -9)
    redwavelength = 432 * pow(10, -9)
    bluewavelength = 640 * pow(10, -9)
    nx = 2
    ny = 1
    ni = 360
    nj = 360
    ratio = numpy.zeros((ni, nj))
    crosstalk = numpy.zeros((ni, nj))
    jones = odak.jonescalculus()
    aperture = odak.aperture()
    # Initial electric field vector defined
    u = jones.electricfield(1 / pow(2, 0.5), 1 / pow(2, 0.5))
    # Apply rotation combination
    for wavelength in [redwavelength, greenwavelength, bluewavelength]:
        for i in xrange(0, ni):
            for j in xrange(0, nj):
                # Solve the system
                urot = jones.birefringentplate(u, nx, ny, greenwavelength / 2,
                                               wavelength, i)
                uqwp = jones.birefringentplate(urot, nx, ny,
                                               greenwavelength / 4, wavelength,
                                               j)
                ul = jones.circullarpolarizer(uqwp, 'lefthanded')
                ur = jones.circullarpolarizer(uqwp, 'righthanded')
                # Calculate crosstalk and illumination ratio on left and right
                crosstalk[i, j] = (abs(ur[0]) + abs(ur[1])) / (abs(u[0]) +
                                                               abs(u[1]))
                ratio[i, j] = (abs(ur[0]) + abs(ur[1])) / (abs(ul[0]) +
                                                           abs(ul[1]))
        # Show crosstalk and illumination ratio on left and right
        aperture.show(crosstalk,
                      1,
                      wavelength,
                      'Crosstalk at wavelength %s' % wavelength,
                      'normal',
                      filename='Crosstalk%s.png' % wavelength,
                      xlabel='Rotation of QWP (degrees)',
                      ylabel='Rotation of polarization rotator (degrees)')
        aperture.show(ratio,
                      1,
                      wavelength,
                      'Ratios of the eyes at wavelength %s' % wavelength,
                      'normal',
                      filename='Ratio%s.png' % wavelength,
                      xlabel='Rotation of QWP (degrees)',
                      ylabel='Rotation of polarization rotator (degrees)')
    return True
Пример #5
0
def example_of_jones_calculus():
    greenwavelength = 532*pow(10,-9)
    redwavelength   = 432*pow(10,-9)
    bluewavelength  = 640*pow(10,-9)
    nx              = 1
    ny              = 0.9
    d               = pow(10,-3)
    jones           = odak.jonescalculus()
    print 'A sample linear polarizer: \n', jones.linearpolarizer(1,90)
    print 'A sample circullar polarizer: \n', jones.circullarpolarizer(1,'lefthanded')
    print 'A sample quarter wave plate: \n', jones.quarterwaveplate(1,0)
    print 'A sample half wave plate: \n', jones.halfwaveplate(1,0)
    print 'A sample birefringent plate: \n', jones.birefringentplate(1,nx,ny,d,greenwavelength,0)
    print 'A sample nematic liquid crystal cell: \n', jones.nematicliquidcrystal(1,3000,1.2,1,0.1,greenwavelength,0)
    print 'A sample ferroelectric liquid crystal cell: \n', jones.ferroliquidcrystal(1,30,2,1,0.1,greenwavelength,'+',0) 
    return True
Пример #6
0
def example_of_jones_calculus():
    greenwavelength = 532 * pow(10, -9)
    redwavelength = 432 * pow(10, -9)
    bluewavelength = 640 * pow(10, -9)
    nx = 1
    ny = 0.9
    d = pow(10, -3)
    jones = odak.jonescalculus()
    print 'A sample linear polarizer: \n', jones.linearpolarizer(1, 90)
    print 'A sample circullar polarizer: \n', jones.circullarpolarizer(
        1, 'lefthanded')
    print 'A sample quarter wave plate: \n', jones.quarterwaveplate(1, 0)
    print 'A sample half wave plate: \n', jones.halfwaveplate(1, 0)
    print 'A sample birefringent plate: \n', jones.birefringentplate(
        1, nx, ny, d, greenwavelength, 0)
    print 'A sample nematic liquid crystal cell: \n', jones.nematicliquidcrystal(
        1, 3000, 1.2, 1, 0.1, greenwavelength, 0)
    print 'A sample ferroelectric liquid crystal cell: \n', jones.ferroliquidcrystal(
        1, 30, 2, 1, 0.1, greenwavelength, '+', 0)
    return True