Exemple #1
0
    def load_lattice(self, filePath):
        """
        loads an original Genesis-style lattice into a standard_lattice
        """

        eles, params = parsers.parse_genesis_lattice(filePath)

        self.lattice = lattice.standard_lattice_from_eles(eles)
        self.lattice_params = params
Exemple #2
0
    def load_lattice(self, filePath=None, verbose=False):
        """
        loads an original Genesis-style lattice into a standard_lattice
        """
        if not filePath:
            fname = os.path.join(self.path, self.param['maginfile'])
        else:
            fname = filePath

        self.vprint('loading lattice: ', fname)

        lat = parsers.parse_genesis_lattice(fname)
        # Standardize
        lat['eles'] = lattice.standard_eles_from_eles(lat['eles'])
        self.input['lattice'] = lat