예제 #1
0
    def OnFileLoad(self, e):
        """Load workspace"""
        #
        #  Get access to main app
        #
        app = wx.GetApp()

        dlg = wx.FileDialog(self,
                            'Load Experiment',
                            style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST
                            | wx.FD_CHANGE_DIR)
        if dlg.ShowModal() == wx.ID_OK:
            f = dlg.GetPath()
            pass
        dlg.Destroy()

        try:
            self.SetStatusText('Loading Experiment File')
            app.ws = loadExp(f)
            self.SetStatusText('Done Loading Experiment File')
            self.updateFromExp()
        except Exception as e:
            wx.MessageBox('failed to load experiment:\n%s' % str(e))
            pass

        self.updateFromExp()

        return
예제 #2
0
    def OnFileLoad(self, e):
        """Load workspace"""
        #
        #  Get access to main app
        #
        app = wx.GetApp()

        dlg = wx.FileDialog(self, 'Load Experiment',
                            style=wx.FD_OPEN |
                                  wx.FD_FILE_MUST_EXIST |
                                  wx.FD_CHANGE_DIR)
        if dlg.ShowModal() == wx.ID_OK:
            f = dlg.GetPath()
            pass
        dlg.Destroy()

        try:
            self.SetStatusText('Loading Experiment File')
            app.ws = loadExp(f)
            self.SetStatusText('Done Loading Experiment File')
            self.updateFromExp()
        except Exception as e:
            wx.MessageBox('failed to load experiment:\n%s' % str(e))
            pass

        self.updateFromExp()

        return
예제 #3
0
    def OnFileNew(self, e):
        """Create a new experiment"""
        app = wx.GetApp()
        app.ws = loadExp('')
        #  NOW:  need to update workspace
        self.updateFromExp()

        return
예제 #4
0
    def OnFileNew(self, e):
        """Create a new experiment"""
        app = wx.GetApp()
        app.ws = loadExp('')
        #  NOW:  need to update workspace
        self.updateFromExp()

        return
예제 #5
0
    def __makeData(self, inpFile):
        """Keep globals for easy access from subwindows"""
        #
        #  Data
        #
        #  * XRD Workspace
        #
        self.ws = loadExp(inpFile)
        #
        #  * Image Information
        #
        self.imgMode = ImageModes.SINGLE_FRAME
        self.imgCal = None
        self.imgSweep = None

        return
예제 #6
0
    def __makeData(self, inpFile):
        """Keep globals for easy access from subwindows"""
        #
        #  Data
        #
        #  * XRD Workspace
        #
        self.ws = loadExp(inpFile)
        #
        #  * Image Information
        #
        self.imgMode  = ImageModes.SINGLE_FRAME
        self.imgCal   = None
        self.imgSweep = None

        return