def init_tv( mesh = None, shape = None, name = 'g', **kwargs): """ """ if mesh is None: if 'beta' not in kwargs: raise ValueError, "beta not provided" from gf import MeshLegendre beta = float(kwargs.pop('beta')) stat = kwargs.pop('statistic','Fermion') n_max = kwargs.pop('n_points',30) mesh = MeshLegendre(beta,stat,n_max) indices_pack = get_indices_in_dict_tv(kwargs) if not shape: assert indices_pack, "No shape, no indices !" indicesL, indicesR = indices_pack shape = len(indicesL),len(indicesR) if kwargs: raise ValueError, "GfLegendre: Unused parameters %s were passed."%kwargs.keys() return (mesh, shape, indices_pack, name), {}
def init_tv( mesh = None, shape = None, name = 'g', **kwargs): """ """ if mesh is None: from gf import MeshReFreq window = kwargs.pop('window') omega_min = window[0] omega_max = window[1] n_max = kwargs.pop('n_points',10000) mesh = MeshReFreq(omega_min, omega_max, n_max) indices_pack = get_indices_in_dict_tv(kwargs) if not shape: assert indices_pack, "No shape, no indices !" indicesL, indicesR = indices_pack shape = len(indicesL),len(indicesR) if kwargs: raise ValueError, "GfReFreq: Unused parameters %s were passed."%kwargs.keys() return (mesh, shape, indices_pack, name), {}
def init_tv( mesh = None, shape = None, name = 'g', **kwargs): """ """ if mesh is None: from gf import MeshReTime window = kwargs.pop('window') t_min = window[0] t_max = window[1] n_max = kwargs.pop('n_points',10000) mesh = MeshReTime(t_min, t_max, n_max) indices_pack = get_indices_in_dict_tv(kwargs) if not shape: assert indices_pack, "No shape, no indices !" indicesL, indicesR = indices_pack shape = len(indicesL),len(indicesR) if kwargs: raise ValueError, "GfReFreq: Unused parameters %s were passed."%kwargs.keys() return (mesh, shape, indices_pack, name), {}
def init_tv( mesh = None, shape = None, name = 'g', **kwargs): """ """ if mesh is None: from gf import MeshImTime if 'beta' not in kwargs: raise ValueError, "beta not provided" beta = float(kwargs.pop('beta')) n_max = kwargs.pop('n_points',10000) stat = kwargs.pop('statistic','Fermion') mesh = MeshImTime(beta,stat,n_max) indices_pack = get_indices_in_dict_tv(kwargs) if not shape: assert indices_pack, "No shape, no indices !" indices = indices_pack shape = [len(x) for x in indices] if kwargs: raise ValueError, "GfImTime: Unused parameters %s were passed."%kwargs.keys() return (mesh, shape, indices_pack, name), {}
def init_tv( mesh=None, shape=None, name='g', **kwargs): """ python adaptor for the construction of a gf<imfreq, tensor_valued> args: {mesh, indices} or {beta,[n_points], [statistic], indices} """ if mesh is None: from gf import MeshImFreq if 'beta' not in kwargs: raise ValueError, "beta not provided" beta = float(kwargs.pop('beta')) n_points = kwargs.pop('n_points',1025) stat = kwargs.pop('statistic','Fermion') mesh = MeshImFreq(beta,stat,n_points) indices_pack = get_indices_in_dict_tv(kwargs) if not shape: assert indices_pack, "No shape, no indices !" indices = indices_pack shape = [len(x) for x in indices] if kwargs: raise ValueError, "GfImFreq: Unused parameters %s were passed."%kwargs.keys() return (mesh, shape, indices_pack, name), {}
def init_tv(mesh=None, shape=None, name='g', **kwargs): """ python adaptor for the construction of a gf<imfreq, tensor_valued> args: {mesh, indices} or {beta,[n_points], [statistic], indices} """ if mesh is None: from gf import MeshImFreq if 'beta' not in kwargs: raise ValueError, "beta not provided" beta = float(kwargs.pop('beta')) n_points = kwargs.pop('n_points', 1025) stat = kwargs.pop('statistic', 'Fermion') mesh = MeshImFreq(beta, stat, n_points) indices_pack = get_indices_in_dict_tv(kwargs) if not shape: assert indices_pack, "No shape, no indices !" indices = indices_pack shape = [len(x) for x in indices] if kwargs: raise ValueError, "GfImFreq: Unused parameters %s were passed." % kwargs.keys( ) return (mesh, shape, indices_pack, name), {}