Exemplo n.º 1
0
        for nl in nls:
            t_space = np.linspace(0, tmax, nTheta)
            r_space = np.linspace(0, rmax, nR)

            tscale, rscale = np.meshgrid(t_space, r_space)
            try:
                rvol = ppu.read_dbin(
                    str(padf_path / f'{padf_fname}_rmax{rmax}_nl{nl}_padf'),
                    nR, nTheta)
            except FileNotFoundError:
                print('File Not Found: Skipping')
                continue

            print(padf_fname, rvol.shape)

            r1r2 = ppu.extract_r1r2(rvol * rscale**2)

            ppu.plot_map(r1r2[:, :180],
                         title=f'{padf_fname} nl {nl} r1r2',
                         extent=[0, tmax, rmax, 0],
                         vmin=0,
                         cmap='gist_stern',
                         save=f'{padf_fname}_rmax{rmax}_nl{nl}_r1r2')

            sumax0 = np.sum(rvol * rscale**2, axis=0)

            ppu.plot_map(sumax0[:, :180],
                         title=f'{padf_fname} nl {nl} sumax0',
                         extent=[0, tmax, rmax, 0],
                         cmap='gist_stern',
                         vmin=0,
Exemplo n.º 2
0
lps = {}

#####
for rmax, padf_fname in zip(rmaxs, padf_fnames):
    nrmax = round(rmax / res)
    t_space = np.linspace(0, tmax, ntheta)
    r_space = np.linspace(0, rmax, nrmax)

    tscale, rscale = np.meshgrid(t_space, r_space)
    try:
        rvol = ppu.read_dbin(str(padf_path / f'{padf_fname}'), nrmax, ntheta)
    except FileNotFoundError:
        print(f'File Not Found: {padf_fname}')
        continue

    r1r2 = ppu.extract_r1r2(rvol)

    np.savetxt(f'{padf_fname[:4]}_padf_r1r2.dat', r1r2, header=f'{r1r2.shape}')
    #    r1r2 *= rscale**2
    r1r2 = r1r2[nrmin:ncropr, :cropt]

    r1r2 = np.clip(r1r2, 0, np.max(r1r2))
    r1r2 = r1r2**(0.5)

    r1r2 = r1r2 - np.min(r1r2)
    r1r2 = r1r2 / np.max(r1r2)

    lps[f'{padf_fname[:4]}'] = []
    for lp_dist in lp_dists:
        lps[f'{padf_fname[:4]}'].append(r1r2[int((lp_dist / rmax) * nrmax), :])
Exemplo n.º 3
0
    q_space = np.linspace(0,qmax, nQ)

    tscale, qscale = np.meshgrid(t_space, q_space)
    try:
        qvol = ppu.read_dbin(str(dbin_path/f'{dbin_fname}'), nQ, nTheta)
    except FileNotFoundError:
        print(f'File {dbin_fname} Not Found: Skipping')
        continue


    qvol = qvol**(0.125)
#    qvol[:,:,:] -= qvol[:,:,::-1]
    


    r1r2 = ppu.extract_r1r2(qvol)
#    r1r2 = ppu.convolve_gaussian(r1r2, 1.5,1.5)
    
    ppu.plot_map(r1r2, title=f'{dbin_fname} r1r2',extent=[0,tmax,0,qmax], cmap='viridis', xlabel='Correlation Angle $\\theta$ [degrees]',ylabel='Correlation length $q$ [1/$\AA$]', save=f'{dbin_fname}_r1r2' )



    sumax0 =np.sum(qvol, axis=0)
#    sumax0 = ppu.convolve_gaussian(sumax0, 1.5,1.5)

    ppu.plot_map(sumax0, title=f'{dbin_fname} sumax0',extent=[0,tmax,0,qmax], cmap='viridis', save=f'{dbin_fname}_sumax0')

#
#
#    qsx, qsy = np.meshgrid(q_space,q_space)
#    
Exemplo n.º 4
0

for dbin_fname, qmax in zip(dbin_fnames, qmaxs):
    t_space = np.linspace(0,tmax, nTheta)
    q_space = np.linspace(0,qmax, nQ)

    tscale, qscale = np.meshgrid(t_space, q_space)
    try:
        qvol = ppu.read_dbin(str(dbin_path/f'{dbin_fname}'), nQ, nTheta)
    except FileNotFoundError:
        print(f'File {dbin_fname} Not Found: Skipping')
        continue



    r1r2 = ppu.extract_r1r2(qvol)#*qscale**2)

    r1r2 = ppu.convolve_gaussian(r1r2)
    
    ppu.plot_map(r1r2, title=f'{dbin_fname} r1r2',
          extent=[0,tmax,0,qmax], cmap='viridis', xlabel='Correlation Angle $\\theta$ [degrees]',ylabel='Correlation length $q$ [1/$\AA$]', save=f'{dbin_fname}_r1r2' )



#    sumax0 =np.sum(qvol*qscale**2, axis=0)
#    
#    ppu.plot_map(sumax0, title=f'{dbin_fname} sumax0',
#          extent=[0,tmax,qmax,0], cmap='gist_stern', vmin=0)
#
#
#