Ejemplo n.º 1
0
    #opt = dict(cmap='PuOr')

    ax = plt.subplot(*subp)
    subp[-1] += 1
    oplot(ana.G_iw)

    if True:
        g2 = ana.gamma_m
        label = 'gamma ana'

        s = np.squeeze(g2.data[0, :, :])

        ax = plt.subplot(*subp)
        subp[-1] += 1
        plt.title('Re ' + label + ' [i,:,:]')
        plt.pcolormesh(s.real, **opt)
        plt.colorbar()

    if False:
        g2 = ana.gamma_m
        label = 'gamma ana'

        s = np.squeeze(g2.data[idx, :, :])

        ax = plt.subplot(*subp)
        subp[-1] += 1
        plt.title('Re ' + label + ' [i,:,:]')
        plt.pcolormesh(s.real, **opt)
        plt.colorbar()

        ax = plt.subplot(*subp)
Ejemplo n.º 2
0
    a = analytic_hubbard_atom(**parm.dict())
    a.G_iw.name = r'$G_{analytic}$'

    plt.figure(figsize=(3.25 * 2, 3 * 2))

    subp = [2, 2, 1]

    plt.subplot(*subp)
    subp[-1] += 1

    oploti(p.G_iw)
    oploti(a.G_iw)

    plt.subplot(*subp)
    subp[-1] += 1
    diff = a.G_iw.copy()
    diff << p.G_iw['up'] - a.G_iw
    diff.name = r'$G_{ctint} - G_{analytic}$'
    oplot(diff)

    plt.subplot(*subp)
    subp[-1] += 1
    vmax = np.max(np.abs(p.chi_m.data.real))
    opt = dict(vmax=vmax, vmin=-vmax, cmap='PuOr')
    data = np.squeeze(p.chi_m.data.real)
    plt.pcolormesh(data, **opt)

    plt.tight_layout()
    plt.show()
Ejemplo n.º 3
0
def plot_dynamic(p):

    plt.figure(figsize=(3.25 * 2, 8))

    subp = [3, 2, 1]

    G2_iw_ph = p.G2_iw_ph

    d = np.squeeze(p.G2_iw_ph[('up', 'up')].data)

    lim = np.max([np.abs(d.real), np.abs(d.imag)])
    opt = dict(vmin=-lim, vmax=lim, cmap='PuOr')

    ax = plt.subplot(*subp)
    subp[-1] += 1
    plt.pcolormesh(d.real, **opt)

    ax = plt.subplot(*subp)
    subp[-1] += 1
    plt.pcolormesh(d.imag, **opt)

    d = np.squeeze(p.G2_iw_ph[('up', 'do')].data)

    ax = plt.subplot(*subp)
    subp[-1] += 1
    plt.pcolormesh(d.real, **opt)

    ax = plt.subplot(*subp)
    subp[-1] += 1
    plt.pcolormesh(d.imag, **opt)

    d = np.squeeze(p.chi_m.data)
    lim = np.max([np.abs(d.real), np.abs(d.imag)])

    ax = plt.subplot(*subp)
    subp[-1] += 1
    plt.pcolormesh(d.real, **opt)

    ax = plt.subplot(*subp)
    subp[-1] += 1
    plt.pcolormesh(d.imag, **opt)

    plt.tight_layout()
    plt.savefig('figure_dynamic.pdf')
Ejemplo n.º 4
0
    from pytriqs.applications.susceptibility.fourier import chi4_tau_from_iw
    chi4_tau_ref = chi4_tau_from_iw(chi4_iw, nt)

    np.testing.assert_array_almost_equal(chi4_tau_ref.data, chi4_tau.data)

    # ------------------------------------------------------------------
    if False:
        from pytriqs.plot.mpl_interface import oplot, plt

        subp = [2, 2, 1]
        plt.subplot(*subp)
        subp[-1] += 1
        plt.title('chi4_tau')
        cut = chi4_tau[[0, all, all]]
        plt.pcolormesh(cut.data[:, :, 0, 0, 0, 0].real)
        plt.axis('square')

        plt.subplot(*subp)
        subp[-1] += 1
        plt.title('chi4_tau_ref')
        cut = chi4_tau_ref[[0, all, all]]
        plt.pcolormesh(cut.data[:, :, 0, 0, 0, 0].real)
        plt.axis('square')

        cidx = 5  # cut idx
        cut = chi4_iw[[cidx, all, all]]

        plt.subplot(*subp)
        subp[-1] += 1
        plt.title('chi4_iw Re')
Ejemplo n.º 5
0
    
    data = np.squeeze(chi0w0.data[:, qidx])
    print data.shape
    
    plt.subplot(*subp); subp[-1] += 1
    plt.title(r'$q = \pi \times$ %s' % str(np.array(q_list[qidx])/np.pi))
    plt.plot(data.real)
    plt.ylabel(r'Re[$\chi_0(i\omega)$]')
    plt.ylim([-vmax, 0.1*vmax])

    plt.subplot(*subp); subp[-1] += 1
    plt.plot(data.imag)
    plt.ylabel(r'Im[$\chi_0(i\omega)$]')

    plt.subplot(*subp); subp[-1] += 1
    plt.pcolormesh(chi0q.data[:,:,qidx,0,0,0,0].real, **opt)
    plt.colorbar()
    plt.axis('equal')
    plt.title(r'Re[$\chi_0(i\omega, i\nu)$]')
    plt.xlabel(r'$\nu$')
    plt.ylabel(r'$\omega$')

    plt.subplot(*subp); subp[-1] += 1
    plt.pcolormesh(chi0q.data[:,:,qidx,0,0,0,0].imag, **opt)
    plt.colorbar()
    plt.axis('equal')
    plt.title(r'Im[$\chi_0(i\omega, i\nu)$]')
    plt.xlabel(r'$\nu$')
    plt.ylabel(r'$\omega$')

plt.tight_layout()