sys.path.append('../../plotting_scripts')

    from jupyterplots import JupyterPlots

    fig_x, fig_y = JupyterPlots()

    prefix = 'data/'

    roundoff = 5e-6

    fp = int(sys.argv[1])

    fdump = prefix + f'dump_{fp}.lammpstrj'

    if os.path.isfile(fdump + '.pkl'):
        dumpdata = load_obj(fdump, pstatus=True)
    else:
        duf = DumpFile(fdump, voronoi_flag=False, cg_flag=False)
        dumpdata = duf.read_dump()
        save_obj(dumpdata, fdump, pstatus=True)

    fig, axarr = plt.subplots(6, sharex=True, figsize=[fig_x, fig_y * 6])
    N = len(dumpdata)
    ncount = N

    atom_num = 2
    fxs = np.empty([ncount], float)
    fys = np.empty([ncount], float)
    xs = np.empty([ncount], float)
    ys = np.empty([ncount], float)
    for i in range(Nsamples):
        fname = 'corr_files/'
        fname += f'g_{fp}_{rho}_{i}.rdf'
        data = np.loadtxt(fname)
        print(i)
        rbins = data[:, 1]
        gs[:, i] = data[:, 2]

    gcorrs = np.mean(gs, axis=1)
    gstd = np.std(gs, axis=1) / np.sqrt(Nsamples)

    prefix = '../../2020_03_19/raw_data_processing/pickled_data/'

    dc_name = prefix + f'ret_o_{fp}_{rho}'

    ret_o = load_obj(dc_name)

    gmatrix = ret_o['sum_g']
    N_ft_samples = ret_o['g_cnt']

    rs = np.array(gmatrix[:, 0] / N_ft_samples).flatten()
    g_fts = np.array(gmatrix[:, 1] / N_ft_samples).flatten()

    fig, axarr = plt.subplots(2)

    axarr[0].plot(rbins, gcorrs, 'o-')  #yerr=gstd,fmt='o-')
    axarr[0].plot(rs, g_fts, 'ko-')
    axarr[0].plot(rbins, savgol_filter(gcorrs, 9, 2), 'r-')

    print(rbins[110])
    axarr[1].hist(gs[130, :], bins=5)
    prefix = 'data/'

    fps = np.array([0, 1, 100], int)
    rhos = np.array([0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6], float)

    tcut = 1000000

    fig, ax = plt.subplots(figsize=[fig_x, fig_y])

    for i, fp in enumerate(fps):

        pkl_name = prefix + f'P_stuff_for_fp_equals_{fp}'

        if os.path.isfile(pkl_name + '.pkl'):
            Ps, Perrs = load_obj(pkl_name, pstatus=True)
        else:

            Ps = np.empty([len(rhos)], float)
            Perrs = np.empty([len(rhos)], float)

            for j, rho in enumerate(rhos):

                flog = prefix + f'log_{fp}_{rho}.lammps.log'
                ll = LogLoader(flog, remove_chunk=0, merge_data=True)

                ts = ll.data['Step']
                Press = ll.data['c_press']

                P_cuts = Press[ts > tcut]
                Ps[j] = np.mean(P_cuts)
    fig,axarr = plt.subplots(2,sharex=True,figsize=[fig_x,2*fig_y])

    rhos_naive = np.array([0.05,0.1,0.2,0.3,0.4,0.5,0.6],float)

    mask_naive = (np.isin(rhos_naive,rhos_winkler))
    print(mask_naive)    
    for i,fp in enumerate(fps):
    

        pkl_press_naive = prefix1 + f'P_stuff_for_fp_equals_{fp}'
        pkl_diff_naive = prefix1 + f'Deff_stuff_for_fp_equals_{fp}'
        pkl_press_winkler = prefix2 + f'P_stuff_for_fp_equals_{fp}'
        pkl_diff_winkler = prefix2 + f'Deff_stuff_for_fp_equals_{fp}'

        Ps_naive,Perrs_naive = load_obj(pkl_press_naive,pstatus=True)
        Ps_winkler,Perrs_winkler = load_obj(pkl_press_winkler,pstatus=True)
        Deffs_naive,Derrs_naive = load_obj(pkl_diff_naive,pstatus=True)
        Deffs_winkler,Derrs_winkler = load_obj(pkl_diff_winkler,pstatus=True)


        Ps_winkler += swim_add(fp,rhos_winkler,2)

        Ps_naive = Ps_naive[mask_naive]

        Deffs_naive = Deffs_naive[mask_naive]
        Derrs_naive = Derrs_naive[mask_naive]
        
        print(Deffs_naive)
        print(Deffs_winkler)