예제 #1
0
def bFctV0(n1, n2, rho, b, V0, modes, delta):
    NA = sqrt(n1**2 - n2**2)

    pyplot.figure()
    sim = Simulator(delta=delta)

    sim.setWavelength(Wavelength(k0=(v0 / b / NA)) for v0 in V0)
    sim.setMaterials(Fixed, Fixed, Fixed)
    sim.setRadii((rho * b, ), (b, ))
    sim.setMaterialsParams((n2, ), (n1, ), (n2, ))

    fiber = fixedFiber(0, [rho * b, b], [n2, n1, n2])

    for m in modes:
        neff = sim.getNeff(m)
        bnorm = (neff - n2) / (n1 - n2)

        pyplot.plot(V0, bnorm, color=COLORS[m.family], label=str(m))

        c = fiber.cutoffV0(m)
        pyplot.axvline(c, color=COLORS[m.family], ls='--')

    pyplot.xlim((0, V0[-1]))
    pyplot.title("$n_1 = {}, n_2 = {}, \\rho = {}$".format(n1, n2, rho))
    pyplot.xlabel("Normalized frequency ($V_0$)")
    pyplot.ylabel("Normalized propagation constant ($\widetilde{\\beta}$)")
예제 #2
0
def bFctV0(n1, n2, rho, b, V0, modes, delta):
    NA = sqrt(n1**2 - n2**2)

    pyplot.figure()
    sim = Simulator(delta=delta)

    sim.setWavelength(Wavelength(k0=(v0 / b / NA)) for v0 in V0)
    sim.setMaterials(Fixed, Fixed, Fixed)
    sim.setRadii((rho * b,), (b,))
    sim.setMaterialsParams((n2,), (n1,), (n2,))

    fiber = fixedFiber(0, [rho * b, b], [n2, n1, n2])

    for m in modes:
        neff = sim.getNeff(m)
        bnorm = (neff - n2) / (n1 - n2)

        pyplot.plot(V0, bnorm, color=COLORS[m.family], label=str(m))

        c = fiber.cutoffV0(m)
        pyplot.axvline(c, color=COLORS[m.family], ls='--')

    pyplot.xlim((0, V0[-1]))
    pyplot.title("$n_1 = {}, n_2 = {}, \\rho = {}$".format(n1, n2, rho))
    pyplot.xlabel("Normalized frequency ($V_0$)")
    pyplot.ylabel("Normalized propagation constant ($\widetilde{\\beta}$)")
예제 #3
0
from fibermodes import Wavelength, fixedFiber, HE11
import numpy
from matplotlib import pyplot

if __name__ == '__main__':
    wl = Wavelength(1550e-9)
    r = [4e-6, 10e-6]
    n = [1.4474, 1.4489, 1.4444]
    N = 1000
    mode = HE11

    fiber = fixedFiber(wl, r, n)
    neff = numpy.linspace(n[-1], max(n), N)

    x = [fiber._heceq(n, mode) for n in neff]

    pyplot.plot(neff[1:-1], x[1:-1])
    # pyplot.ylim((-1e5, 1e5))


    pyplot.show()
예제 #4
0
Created on 2014-05-06

@author: cbrunet
'''

import sys
sys.path.insert(0, '..')

if __name__ == '__main__':

    from matplotlib import pyplot
    import numpy

    from fibermodes import fixedFiber, Wavelength, Mode

    n1 = 1.454
    n2 = 1.444
    n1, n2 = (1.448918, 1.444418)

    fiber = fixedFiber(Wavelength(1550e-9), [4e-6], [n1, n2])

    neff = numpy.linspace(n2, n1)
    ceq = numpy.zeros(neff.size)
    for m in (Mode('LP', 0, 1), Mode('HE', 1, 1)):
        for i in range(neff.size):
            ceq[i] = fiber._ceq(m)(neff[i], m)
        pyplot.plot(neff, ceq, label=str(m))

    pyplot.legend()
    pyplot.show()
예제 #5
0
from collections import OrderedDict
from fibermodes import fixedFiber, Mode, ModeFamily, HE11


FIBERS = OrderedDict([
    ('(a)', fixedFiber(1550e-9, [4e-6, 6e-6], [1.47, 1.43, 1.44])),
    ('(b)', fixedFiber(1550e-9, [4e-6, 6e-6], [1.47, 1.45, 1.44])),
    ('(c)', fixedFiber(1550e-9, [4e-6, 6e-6], [1.43, 1.47, 1.44])),
    ('(d)', fixedFiber(1550e-9, [4e-6, 6e-6], [1.45, 1.47, 1.44])),
    ('(e)', fixedFiber(1550e-9, [4e-6, 6e-6], [1.44, 1.47, 1.44])),
    ])

LPMODES = (
           Mode(ModeFamily.LP, 0, 1),
           Mode(ModeFamily.LP, 1, 1),
           Mode(ModeFamily.LP, 2, 1),
           Mode(ModeFamily.LP, 3, 1),
           Mode(ModeFamily.LP, 4, 1),
           Mode(ModeFamily.LP, 5, 1),
           Mode(ModeFamily.LP, 6, 1),
           Mode(ModeFamily.LP, 7, 1),
           Mode(ModeFamily.LP, 0, 2),
           Mode(ModeFamily.LP, 1, 2),
           Mode(ModeFamily.LP, 2, 2),
           Mode(ModeFamily.LP, 3, 2),
           Mode(ModeFamily.LP, 0, 3),
           Mode(ModeFamily.LP, 1, 3),
           )

VMODES = (
예제 #6
0
@author: cbrunet
'''

import sys
sys.path.insert(0, '..')

if __name__ == '__main__':

    from matplotlib import pyplot
    import numpy

    from fibermodes import fixedFiber, Wavelength

    wl = Wavelength(1550e-9)
    n = numpy.array([1.4444, 1.4489, 1.4474])
    fiber = fixedFiber(wl, [4e-6, 10e-6], n)

    wl = Wavelength(1550e-9)
    n = numpy.array([1.4489, 1.4444, 1.4474])
    fiber = fixedFiber(wl, [10e-6, 16e-6], n)

    lpmodes = fiber.lpModes(delta=1e-3)
    for m in lpmodes:
        print(m, m.neff)
        pyplot.axvline(m.neff, ls='--')

    vmodes = fiber.vModes(delta=1e-4)
    for m in vmodes:
        print(m, m.neff)
        pyplot.axvline(m.neff, ls=':')
예제 #7
0
import sys
sys.path.insert(0, '..')

if __name__ == '__main__':

    from matplotlib import pyplot
    import numpy

    from fibermodes import fixedFiber, Wavelength, Mode

    n2 = 1.457420
    n1 = 1.462420
    rho = 8.335e-6
    wl = Wavelength(0.6328e-6)

    fiber = fixedFiber(wl, [rho], [n1, n2])
    modes = fiber.lpModes(delta=1e-4)

    neff = numpy.linspace(n2, n1, 100)
    ceq = numpy.zeros(neff.size)
    for m in (Mode('LP', 3, 1), Mode('LP', 4, 1)):
        for i in range(neff.size):
            ceq[i] = fiber._ceq(m)(neff[i], m)
        pyplot.plot(neff, ceq, label=str(m))

    lpmodes = fiber.lpModes(delta=1e-5)
    for m in lpmodes:
        if str(m) == 'LP(3,1)':
            print(m, m.neff)
            pyplot.axvline(m.neff, ls='--')
예제 #8
0
from fibermodes import Wavelength, fixedFiber, HE11
import numpy
from matplotlib import pyplot

if __name__ == '__main__':
    wl = Wavelength(1550e-9)
    r = [4e-6, 10e-6]
    n = [1.4474, 1.4489, 1.4444]
    N = 1000
    mode = HE11

    fiber = fixedFiber(wl, r, n)
    neff = numpy.linspace(n[-1], max(n), N)

    x = [fiber._heceq(n, mode) for n in neff]

    pyplot.plot(neff[1:-1], x[1:-1])
    # pyplot.ylim((-1e5, 1e5))

    pyplot.show()