Ejemplo n.º 1
0
        #try:
        #    if (potential_shape == "HermanSkillman"):
        #        #hs_U = hs.HS_Fitting_Function_Xe_Potential(rU, cs)
        #        #hs_E = -hs.HS_Fitting_Function_Xe_Potential(rU, cs)
        #        #ax1.plot(rU, hs_U, ':' + colors[cs%len(colors)])
        #        #ax2.plot(rE, hs_E, ':' + colors[cs%len(colors)])
        #
        #        new_r, new_E, new_IntE, pts_r, pts_E = cubic_spline(p1_cs, rU, U, rE, E)
        #        ax1.plot(new_r, new_IntE, colors[cs%len(colors)])
        #        ax2.plot(new_r, new_E, colors[cs%len(colors)])
        #        ax2.plot(pts_r, pts_E, colors[cs%len(colors)] + 'x', ms=10, markeredgewidth=3)
        #except:
        #    pass

        ax1.plot(rU, U, colsym.symbol(fi)+colsym.color(cs), label = str(p1_cs) + "+ " + potential_shape, lw=line_width)
        ax1.plot(rU, Coulomb_U,       ':'+colsym.color(cs), lw=line_width)
        ax2.plot(rE, E, colsym.symbol(fi)+colsym.color(cs), label = str(p1_cs) + "+ " + potential_shape, lw=line_width)
        ax2.plot(rE, Coulomb_E,       ':'+colsym.color(cs), lw=line_width)

        # Keep track of min and max
        if (U.min() < Umin):
            Umin = U.min()
        if (U.max() > Umax):
            Umax = U.max()
        if (E.min() < Emin):
            Emin = E.min()
        if (E.max() > Emax):
            Emax = E.max()

    fi += 1
Ejemplo n.º 2
0
                                     subplot = 224)
ax1b.get_yaxis().set_visible(False)
ax2.get_yaxis().set_visible(False)
ax3b.get_yaxis().set_visible(False)
ax4.get_yaxis().set_visible(False)
for ax in [ax1, ax1b, ax2, ax2b]:
    ax.get_xaxis().set_visible(False)

# ********************** Before ************************
ax1.plot(r, U)
ax1.plot([-r0, r0], [-Xe_Z0_Ip, -Xe_Z0_Ip], '-m', label = '5p')
for ei in xrange(len(Xe_Z0_es_E)):
    r0e = min(abs(cs/Xe_Z0_es_E[ei]), r[-1])
    ax1.plot([-r0e, r0e], [Xe_Z0_es_E[ei], Xe_Z0_es_E[ei]],
                linestyle = colors_and_symbols.symbol(ei+5),
                color = colors_and_symbols.color(ei),
                label = Xe_Z0_es_n[ei])

# Impacting electron
ar1Ke = fleches.arrow('K_e', [0.75*r[0], 0.0], [0.75*r[0], Ke])    # Vertical (Ke)
ar2Ke = fleches.arrow('K_e', [0.75*r[0], Ke],  [0.75*r[0]+10, Ke]) # Horizontal (v)
ar1Ke.Plot(ax1, color = 'b', label = '$K_e$', horizontalalignment = 'right', bidirectional = True)
ar2Ke.Plot(ax1, color = 'b', label = '$v_e$', verticalalignment = 'top')
ax1.plot([0.75*r[0]], [Ke], 'ob', ms = 14)

# Bound electron
ax1.plot([0.0], [-Xe_Z0_Ip], 'og', ms = 14)


# ********************** During ************************
ax2.plot(r, U)
Ejemplo n.º 3
0
    # if (plot_U):
    #    ax_U_Eh.plot(all_particles[i].pos, all_particles[i].U(), symbol)
    #    ax_U_Eh.text(all_particles[i].pos, all_particles[i].U(), r' $' + str_elem + '_{' + str(i) + '}\ (' + str(all_particles[i].cs) + str_cs + ')$', horizontalalignment = "center")


# ******************************************************************************
# Potential plot
# ******************************************************************************

if plot_V:
    # Total potential
    ax_V_Eh.plot(r, Vtot, "-k", label=r"$V_{tot}$")

    # Potential due to each particle
    for i in xrange(nb_particles):
        ax_V_Eh.plot(r, all_particles[i].Get_V(r), "--" + colors_and_symbols.color(i), label=r"$V_{" + str(i) + "}$")
        Vi = all_particles[i].V
        arrow_to_plot = arrow(name="Vi", start=0.0, length=Vi, is_energy=False)
        arrow_to_plot.Plot(ax_V_Eh, x=all_particles[i].pos, label=r"$V(" + str(i) + ")$", horizontalalignment="left")

    # Plot Vb
    # Total potential minus the ion we are looking at and nearby electrons (Vb function of r)
    ax_V_Eh.plot(r, Vbr, "--k", label=Vbr_label)
    if nb_ions > 1:
        ax_V_Eh.plot([r[0], r[-1]], [Vb, Vb], "--k")
    arrow_Vb.Plot(
        ax_V_Eh, x=ions[impacting_electron.nearest].pos, color="r", label=r"$V_b$", horizontalalignment="left"
    )


# ******************************************************************************