def plot(dirname_sets_u, dirname_sets_D, cs, labels, ax):
    ejm_rcparams.prettify_axes(ax)

    for dirnames_u, dirnames_D, c, label in zip(dirname_sets_u,
                                                dirname_sets_D, cs, labels):
        pfs, uds, uds_err = utils.pf_uds_x(dirnames_u)
        i_sort = np.argsort(pfs)
        pfs, uds, uds_err = pfs[i_sort], uds[i_sort], uds_err[i_sort]
        pfs, Ds, Ds_err = utils.pf_Ds_scalar(dirnames_D)
        i_sort = np.argsort(pfs)
        pfs, Ds, Ds_err = pfs[i_sort], Ds[i_sort], Ds_err[i_sort]

        uds_norm = uds / u_x_0
        uds_norm_err = uds_err / u_x_0

        Ds_norm = Ds / D_0
        Ds_norm_err = Ds_err / D_0

        ls = Ds_norm / uds_norm
        ls_err = ls * np.sqrt(np.sum(np.square([Ds_norm_err / Ds_norm,
                                                uds_norm_err / uds_norm])))
        ax.errorbar(pfs, ls, yerr=ls_err, label=label, c=c)

    ax.set_xlim(0.0, 1.0)
    ax.set_ylim(0.5, 6.5)
    ax.set_xlabel(r'$\phi$', fontsize=35)
    ax.set_ylabel(r'$l_x$', fontsize=35)
    ax.tick_params(axis='both', labelsize=26, pad=10.0)
Exemple #2
0
def plot_pf_uds_x(dirnames, ax):
    pfs, uds, uds_err = utils.pf_uds_x(dirnames)
    i_sort = np.argsort(pfs)
    pfs, uds = pfs[i_sort], uds[i_sort]
    ax.plot(pfs, uds / uds[0])
    ax.set_xlim(-0.02, 1.0)
    ax.set_ylim(0.0, 1.01)
def plot(dirname_sets, cs, labels, ax):
    ejm_rcparams.prettify_axes(ax)

    for dirnames, c, label in zip(dirname_sets, cs, labels):
        pfs, uds, uds_err = utils.pf_uds_x(dirnames)
        i_sort = np.argsort(pfs)
        pfs, uds, uds_err = pfs[i_sort], uds[i_sort], uds_err[i_sort]
        ax.errorbar(pfs, uds, yerr=uds_err, label=label, c=c)

    ax.set_xlim(0.0, 1.0)
    ax.set_ylim(0.0, 0.21)

    ax.set_xlabel(r'$\phi$', fontsize=35)
    ax.set_ylabel(r'$u_x$', fontsize=35)
    ax.tick_params(axis='both', labelsize=26, pad=10.0)
Exemple #4
0
    (dirnames_Dr_1side_T, dirnames_Dr_a),
    (dirnames_p_2side_T, dirnames_p_a),
    (dirnames_Dr_2side_T, dirnames_Dr_a),
    (dirnames_p_1side_S, dirnames_p_a),
    (dirnames_Dr_1side_S, dirnames_Dr_a),
    (dirnames_p_2side_S, dirnames_p_a),
    (dirnames_Dr_2side_S, dirnames_Dr_a),
]


def f(x, m):
    return 1.0 + m * x


for dirnames_u, dirnames_D in dirname_sets:
    pfs, uds, uds_err = utils.pf_uds_x(dirnames_u)
    i_sort = np.argsort(pfs)
    pfs, uds, uds_err = pfs[i_sort], uds[i_sort], uds_err[i_sort]
    pfs, Ds, Ds_err = utils.pf_Ds_scalar(dirnames_D)
    i_sort = np.argsort(pfs)
    pfs, Ds, Ds_err = pfs[i_sort], Ds[i_sort], Ds_err[i_sort]

    uds_norm = uds / u_x_0
    uds_norm_err = uds_err / u_x_0

    Ds_norm = Ds / D_0
    Ds_norm_err = Ds_err / D_0

    ls = Ds_norm / uds_norm
    ls_err = ls * np.sqrt(np.sum(np.square([Ds_norm_err / Ds_norm,
                                            uds_norm_err / uds_norm])))