Exemple #1
0
def analytic_fig(ax, x_lim, time_l=[0, 1, 2, 3], nxy=320):
    x_range = np.linspace(-x_lim, x_lim, nxy)
    y_range = np.zeros(nxy)
    oznacz = ['k', 'b', 'c', 'y', 'g', 'm', 'r']
    for it, time in enumerate(time_l):
        lamb = eq.d2_lambda_evol(time)
        h = eq.d2_height(lamb, x_range, y_range)
        v = eq.d2_velocity(lamb, x_range, y_range)
        ax.plot(x_range, h, oznacz[it])
        ax.plot(x_range, v, oznacz[it] + "--")
    ps.ticks_changes(ax)
Exemple #2
0
def analytic_fig(ax, x_lim, time_l=[0,1,2,3], nxy=320):
    x_range = np.linspace(-x_lim, x_lim, nxy)
    y_range = np.zeros(nxy)
    oznacz = ['k', 'b', 'c', 'y', 'g', 'm', 'r']
    for it, time in enumerate(time_l):
        lamb = eq.d2_lambda_evol(time)
        h = eq.d2_height(lamb, x_range, y_range)
        v = eq.d2_velocity(lamb, x_range, y_range)
        ax.plot(x_range, h, oznacz[it])
        ax.plot(x_range, v, oznacz[it]+ "--")
    ps.ticks_changes(ax)
Exemple #3
0
def analytic_model_fig(ax, var_md, time=1):
    x_range = var_md["x_range"]
    y_range = 0 * var_md["x_range"]
    ind_cs = int(var_md["h"].shape[1]/2)
    lamb = eq.d2_lambda_evol(time)
    h_a = eq.d2_height(lamb, x_range, y_range)
    v_a = eq.d2_velocity(lamb, x_range, y_range)
    ax.plot(x_range, eq.d2_initial(x_range, y_range), 'k', x_range, h_a, 'b',
            x_range, var_md["h"][:,ind_cs], "r")
    ax.plot(x_range, 0*x_range, "k-", x_range, v_a, 'b--',
            x_range, var_md["vx"][:,ind_cs], "r--")
    ps.ticks_changes(ax)
def analytic_model_fig(ax, x_range, y_range, h_m, v_m, time=1):
    lamb = eq.d2_lambda_evol(time)
    h_a = eq.d2_height(lamb, x_range, y_range)
    v_a = eq.d2_velocity(lamb, x_range, y_range)

    ax.plot(x_range, eq.d2_initial(x_range, y_range), 'k', x_range, h_a, 'b',
            x_range, h_m, "r")
    ax.plot(x_range, 0*x_range, "k-", x_range, v_a, 'b--',
            x_range, v_m, "r--")

    #ax.set_ylim(-2,2)
    ps.ticks_changes(ax)
Exemple #5
0
def analytic_model_fig(ax, var_md, time=1):
    x_range = var_md["x_range"]
    y_range = 0 * var_md["x_range"]
    ind_cs = int(var_md["h"].shape[1] / 2)
    lamb = eq.d2_lambda_evol(time)
    h_a = eq.d2_height(lamb, x_range, y_range)
    v_a = eq.d2_velocity(lamb, x_range, y_range)
    ax.plot(x_range, eq.d2_initial(x_range, y_range), 'k', x_range, h_a, 'b',
            x_range, var_md["h"][:, ind_cs], "r")
    ax.plot(x_range, 0 * x_range, "k-", x_range, v_a, 'b--', x_range,
            var_md["vx"][:, ind_cs], "r--")
    ps.ticks_changes(ax)
Exemple #6
0
def analytic_model_fig(ax, x_range, y_range, h_m, v_m, time=1):
    lamb = eq.d2_lambda_evol(time)
    h_a = eq.d2_height(lamb, x_range, y_range)
    v_a = eq.d2_velocity(lamb, x_range, y_range)

    ax.plot(x_range, eq.d2_initial(x_range, y_range), 'k', x_range, h_a, 'b',
            x_range, h_m, "r")
    ax.plot(x_range, 0 * x_range, "k-", x_range, v_a, 'b--', x_range, v_m,
            "r--")

    #ax.set_ylim(-2,2)
    ps.ticks_changes(ax)
def analytic_fig(ax, time_l = [0,1,2,3], x_range = np.linspace(-8,8,320),
                              y_range = np.zeros(320)):
    oznacz = ['k', 'b', 'c', 'y', 'g', 'm', 'r']
    y0 = eq.d2_initial(x_range, y_range)

    for it, time in enumerate(time_l):
        lamb = eq.d2_lambda_evol(time)
        h = eq.d2_height(lamb, x_range, y_range)
        v = eq.d2_velocity(lamb, x_range, y_range)
        ax.plot(x_range, h, oznacz[it])
        ax.plot(x_range, v, oznacz[it]+ "--")

    ps.ticks_changes(ax)
Exemple #8
0
def analytic_fig(ax,
                 time_l=[0, 1, 2, 3],
                 x_range=np.linspace(-8, 8, 320),
                 y_range=np.zeros(320)):
    oznacz = ['k', 'b', 'c', 'y', 'g', 'm', 'r']
    y0 = eq.d2_initial(x_range, y_range)

    for it, time in enumerate(time_l):
        lamb = eq.d2_lambda_evol(time)
        h = eq.d2_height(lamb, x_range, y_range)
        v = eq.d2_velocity(lamb, x_range, y_range)
        ax.plot(x_range, h, oznacz[it])
        ax.plot(x_range, v, oznacz[it] + "--")

    ps.ticks_changes(ax)