Changeset 14ec7dfd in sasview for src/sas


Ignore:
Timestamp:
Sep 14, 2018 6:39:20 AM (6 years ago)
Author:
wojciech
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
4fbf0db
Parents:
e2451f2
Message:

Fix to disable 2D data in P(r) calculations

File:
1 edited

Legend:

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

    r4b7d322 r14ec7dfd  
    459459            # Create initial internal mappings 
    460460            self.logic.data = GuiUtils.dataFromItem(data) 
     461            if not isinstance(self.logic.data, Data1D): 
     462                msg = "P(r) perspective works for 1D data only" 
     463                logger.warning(msg) 
     464                continue 
    461465            # Estimate q range 
    462466            qmin, qmax = self.logic.computeDataRange() 
     
    468472            self.populateDataComboBox(self.logic.data.filename, data) 
    469473        self.dataList.setCurrentIndex(len(self.dataList) - 1) 
    470         self.setCurrentData(data) 
     474        #Checking for 1D again to mitigate the case when 2D data is last on the data list 
     475        if isinstance(self.logic.data, Data1D): 
     476            self.setCurrentData(data) 
    471477 
    472478    def updateDataList(self, dataRef): 
Note: See TracChangeset for help on using the changeset viewer.