def _executeFunctionAndParameters(self):
        self._parameters = self.configurationWidget.getParameters()
        self._widget = None
        if self.fitInstance is None:
            self.fitInstance = FastXRFLinearFit.FastXRFLinearFit()
        #self._fitConfigurationFile="E:\DATA\COTTE\CH1777\G4-4720eV-NOWEIGHT-Constant-batch.cfg"

        if DEBUG:
            self.thread = CalculationThread.CalculationThread(\
                            calculation_method=self.actualCalculation)
            self.thread.result = self.actualCalculation()
            self.threadFinished()
        else:
            self.thread = CalculationThread.CalculationThread(\
                            calculation_method=self.actualCalculation)
            #qt.QObject.connect(self.thread,
            #             qt.SIGNAL('finished()'),
            #             self.threadFinished)
            self.thread.start()
            message = "Please wait. Calculation going on."
            CalculationThread.waitingMessageDialog(self.thread,
                                parent=self.configurationWidget,
                                message=message)
            while self.thread.isRunning():
                time.sleep(2)
            self.threadFinished()
 def __calculateShiftsSIFT(self, *var, **kw):
     self._progress = 0.0
     thread = CalculationThread.CalculationThread(\
             calculation_method=self.calculateShiftsSIFT,
             calculation_vars=var,
             calculation_kw=kw)
     thread.start()
     CalculationThread.waitingMessageDialog(thread,
                                            message="Please wait. Calculation going on.",
                                            parent=self.widget,
                                            modal=True,
                                            update_callback=self._waitingCallback)
     return thread.result
 def __replaceStackByXASNormalizedData(self, *var, **kw):
     self._progress = 0.0
     thread = CalculationThread.CalculationThread(\
             calculation_method=self.replaceStackByXASNormalizedData,
             calculation_vars=var,
             calculation_kw=kw)
     thread.start()
     CalculationThread.waitingMessageDialog(thread,
                                            message="Please wait. Calculation going on.",
                                            parent=self.widget,
                                            modal=True,
                                            update_callback=self._waitingCallback)
     return thread.result
 def __replaceStackByXASNormalizedData(self, *var, **kw):
     self._progress = 0.0
     thread = CalculationThread.CalculationThread(\
             calculation_method=self.replaceStackByXASNormalizedData,
             calculation_vars=var,
             calculation_kw=kw)
     thread.start()
     CalculationThread.waitingMessageDialog(
         thread,
         message="Please wait. Calculation going on.",
         parent=self.widget,
         modal=True,
         update_callback=self._waitingCallback)
     return thread.result
Example #5
0
 def _executeFunctionAndParameters(self):
     _logger.debug("NNMAStackPlugin _executeFunctionAndParameters")
     self.widget = None
     self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
     self.thread.finished.connect(self.threadFinished)
     self.configurationWidget.show()
     message = "Please wait. NNMA Calculation going on."
     _logger.debug("NNMAStackPlugin starting thread")
     self.thread.start()
     _logger.debug("NNMAStackPlugin waitingMessageDialog")
     CalculationThread.waitingMessageDialog(self.thread,
                             message=message,
                             parent=self.configurationWidget)
     _logger.debug("NNMAStackPlugin waitingMessageDialog passed")
Example #6
0
 def _executeFunctionAndParameters(self):
     _logger.debug("NNMAStackPlugin _executeFunctionAndParameters")
     self.widget = None
     self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
     self.thread.finished.connect(self.threadFinished)
     self.configurationWidget.show()
     message = "Please wait. NNMA Calculation going on."
     _logger.debug("NNMAStackPlugin starting thread")
     self.thread.start()
     _logger.debug("NNMAStackPlugin waitingMessageDialog")
     CalculationThread.waitingMessageDialog(self.thread,
                             message=message,
                             parent=self.configurationWidget)
     _logger.debug("NNMAStackPlugin waitingMessageDialog passed")
Example #7
0
 def _executeFunctionAndParameters(self):
     self.widget = None
     self.configurationWidget.show()
     if _logger.getEffectiveLevel() == logging.DEBUG:
         self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
         self.thread.result = self.actualCalculation()
         self.threadFinished()
     else:
         self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
         self.thread.finished.connect(self.threadFinished)
         self.thread.start()
         message = "Please wait. PCA Calculation going on."
         CalculationThread.waitingMessageDialog(
             self.thread, message=message, parent=self.configurationWidget)
Example #8
0
 def _executeFunctionAndParameters(self):
     self._parameters = self.configurationWidget.getParameters()
     self._widget = None
     if DEBUG:
         self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
         self.thread.result = self.actualCalculation()
         self.threadFinished()
     else:
         self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
         self.thread.finished.connect(self.threadFinished)
         self.thread.start()
         message = "Please wait. Calculation going on."
         CalculationThread.waitingMessageDialog(
             self.thread, parent=self.configurationWidget, message=message)
Example #9
0
 def _executeFunctionAndParameters(self):
     self.widget = None
     self.configurationWidget.show()
     if DEBUG:
         self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
         self.thread.result = self.actualCalculation()
         self.threadFinished()
     else:
         self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
         self.thread.finished.connect(self.threadFinished)
         self.thread.start()
         message = "Please wait. PCA Calculation going on."
         CalculationThread.waitingMessageDialog(self.thread,
                             message=message,
                             parent=self.configurationWidget)
Example #10
0
 def _executeFunctionAndParameters(self):
     self._parameters = self.configurationWidget.getParameters()
     self._widget = None
     if _logger.getEffectiveLevel() == logging.DEBUG:
         self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
         self.thread.result = self.actualCalculation()
         self.threadFinished()
     else:
         self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
         self.thread.finished.connect(self.threadFinished)
         self.thread.start()
         message = "Please wait. Calculation going on."
         CalculationThread.waitingMessageDialog(self.thread,
                             parent=self.configurationWidget,
                             message=message)
Example #11
0
 def _executeFunctionAndParameters(self):
     self._parameters = self.configurationWidget.getParameters()
     self._widget = None
     if self.workerInstance is None:
         self.workerInstance = StackROIBatch.StackROIBatch()
     if _logger.getEffectiveLevel() == logging.DEBUG:
         self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
         self.thread.result = self.actualCalculation()
         self.threadFinished()
     else:
         self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
         self.thread.finished.connect(self.threadFinished)
         self.thread.start()
         message = "Please wait. Calculation going on."
         CalculationThread.waitingMessageDialog(
             self.thread, parent=self.configurationWidget, message=message)
Example #12
0
 def _executeFunctionAndParameters(self):
     self._parameters = self.configurationWidget.getParameters()
     self._widget = None
     if self.workerInstance is None:
         self.workerInstance = StackROIBatch.StackROIBatch()
     if DEBUG:
         self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
         self.thread.result = self.actualCalculation()
         self.threadFinished()
     else:
         self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
         self.thread.finished.connect(self.threadFinished)
         self.thread.start()
         message = "Please wait. Calculation going on."
         CalculationThread.waitingMessageDialog(self.thread,
                             parent=self.configurationWidget,
                             message=message)
Example #13
0
    def _executeFunctionAndParameters(self):
        self._parameters = self.configurationWidget.getParameters()
        self._widget = None
        if self.fitInstance is None:
            self.fitInstance = FastXRFLinearFit.FastXRFLinearFit()
        #self._fitConfigurationFile="E:\DATA\COTTE\CH1777\G4-4720eV-NOWEIGHT-Constant-batch.cfg"

        if DEBUG:
            self.thread = CalculationThread.CalculationThread(\
                            calculation_method=self.actualCalculation)
            self.thread.result = self.actualCalculation()
            self.threadFinished()
        else:
            self.thread = CalculationThread.CalculationThread(\
                            calculation_method=self.actualCalculation)
            self.thread.finished.connect(self.threadFinished)
            self.thread.start()
            message = "Please wait. Calculation going on."
            CalculationThread.waitingMessageDialog(
                self.thread, parent=self.configurationWidget, message=message)
Example #14
0
 def _executeFunctionAndParameters(self):
     if DEBUG:
         print("NNMAStackPlugin _executeFunctionAndParameters")
     self.widget = None
     self.thread = CalculationThread.CalculationThread(\
                         calculation_method=self.actualCalculation)
     qt.QObject.connect(self.thread,
                  qt.SIGNAL('finished()'),
                  self.threadFinished)
     self.configurationWidget.show()
     message = "Please wait. NNMA Calculation going on."
     if DEBUG:
         print("NNMAStackPlugin starting thread")
     self.thread.start()
     if DEBUG:
         print("NNMAStackPlugin waitingMessageDialog")
     CalculationThread.waitingMessageDialog(self.thread,
                             message=message,
                             parent=self.configurationWidget)
     if DEBUG:
         print("NNMAStackPlugin waitingMessageDialog passed")
    def _executeFunctionAndParameters(self):
        self._parameters = self.configurationWidget.getParameters()
        self._widget = None
        if self.fitInstance is None:
            self.fitInstance = FastXRFLinearFit.FastXRFLinearFit()
        #self._fitConfigurationFile="E:\DATA\COTTE\CH1777\G4-4720eV-NOWEIGHT-Constant-batch.cfg"

        if _logger.getEffectiveLevel() == logging.DEBUG:
            self.thread = CalculationThread.CalculationThread(\
                            calculation_method=self.actualCalculation)
            self.thread.result = self.actualCalculation()
            self.threadFinished()
        else:
            self.thread = CalculationThread.CalculationThread(\
                            calculation_method=self.actualCalculation)
            self.thread.finished.connect(self.threadFinished)
            self.thread.start()
            message = "Please wait. Calculation going on."
            CalculationThread.waitingMessageDialog(self.thread,
                                parent=self.configurationWidget,
                                message=message)
Example #16
0
 def _startWork(self):
     self.setEnabled(False)
     self.progressBar.show()
     thread = CalculationThread.CalculationThread(parent=self,
                             calculation_method=self.processStack)
     thread.start()
     self._total = 100
     self._index = 0
     while thread.isRunning():
         time.sleep(2)
         qApp = qt.QApplication.instance()
         qApp.processEvents()
         self.progressBar.setMaximum(self._total)
         self.progressBar.setValue(self._index)
     self.progressBar.hide()
     self.setEnabled(True)
     if thread.result is not None:
         if len(thread.result):
             raise Exception(*thread.result[1:])