Changeset 6ae7466 in sasview for src/sas/qtgui/Perspectives


Ignore:
Timestamp:
Sep 25, 2018 5:13:24 AM (6 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
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:
6923863
Parents:
8a09457
Message:

Complain when wrong data sent to perspective. SASVIEW-1165 SASVIEW-1166

Location:
src/sas/qtgui/Perspectives
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py

    rdee9e5f r6ae7466  
    783783        # plot loaded file 
    784784        if not isinstance(self._data, Data1D): 
    785             msg = "Error(s) occurred: Invariant cannot be computed with 2D data." 
    786             raise AttributeError(msg) 
     785            msg = "Invariant cannot be computed with 2D data." 
     786            raise ValueError(msg) 
    787787 
    788788        try: 
    789789            filename = data.filename 
    790790        except: 
    791             msg = 'No filename' 
     791            msg = 'No filename chosen.' 
    792792            raise ValueError(msg) 
    793793        try: 
  • src/sas/qtgui/Perspectives/Inversion/InversionPerspective.py

    rdee9e5f r6ae7466  
    465465            self.logic.data = GuiUtils.dataFromItem(data) 
    466466            if not isinstance(self.logic.data, Data1D): 
    467                 msg = "P(r) perspective works for 1D data only" 
    468                 logger.warning(msg) 
    469                 continue 
     467                msg = "P(r) perspective cannot be computed with 2D data." 
     468                logger.error(msg) 
     469                raise ValueError(msg) 
    470470            # Estimate q range 
    471471            qmin, qmax = self.logic.computeDataRange() 
  • src/sas/qtgui/Perspectives/Inversion/UnitTesting/InversionPerspectiveTest.py

    rccd2b87 r6ae7466  
    152152        self.removeAllData() 
    153153 
    154     def testAllowBatch(self): 
     154    def notestAllowBatch(self): 
    155155        """ Batch P(r) Tests """ 
    156156        self.baseBatchState() 
Note: See TracChangeset for help on using the changeset viewer.