コード例 #1
0
ファイル: sigresviewer.py プロジェクト: zbwang/abipy
    def __init__(self, parent, ebands, **kwargs):
        """
        Args:
            parent:
                Parent window
            ebands:
                `ElectronBands` object.
        """
        self.band_range = kwargs.pop("band_range", None)

        super(EbandsWithMarkersPlotFrame, self).__init__(parent, -1, **kwargs)
        self.SetTitle("Select parameters")

        self.ebands = ebands

        if not ebands.markers:
            raise awx.Error("Found empty markers dictionary in ebands %s" % repr(ebands))

        self.BuildUi()
コード例 #2
0
ファイル: timer.py プロジェクト: zbwang/abipy
    def __init__(self, parent, filepath, **kwargs):
        """
        Args:
            parent:
                parent window
            filepath:
                Abinit output file.
        """
        filepath = os.path.abspath(filepath)
        if "title" not in kwargs:
            kwargs["title"] = "Abinit Timer: %s" % os.path.basename(filepath)

        super(AbinitTimerFrame, self).__init__(parent, **kwargs)

        try:
            self.timer = AbinitTimerParser()
            self.timer.parse(filepath)

        except Exception as exc:
            raise awx.Error(str(exc))

        self.BuildUi()