Ignore:
Timestamp:
May 23, 2018 1:40:53 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, 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:
c03692f
Parents:
db7d2c7
Message:

Fixed a bug where weighting options would not correctly update on data load

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingLogic.py

    rd6e38661 r87dfca4  
    1616        self._data = data 
    1717        self.data_is_loaded = False 
     18        #dq data presence in the dataset 
     19        self.dq_flag = False 
     20        #di data presence in the dataset 
     21        self.di_flag = False 
    1822        if data is not None: 
    1923            self.data_is_loaded = True 
     24            self.setDataProperties() 
    2025 
    2126    @property 
     
    2833        self._data = value 
    2934        self.data_is_loaded = True 
     35        self.setDataProperties() 
    3036 
    3137    def isLoadedData(self): 
    3238        """ accessor """ 
    3339        return self.data_is_loaded 
     40 
     41    def setDataProperties(self): 
     42        """ 
     43        Analyze data and set up some properties important for 
     44        the Presentation layer 
     45        """ 
     46        if self._data.__class__.__name__ == "Data2D": 
     47            if self._data.err_data is not None and np.any(self._data.err_data): 
     48                self.di_flag = True 
     49            if self._data.dqx_data is not None and np.any(self._data.dqx_data): 
     50                self.dq_flag = True 
     51        else: 
     52            if self._data.dy is not None and np.any(self._data.dy): 
     53                self.di_flag = True 
     54            if self._data.dx is not None and np.any(self._data.dx): 
     55                self.dq_flag = True 
     56            elif self._data.dxl is not None and np.any(self._data.dxl): 
     57                self.dq_flag = True 
    3458 
    3559    def createDefault1dData(self, interval, tab_id=0): 
Note: See TracChangeset for help on using the changeset viewer.