# Path: nrgmap/discretization.py
# class DiscHandler(object):
# class SingleBandDiscHandler(DiscHandler):
# class MultiBandDiscHandler(DiscHandler):
#     def get_TEfunc(self,sgn,xmax,Nx=500000,**kwargs):
#     def __init__(self,wlist,rholist,tickers):
#     def D(self):
#     def wlist(self):
#     def rholist(self):
#     def get_TEfunc(self,sgn,xmax,Nx=500000):
#     def __init__(self,rhofunc,wlist,tickers,autofix=1e-5):
#     def nband(self):
#     def get_TEfunc(self,sgn,xmax,Nx):
#         def Tfunc(x):
# def check_disc(rhofunc,discmodel,wlist,smearing=0.02,mode='eval'):
# def quick_map(rhofunc,wlist,N,z=1.,Nx=500000,tick_params=None,autofix=1e-5):
#         RL=self.int_rholists[sgn]
#             T=Td.conj().T
#     N=discmodel.N_pos
#     AL=hybri_sun(tlist=Tlist,elist=Elist,wlist=wlist,smearing=smearing*1./nz)
#         AV=array([eigvalsh(A) for A in AL]) if nband>1 else AL.reshape(AL.shape[:2])
#     D=[wlist[0],wlist[-1]]


from numpy import *
from numpy.testing import dec,assert_,assert_raises,assert_almost_equal,assert_allclose
from matplotlib.pyplot import *
from scipy import sparse as sps
from scipy.linalg import qr,eigvalsh,norm
from ..utils import *
from ..discretization import get_wlist,quick_map
from ..chain import *
from ..hybri_sc import *
from ..chainmapper import *
import time,pdb,sys
'''
Tests for nrg mapping procedures.
'''



def get_chain(z=0.5,method='qr'):
    '''
    run this sample, visual check is quite slow!
    '''
    #generate the hybridization function.
    nband=4
    Gamma=0.5/pi
    Lambda=1.8
    
    D=[-1.,0.5]             #the energy window.

# Path: nrgmap/discretization.py
# class DiscHandler(object):
# class SingleBandDiscHandler(DiscHandler):
# class MultiBandDiscHandler(DiscHandler):
#     def get_TEfunc(self,sgn,xmax,Nx=500000,**kwargs):
#     def __init__(self,wlist,rholist,tickers):
#     def D(self):
#     def wlist(self):
#     def rholist(self):
#     def get_TEfunc(self,sgn,xmax,Nx=500000):
#     def __init__(self,rhofunc,wlist,tickers,autofix=1e-5):
#     def nband(self):
#     def get_TEfunc(self,sgn,xmax,Nx):
#         def Tfunc(x):
# def check_disc(rhofunc,discmodel,wlist,smearing=0.02,mode='eval'):
# def quick_map(rhofunc,wlist,N,z=1.,Nx=500000,tick_params=None,autofix=1e-5):
#         RL=self.int_rholists[sgn]
#             T=Td.conj().T
#     N=discmodel.N_pos
#     AL=hybri_sun(tlist=Tlist,elist=Elist,wlist=wlist,smearing=smearing*1./nz)
#         AV=array([eigvalsh(A) for A in AL]) if nband>1 else AL.reshape(AL.shape[:2])
#     D=[wlist[0],wlist[-1]]


# Path: nrgmap/tests/test_checkscale.py
from numpy import *
from numpy.testing import dec,assert_,assert_raises,assert_almost_equal,assert_allclose
from matplotlib.pyplot import *
from scipy import sparse as sps
from scipy.linalg import qr,eigvalsh,norm
from ..utils import *
from ..discretization import get_wlist,quick_map
from ..chain import *
from ..hybri_sc import *
from ..chainmapper import *
import time,pdb,sys

'''
Tests for nrg mapping procedures.
'''



def get_chain(z=0.5,method='qr'):
    '''
    run this sample, visual check is quite slow!
    '''
    #generate the hybridization function.
    nband=4
    Gamma=0.5/pi
    Lambda=1.8
    
    D=[-1.,0.5]             #the energy window.

    wlist=get_wlist(w0=1e-12,Nw=10000,mesh_type='log',Gap=0,D=D)