Пример #1
0
 def get_parser(self):
     p = self._parser
     if p is None:
         p = CSVColumnParser()
         p.load(self.file_source_path)
         self._parser = p
     return p
Пример #2
0
 def get_parser(self):
     p = self._parser
     if p is None:
         p = CSVColumnParser()
         p.load(self.file_source_path)
         self._parser = p
     return p
Пример #3
0
    def _load_analyses(self):
        from pychron.core.csv.csv_parser import CSVColumnParser

        par = CSVColumnParser(delimiter=',')
        par.load(self.path)
        if par.check(('runid', 'age', 'age_err')):
            return self._get_items_from_file(par)
        else:
            warning(None, 'Invalid file format. Minimum columns required are "runid", "age", "age_err"')
Пример #4
0
 def set_items_from_file(self, p):
     if os.path.isfile(p):
         # def construct(d):
         if p.endswith('.xls'):
             self.information_dialog('Plotting Spectra from Excel file not yet implemented')
         else:
             par = CSVColumnParser(delimiter='\t')
             par.load(p)
             self.analyses = self._get_items_from_file(par)
             self._update_analyses()
             self.dump_tool()
Пример #5
0
 def set_items_from_file(self, p):
     if os.path.isfile(p):
         # def construct(d):
         if p.endswith('.xls'):
             self.information_dialog(
                 'Plotting Spectra from Excel file not yet implemented')
         else:
             par = CSVColumnParser(delimiter='\t')
             par.load(p)
             self.analyses = self._get_items_from_file(par)
             self._update_analyses()
             self.dump_tool()
Пример #6
0
    def _load_analyses(self):
        from pychron.core.csv.csv_parser import CSVColumnParser

        par = CSVColumnParser(delimiter=',')
        par.load(self.path)
        if par.check(('runid', 'age', 'age_err')):
            return self._get_items_from_file(par)
        else:
            warning(
                None,
                'Invalid file format. Minimum columns required are "runid", "age", "age_err"'
            )
Пример #7
0
    def _load_csv_data(self, p):
        if os.path.isfile(p):
            parser = CSVColumnParser()
            parser.load(p)

            records = [CSVRecord(**row) for row in parser.values()]
            records.extend((CSVRecord() for i in range(50 - len(records))))
            self.records = records

            self._make_groups()

            self.data_path = p
            self.dirty = False
Пример #8
0
    def _load_analyses(self):
        from pychron.core.csv.csv_parser import CSVColumnParser

        par = CSVColumnParser(delimiter=',')
        par.load(self.path)
        return self._get_items_from_file(par)
Пример #9
0
 def load(self, p):
     cp = CSVColumnParser()
     cp.load(p)
     self._cp = cp
Пример #10
0
    def _load_analyses(self):
        from pychron.core.csv.csv_parser import CSVColumnParser

        par = CSVColumnParser(delimiter=',')
        par.load(self.path)
        return self._get_items_from_file(par)