Ignore:
Timestamp:
Apr 10, 2018 1:53:59 PM (6 years ago)
Author:
krzywon
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
76567bb
Parents:
bb6b037
Message:

First vestiges of the batch inversion results panel built off of the batch fit panel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Inversion/InversionPerspective.py

    rbb6b037 reffdd98  
    1616# pr inversion calculation elements 
    1717from sas.sascalc.pr.invertor import Invertor 
     18 
     19# Batch calculation display 
     20from sas.qtgui.Utilities.GridPanel import BatchInversionOutputPanel 
    1821 
    1922def is_float(value): 
     
    7376 
    7477        # Calculation threads used by all data items 
     78        self.waitForEach = False 
    7579        self.calc_thread = None 
    7680        self.estimation_thread = None 
     
    9094        self.model = QtGui.QStandardItemModel(self) 
    9195        self.mapper = QtWidgets.QDataWidgetMapper(self) 
     96 
     97        self.grid_window = None 
    9298 
    9399        # Add validators 
     
    374380        self.dmaxWindow.show() 
    375381 
     382    def showBatchOutput(self, output_data): 
     383        if self.grid_window is None: 
     384            self.grid_window = BatchInversionOutputPanel( 
     385                parent=self, output_data=output_data) 
     386        self.grid_window.show() 
     387 
    376388    ###################################################################### 
    377389    # Response Actions 
     
    451463                           QtGui.QStandardItem("{:.4g}".format(pr.get_qmax()))) 
    452464        self.model.setItem(WIDGETS.W_BACKGROUND_INPUT, 
    453                            QtGui.QStandardItem("{:.3f}".format(pr.background))) 
     465                           QtGui.QStandardItem("{:.3g}".format(pr.background))) 
    454466        self.model.setItem(WIDGETS.W_BACKGROUND_OUTPUT, 
    455467                           QtGui.QStandardItem("{:.3g}".format(pr.background))) 
     
    511523    # Thread Creators 
    512524    def startThreadAll(self): 
     525        self.waitForEach = True 
     526        output = {} 
    513527        for data_ref in self._data_list.keys(): 
    514528            self.setCurrentData(data_ref) 
    515529            self.startThread() 
     530            output[self.logic.data.filename] = self._calculator 
     531        self.waitForEach = False 
     532        self.showBatchOutput(output) 
    516533 
    517534    def startThread(self): 
     
    535552        self.calc_thread.queue() 
    536553        self.calc_thread.ready(2.5) 
     554        if self.waitForEach: 
     555            if self.calc_thread.isrunning(): 
     556                self.calc_thread.update() 
    537557 
    538558    def performEstimateNT(self): 
Note: See TracChangeset for help on using the changeset viewer.