Ejemplo n.º 1
0
def def_plt_exp(obj_ax, str_datfile, str_label, list1d_column=[0, 1]):
    _, array2d_xdata = xas_module.def_extract(str_datfile=str_datfile,
                                              list1d_column=[list1d_column[0]])
    _, array2d_ydata = xas_module.def_extract(str_datfile=str_datfile,
                                              list1d_column=[list1d_column[1]])
    obj_ax.plot(array2d_xdata, array2d_ydata, 'o', mfc='none', label=str_label)
    return obj_ax
Ejemplo n.º 2
0
def def_pic_tm_select(
    ax,
    str_datfile,
    list1d_column,
    float_onset,
    float_xwidth=0.5,
    int_ntm=1,
):
    _, array2d_xdata_tm = xas_module.def_extract(
        str_datfile=str_datfile, list1d_column=[list1d_column[0]])
    _, array2d_ydata_tm = xas_module.def_extract(
        str_datfile=str_datfile, list1d_column=[list1d_column[1]])
    _, array2d_kb = xas_module.def_extract(str_datfile=str_datfile,
                                           list1d_column=[0, 1],
                                           dtype=int)
    list1d_header, array2d_ydata = xas_module.def_extract(
        str_datfile=str_datfile, list1d_column=[list1d_column[2]])
    array1d_index_topn = xas_module.def_tm_findmax(
        array1d_xdata=array2d_xdata_tm,
        array1d_ydata=array2d_ydata,
        array1d_kb=array2d_kb,
        float_onset=float_onset,
        str_abname=list1d_header[0],
        int_ntm=int_ntm,
        float_xwidth=float_xwidth,
    )
    ax.plot(
        array2d_xdata_tm[array1d_index_topn],
        array2d_ydata_tm[array1d_index_topn],
        's',
        markersize=12,
        markeredgewidth=2,
        mfc='none',
    )
Ejemplo n.º 3
0
def def_plt_theory(
        obj_ax,
        str_datfile,
        str_label,
        list1d_column,
        ):
    _, array2d_xdata = xas_module.def_extract( str_datfile=str_datfile, list1d_column=[ list1d_column[0] ] )
    _, array2d_ydata = xas_module.def_extract( str_datfile=str_datfile, list1d_column=[ list1d_column[1] ] )
    obj_ax.plot( array2d_xdata, array2d_ydata, label=str_label )
    return obj_ax
Ejemplo n.º 4
0
def def_pic_tm(
        ax,
        str_datfile,
        list1d_column,
        str_label,
        ):
    
    _, array2d_xdata_tm = xas_module.def_extract( str_datfile=str_datfile, list1d_column=[ list1d_column[0] ] )
    _, array2d_ydata_tm = xas_module.def_extract( str_datfile=str_datfile, list1d_column=[ list1d_column[1] ] )
    ax.plot( array2d_xdata_tm, array2d_ydata_tm, 'o', label=str_label)

    return ax, array2d_xdata_tm, array2d_ydata_tm
Ejemplo n.º 5
0
matplotlib.rcParams['font.family'] = 'sans-serif'
matplotlib.rcParams['font.sans-serif'] = ["Arial"]
matplotlib.rcParams["figure.figsize"] = (10, 8)
list1d_color = list(mcolors.TABLEAU_COLORS)

if (''):
    fig, ax = plt.subplots()
    str_workdir = dict_structure['110.x2y12_O22'].str_chdir
    str_savefig = 'xas.alpha.pdf'
    os.chdir(str_workdir)
    print(os.getcwd())

    float_plus = 2

    str_datfile = str_exp + '20210924.pto110_a20_postscaling.csv'
    _, array2d_xdata = xas_module.def_extract(str_datfile=str_datfile,
                                              list1d_column=[1])
    _, array2d_ydata = xas_module.def_extract(str_datfile=str_datfile,
                                              list1d_column=[2])
    label = r'Exp. 20$\degree$'
    ax.plot(array2d_xdata,
            array2d_ydata + float_plus,
            'o',
            mfc='none',
            label=label)

    str_datfile = 'xas.alpha.csv'
    _, array2d_xdata = xas_module.def_extract(str_datfile=str_datfile,
                                              list1d_column=[0])
    _, array2d_ydata = xas_module.def_extract(str_datfile=str_datfile,
                                              list1d_column=[1])
    label = r'Theory 20$\degree$'