def createThread(self): self.maxent_alg = mantid.AlgorithmManager.create("MuonMaxent") calculation_function = functools.partial(self.calculate_maxent, self.maxent_alg) self._maxent_calculation_model = ThreadModelWrapper( calculation_function) return thread_model.ThreadModel(self._maxent_calculation_model)
def createThread(self): self.maxent_alg = mantid.AlgorithmManager.create("MuonMaxent") self._maxent_output_workspace_name = get_maxent_workspace_name( self.get_parameters_for_maxent_calculation()['InputWorkspace'], self.view.get_method) calculation_function = functools.partial(self.calculate_maxent, self.maxent_alg) self._maxent_calculation_model = ThreadModelWrapper(calculation_function) return thread_model.ThreadModel(self._maxent_calculation_model)
def handle_peak_algorithms(self, parameters): self.peak_algo_model = ThreadModelWrapper( lambda: self._run_peak_algorithms(parameters)) self.peak_algo_thread = thread_model.ThreadModel(self.peak_algo_model) self.peak_algo_thread.threadWrapperSetUp( self.handle_calculation_started, self.calculation_success, self.handle_calculation_error) self.peak_algo_thread.start()
def handle_rebin(self, name, rebin_type, rebin_param): self.rebin_model = ThreadModelWrapper( lambda: self._run_rebin(name, rebin_type, rebin_param)) self.rebin_thread = thread_model.ThreadModel(self.rebin_model) self.rebin_thread.threadWrapperSetUp( on_thread_start_callback=self.handle_calculation_started, on_thread_end_callback=self.calculation_success, on_thread_exception_callback=self.handle_calculation_error) self.rebin_thread.start()
def create_update_thread(self): self._update_model = ThreadModelWrapper(self.calculate_all_data) return thread_model.ThreadModel(self._update_model)
def create_phase_quad_calculation_thread(self): self._phasequad_calculation_model = ThreadModelWrapper( self.calculate_phase_quad) return thread_model.ThreadModel(self._phasequad_calculation_model)
def create_phase_table_calculation_thread(self): self._calculation_model = ThreadModelWrapper( self.calculate_phase_table) return thread_model.ThreadModel(self._calculation_model)