Пример #1
0
def plot_eigs(mesh, eigs):
    from pylab import plot, show
    import numpy
    l = Linearizer(mesh)
    for E, eig in eigs:
        if E >= 0:
            break
        x, y = l.get_xy(eig, 0, 100)
        print "plotting E=%f" % E
        plot(x, y)
    show()
Пример #2
0
def plot_eigs(mesh, eigs):
    try:
        from jsplot import plot, show
    except ImportError:
        from pylab import plot, show
    import numpy
    l = Linearizer(mesh)
    for E, eig in eigs:
        if E >= 0:
            break
        x, y = l.get_xy(eig, 0, 100)
        print "plotting E=%f" % E
        plot(x, y)
    show()
Пример #3
0
def plot_eigs(mesh, eigs, n=10):
    try:
        from jsplot import plot, show
    except ImportError:
        from pylab import plot, show
    import numpy
    l = Linearizer(mesh)
    for E, eig in eigs:
        if E < -6:
            continue
        if E >= 6:
            break
        x, y = l.get_xy(eig, 0, 100)
        print "plotting E=%f" % E
        plot(x, y)
    show()
Пример #4
0
def plot_eigs(mesh, eigs):
    #try:
    #    from jsplot import plot, show
    #except ImportError:
    from pylab import plot, show, legend
    import numpy
    from _forms import potential_python
    l = Linearizer(mesh)
    for E, eig in eigs:
        if E >= 0:
            break
        x, y = l.get_xy(eig, 0, 100)
        print "plotting E=%f" % E
        plot(x, y, label="E=%f" % E)
    y = [potential_python(_) for _ in x]
    plot(x, y, "k-", label="V(r)")
    legend()
    show()
Пример #5
0
def plot_eigs(mesh, eigs):
    #try:
    #    from jsplot import plot, show
    #except ImportError:
    from pylab import plot, show, legend
    import numpy
    from _forms import potential_python
    l = Linearizer(mesh)
    for E, eig in eigs:
        if E >= 0:
            break
        x, y = l.get_xy(eig, 0, 100)
        print "plotting E=%f" % E
        plot(x, y, label="E=%f" % E)
    y = [potential_python(_) for _ in x]
    plot(x, y, "k-", label="V(r)")
    legend()
    show()
Пример #6
0
def plot_eigs(mesh, eigs, n=10):
    try:
        from jsplot import plot, show
    except ImportError:
        from pylab import plot, show
    import numpy
    l = Linearizer(mesh)
    count = 0
    c = 137.036
    n = 4
    for E, eig in eigs:
        if E < -2*c**2:
            # skip the positron states
            continue
        if E > 0:
            break
        count += 1
        if count > n:
            break
        x, y = l.get_xy(eig, 0, 100)
        print "plotting E=%f" % E
        plot(x, y)
    show()