Changeset 75906a1 in sasview


Ignore:
Timestamp:
Oct 26, 2018 4:39:39 AM (5 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:
9d23e4c, 722b7d6
Parents:
aed159f
Message:

More fixes from PK's CR

Location:
src/sas/qtgui
Files:
7 edited

Legend:

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

    r8748751 r75906a1  
    33643364        else: 
    33653365            index = self.theory_item 
     3366        params = FittingUtilities.getStandardParam(self._model_model) 
    33663367        report_logic = ReportPageLogic(self, 
    33673368                                       kernel_module=self.kernel_module, 
    33683369                                       data=self.data, 
    33693370                                       index=index, 
    3370                                        model=self._model_model) 
     3371                                       params=params) 
    33713372 
    33723373        return report_logic.reportList() 
  • src/sas/qtgui/Perspectives/Fitting/ReportPageLogic.py

    r085ee014 r75906a1  
    1313 
    1414import sas.qtgui.Utilities.GuiUtils as GuiUtils 
    15 from sas.qtgui.Perspectives.Fitting import FittingUtilities 
    1615 
    1716class ReportPageLogic(object): 
     
    1918    Logic for the Report Page functionality. Refactored from FittingWidget. 
    2019    """ 
    21     def __init__(self, parent=None, kernel_module=None, data=None, index=None, model=None): 
     20    def __init__(self, parent=None, kernel_module=None, data=None, index=None, params=None): 
    2221 
    2322        self.parent = parent 
     
    2524        self.data = data 
    2625        self._index = index 
    27         self.model = model 
     26        self.params = params 
    2827 
    2928    @staticmethod 
     
    119118        Look at widget state and extract parameters 
    120119        """ 
    121         pars = FittingUtilities.getStandardParam(self.model) 
    122         if pars is None: 
     120        if self.params is None: 
    123121            return "" 
    124122 
    125123        report = "" 
    126124        plus_minus = " &#177; " 
    127         for value in pars: 
     125        for value in self.params: 
    128126            try: 
    129127                par_name = value[1] 
  • src/sas/qtgui/Plotting/Binder.py

    rcee5c78 r75906a1  
    233233        """ 
    234234        # TODO: sort by zorder of axes then by zorder within axes 
    235         #self._artists.sort(cmp=lambda x, y: cmp(y.zorder, x.zorder)) 
    236         #self._artists.sort(cmp=lambda x, y: y.zorder.__gt__(x.zorder)) 
    237235        found = Selection() 
     236        self._artists.sort(key=lambda x: x.zorder, reverse=True) 
    238237        for artist in self._artists: 
    239238            # TODO: should contains() return false if invisible? 
  • src/sas/qtgui/Plotting/ConvertUnits.py

    rb8080e1 r75906a1  
    1010    """ 
    1111    if power != 0: 
    12         if unit.find("^") != -1:  # if the unit contains a powerer ^ 
    13             toks = re.split("\^", unit) 
     12        if unit.find("^") != -1:  # if the unit contains a power ^ 
     13            toks = re.split(r"\^", unit) 
    1414            if toks[0].find("/") != -1 or \ 
    1515                toks[0].find("-") != -1: 
  • src/sas/qtgui/Plotting/Slicers/AzimutSlicer.py

    re20870bc r75906a1  
    137137        sector = sect(self.base.data2D) 
    138138 
    139         from sas.sasgui.guiframe.dataFitting import Data1D 
     139        from sas.qtgui.Plotting.PlotterData import Data1D 
    140140        if hasattr(sector, "dxl"): 
    141141            dxl = sector.dxl 
  • src/sas/qtgui/Utilities/CategoryInstaller.py

    rc889a3e r75906a1  
    2626    def __init__(self): 
    2727        """ initialization """ 
    28  
    29     @staticmethod 
    30     def _get_installed_model_dir(): 
    31         """ 
    32         returns the dir where installed_models.txt should be 
    33         """ 
    34         import sas.sascalc.dataloader.readers 
    35         return sas.sascalc.dataloader.readers.get_data_path() 
    36  
    37     @staticmethod 
    38     def _get_models_py_dir(): 
    39         """ 
    40         returns the dir where models.py should be 
    41         """ 
    42         import sas.sasgui.perspectives.fitting.models 
    43         return sas.sasgui.perspectives.fitting.models.get_model_python_path() 
    44  
    45     @staticmethod 
    46     def _get_default_cat_file_dir(): 
    47         """ 
    48         returns the dir where default_cat.j should be 
    49         """ 
    50         # The default categories file is usually found with the code, except 
    51         # when deploying using py2app (it will be in Contents/Resources), or 
    52         # py2exe (it will be in the exec dir). 
    53         import sas.sasview 
    54         cat_file = "default_categories.json" 
    55  
    56         possible_cat_file_paths = [ 
    57             os.path.join(os.path.split(sas.sasview.__file__)[0], cat_file),           # Source 
    58             os.path.join(os.path.dirname(sys.executable), '..', 'Resources', cat_file), # Mac 
    59             os.path.join(os.path.dirname(sys.executable), cat_file)                     # Windows 
    60         ] 
    61  
    62         for path in possible_cat_file_paths: 
    63             if os.path.isfile(path): 
    64                 return os.path.dirname(path) 
    65  
    66         raise RuntimeError('CategoryInstaller: Could not find folder containing default categories') 
    6728 
    6829    @staticmethod 
  • src/sas/qtgui/Utilities/GridPanel.py

    ra4b9b7a r75906a1  
    491491        """ 
    492492        location = GuiUtils.HELP_DIRECTORY_LOCATION 
    493         url = "/user/sasgui/perspectives/pr/pr_help.html#batch-pr-mode" 
     493        url = "/user/qtgui/Perspectives/Fitting/fitting_help.html#batch-fit-mode" 
    494494        try: 
    495495            webbrowser.open('file://' + os.path.realpath(location + url)) 
Note: See TracChangeset for help on using the changeset viewer.