Esempio n. 1
0
    def loadParamsFromHDF5(self):
        """ Set detector, positioner, laser etc. params from values saved in a
        user-picked HDF5 snap/recording. """

        filePath = guitools.askForFilePath(self.__mainView,
                                           'Open HDF5 file',
                                           nameFilter='*.hdf5')
        if not filePath:
            return

        attrs = SharedAttributes.fromHDF5File(filePath)
        self.__commChannel.sharedAttrs.update(attrs)
Esempio n. 2
0
    def loadScan(self):
        fileName = guitools.askForFilePath(self._widget, 'Load scan', self.scanDir)
        if not fileName:
            return

        self.loadScanParamsFromFile(fileName)
Esempio n. 3
0
    def saveScan(self):
        fileName = guitools.askForFilePath(self._widget, 'Save scan', self.scanDir, isSaving=True)
        if not fileName:
            return

        self.saveScanParamsToFile(fileName)