Esempio n. 1
0
    def _showEmanCtf(self, paramName=None):
        program = eman2.Plugin.getProgram('e2ctf.py')
        args = '--allparticles --minptcl=0 --minqual=0'
        args += ' --gui --constbfactor=-1.0 --sf=auto'

        hostConfig = self.protocol.getHostConfig()
        # Create the steps executor
        executor = StepExecutor(hostConfig)
        self.protocol.setStepsExecutor(executor)
        # Finally run the protocol

        self.protocol.runJob(program,
                             args,
                             cwd=self.protocol._getExtraPath(),
                             numberOfMpi=1,
                             numberOfThreads=1)

        # Open dialog to request confirmation to overwrite output
        saveChanges = askYesNo(
            "Save output changes?",
            "Do you want to overwrite output particles with new CTF values?\n"
            "This may take a while depending on the set size.",
            self.getTkRoot())
        if saveChanges:
            self.protocol.createOutputStep()
            showInfo("Output updated",
                     "Output particles were updated with new CTF values.",
                     self.getTkRoot())
Esempio n. 2
0
 def onVariables(self):
     if pluginDict is not None:
         msg = ""
         pluginsVars = pluginDict.values()[0].getPluginClass().getVars()
         for var in pluginsVars:
             msg = msg + var + ': ' + pluginsVars[var] + '\n'
         pwgui.showInfo("Plugin variables", msg, tk.Frame())
Esempio n. 3
0
    def _onVarChanged(self, *args):
        sampleKeys = self.samplesTree.selection()

        if sampleKeys:
            self.computeFit()
            self.plotResults()
        else:
            dialog.showInfo("Warning","Please select some sample(s) to plot.",self)
Esempio n. 4
0
    def _onVarChanged(self, *args):
        sampleKeys = self.samplesTree.selection()

        if sampleKeys:
            self.computeFit()
            self.plotResults()
        else:
            dialog.showInfo("Warning","Please select some sample(s) to plot.",self)
Esempio n. 5
0
def checkFileIntegrityGUI(fn, parent):
    ok = verifyMD5(fn)
    if ok:
        showInfo("File integrity", "File is OK", parent)
    else:
        showError(
            "File integrity",
            "File seems to have been modified since its creation. Not OK",
            parent)
Esempio n. 6
0
 def _showHelp(self, event=None):
     showInfo(
         'CTFTomoSeries viewer help',
         'This viewer calculates the standard deviation with respect '
         'to the mean of the defocusU and defocusV values. If the '
         'values of the images are not in the 20% range from the average '
         'they are marked as *Failed* and therefore the CTFTomoSerie is '
         'marked as *Failed* as well.\n\n'
         'On the other hand, the viewer allows you to create two '
         'subsets of CTFTomoSeries which are classified as good '
         'and bad respectively.\n\n'
         'Note: The series that are checked are the ones that '
         'represent the bad CTFTomoSeries', self.parent)
Esempio n. 7
0
    def _onSampleChanged(self, e=None):
        sampleKeys = self.samplesTree.selection()

        if sampleKeys:
            # When the sample is changed we need to re-compute (with log or not)
            # the x, y values
            self.sample = self.experiment.samples[sampleKeys[0]]
            self.xValues, self.yValues = self.sample.getXYValues(self.varNameX,
                                                                 self.varNameY)
            self.newXValues, self.newYValues = self.computePlotValues(self.xValues[0],
                                                                      self.yValues[0])
            self._updateModel()
            self.computeFit()
            self.plotResults()
        else:
            dialog.showInfo("Warning","Please select some sample(s) to plot.",self)
Esempio n. 8
0
    def show(self, form, *params):
        try:
            acquisitionInfo = form.protocol.loadAcquisitionInfo()
            if isinstance(acquisitionInfo, dict):
                # If acquisitionInfo is None means something is wrong.
                # Now, let's try to show a meaningful error message.
                self._setAcquisition(form, acquisitionInfo)
            else:
                # If not dict, it should be an error message
                dialog.showError("Input error", acquisitionInfo, form.root)

        except FileNotFoundError as e:
            dialog.showInfo(
                "File not found",
                "Metadata file with acquisition not found.\n\n %s" % e,
                form.root)
Esempio n. 9
0
    def _onSampleChanged(self, e=None):
        sampleKeys = self.samplesTree.selection()

        if sampleKeys:
            # When the sample is changed we need to re-compute (with log or not)
            # the x, y values
            self.sample = self.experiment.samples[sampleKeys[0]]
            self.xValues, self.yValues = self.sample.getXYValues(self.varNameX,
                                                                 self.varNameY)
            self.newXValues, self.newYValues = self.computePlotValues(self.xValues[0],
                                                                      self.yValues[0])
            self._updateModel()
            self.computeFit()
            self.plotResults()
        else:
            dialog.showInfo("Warning","Please select some sample(s) to plot.",self)
Esempio n. 10
0
def checkFileIntegrityGUI(fn,parent):
    ok = verifyMD5(fn)
    if ok:
        showInfo("File integrity", "File is OK", parent)
    else:
        showError("File integrity","File seems to have been modified since its creation. Not OK", parent)