Example #1
0
    def _readGridChains(self, batchPath):
        """
        Setup of a grid chain.
        """
        # Reset data
        self._resetPlotData()
        self._resetGridData()
        self.is_grid = True
        logging.debug("Read grid chain in %s" % batchPath)
        try:
            batch = batchJob.readobject(batchPath)
        except:
            batchJob.resetGrid(batchPath)
            batch = batchJob.readobject(batchPath)

        self.batch = batch
        items = dict()
        for jobItem in batch.items(True, True):
            if jobItem.chainExists():
                if not jobItem.paramtag in items: items[jobItem.paramtag] = []
                items[jobItem.paramtag].append(jobItem)
        logging.debug("Found %i names for grid" % len(items.keys()))
        self.grid_paramtag_jobItems = items

        self.getPlotter(chain_dir=self.rootdirname)

        self.comboBoxRootname.hide()
        self.listRoots.show()
        self.pushButtonRemove.show()
        self.comboBoxParamTag.clear()
        self.comboBoxParamTag.addItems(sorted(self.grid_paramtag_jobItems.keys()))
        self.setParamTag(self.comboBoxParamTag.itemText(0))
        self.comboBoxParamTag.show()
        self.comboBoxDataTag.show()
Example #2
0
 def reLoad(self):
     adir = self.getSettings().value('lastSearchDirectory')
     batchJob.resetGrid(adir)
     self.openDirectory(adir)