예제 #1
0
            for b in range(len(kzgrid)):
                for j in range(len(herm_grid) + 1):
                    if j < (len(herm_grid) - 1):
                        g_tp[v, w, b,
                             j] = (g_t[v, w, b, j] + g_t[v, w, b, j + 1]) / 2
                        g_tm[v, w, b,
                             j] = (g_t[v, w, b, j] - g_t[v, w, b, j + 1]) / 2

    ##################################
    #Entropy
    entn_sum[:, 10] = entn_sum[:, 10] + get_entropy_hermite(
        gt0, kzind=-1, include_kz0=include_kz0)
    for k in range(10):
        kzindex = k * par['nkz0'] / 20
        #print 'kzindex',kzindex
        entn_sum[:, k] = entn_sum[:, k] + dd.get_entropy_hermite(gt0,
                                                                 kzind=kzindex)
        entnp_sum[:,
                  k] = entnp_sum[:, k] + dd.get_entropy_hermite(g_tp,
                                                                kzind=kzindex)
        entnm_sum[:,
                  k] = entnm_sum[:, k] + dd.get_entropy_hermite(g_tm,
                                                                kzind=kzindex)

entn_sum = entn_sum / float(ntime)
entnp_sum = entnp_sum / float(ntime)
entnm_sum = entnm_sum / float(ntime)

plt.loglog(herm_grid, prefactor * entn_sum[:, 10], basex=10, basey=10)

temp = prefactor * entn_sum[20, 10]
temp = temp / (herm_grid**(-1))[20]
예제 #2
0
iend = np.argmin(abs(time - end_time))
ntime = iend - istart + 1

entn_sum = np.zeros((par['nv0'], 11), dtype='float')
for i in range(istart, iend + 1):
    print 'time=', time[i], ' of ', time[iend]
    gt0 = dd.read_time_step_g(i)
    gt0 = np.reshape(gt0, (par['nkx0'], par['nky0'], par['nkz0'], par['nv0']),
                     order='F')
    #Entropy
    entn_sum[:, 10] = entn_sum[:, 10] + get_entropy_hermite(
        gt0, kzind=-1, include_kz0=include_kz0)
    for k in range(10):
        kzindex = k * par['nkz0'] / 20
        #print 'kzindex',kzindex
        entn_sum[:, k] = entn_sum[:, k] + dd.get_entropy_hermite(gt0,
                                                                 kzind=kzindex)

entn_sum = entn_sum / float(ntime)

plt.loglog(herm_grid, prefactor * entn_sum[:, 10], basex=10, basey=10)

temp = prefactor * entn_sum[20, 10]
temp = temp / (herm_grid**(-1))[20]
plt.loglog(herm_grid,
           2.0 * temp * herm_grid**(-1),
           '--',
           basex=10,
           basey=10,
           label=str(-1))
temp = prefactor * entn_sum[20, 10]
temp = temp / (herm_grid**(-1.5))[20]