Changes in / [aff7904:5881b17] in sasview


Ignore:
Files:
1 deleted
26 edited

Legend:

Unmodified
Added
Removed
  • build_tools/conda/bumps/meta.yaml

    r243fbc0 rb75079b  
    11package: 
    22  name: bumps 
    3   version: !!str 0.7.5.9 
     3  version: !!str 0.7.5.4 
    44 
    55source: 
    6   fn: bumps-0.7.5.9.tar.gz 
    7   url: https://pypi.python.org/packages/source/b/bumps/bumps-0.7.5.9.tar.gz 
     6  fn: bumps-0.7.5.4.tar.gz 
     7  url: https://pypi.python.org/packages/source/b/bumps/bumps-0.7.5.4.tar.gz 
    88  md5: a47c035fbb18afa5ca53067506a5ff1c 
    99#  patches: 
  • build_tools/jenkins_linux_build.sh

    r243fbc0 r9d5427f  
    1515rm -rf build 
    1616 
    17 "$EASY_INSTALL" -d "$WORKSPACE/utils" bumps==0.7.5.9 
     17"$EASY_INSTALL" -d "$WORKSPACE/utils" bumps==0.7.5.6 
    1818"$EASY_INSTALL" -d "$WORKSPACE/utils" periodictable==1.3.0 
    1919 
  • build_tools/jenkins_linux_build_ver02.sh

    r243fbc0 r22c1f1c  
    2727 
    2828 
    29 "$EASY_INSTALL" -d "$WORKSPACE/sasview/utils" bumps==0.7.5.9 
     29"$EASY_INSTALL" -d "$WORKSPACE/sasview/utils" bumps==0.7.5.6 
    3030"$EASY_INSTALL" -d "$WORKSPACE/sasview/utils" periodictable==1.3.0 
    3131 
  • build_tools/jenkins_osx_build.sh

    r5881b17 r5881b17  
    5555cd sasview 
    5656$PYTHON setup.py clean 
    57 $PYTHON setup.py build docs bdist_egg 
     57$PYTHON setup.py build 
     58#$PYTHON setup.py docs 
    5859 
    5960 
    60 # INSTALL SASVIEW 
     61# SASVIEW BUILD_egg with new docs 
    6162cd $WORKSPACE 
    6263cd sasview 
     64$PYTHON setup.py docs bdist_egg 
    6365cd dist 
    6466$EASY_INSTALL -d $WORKSPACE/sasview/sasview-install sasview*.egg 
    65  
    6667 
    6768# TEST 
     
    7172#$PYTHON utest_sasview.py 
    7273 
    73 # PYLINT 
    74 cd $WORKSPACE 
    75 cd sasview 
    76 $PYLINT --rcfile "build_tools/pylint.rc" -f parseable sasview-install/sasview*.egg/sas sasview | tee  test/sasview.txt 
     74## PYLINT 
     75#cd $WORKSPACE 
     76#cd sasview 
     77#$PYLINT --rcfile "build_tools/pylint.rc" -f parseable sasview-install/sasview*.egg/sas sasview | tee  test/sasview.txt 
     78 
    7779 
    7880# BUILD APP 
    79 cd $WORKSPACE 
    80 cd sasview/sasview 
    81 $PYTHON setup_mac.py py2app 
     81#cd $WORKSPACE 
     82#cd sasview/sasview 
     83#$PYTHON setup_mac.py py2app 
    8284 
  • build_tools/jenkins_rhel6_build.sh

    r243fbc0 r9d5427f  
    2828"$EASY_INSTALL" -d "$WORKSPACE/utils" lxml 
    2929"$EASY_INSTALL" -d "$WORKSPACE/utils" pyparsing==1.5.5 
    30 "$EASY_INSTALL" -d "$WORKSPACE/utils" bumps==0.7.5.9 
     30"$EASY_INSTALL" -d "$WORKSPACE/utils" bumps==0.7.5.6 
    3131"$EASY_INSTALL" -d "$WORKSPACE/utils" periodictable==1.3.0 
    3232python deps.py 
  • build_tools/jenkins_win32_build.bat

    r243fbc0 r9d5427f  
    1616RD /S /Q build 
    1717 
    18 rem %PYTHON% -m pip install -t ../sasview-install --no-deps bumps=0.7.5.9 
     18rem %PYTHON% -m pip install -t ../sasview-install --no-deps bumps=0.7.5.6 
    1919rem PYTHON% -m pip install -t ../sasview-install --no-deps periodictable=1.3.0 
    2020rem %PYTHON% -m pip install -t ../sasview-install --no-deps pyparsing=1.5.5 
  • build_tools/jenkins_win32_py27_build.bat

    r243fbc0 r9d5427f  
    1616RD /S /Q build 
    1717 
    18 rem %PYTHON% -m pip install -t ../sansview-install --no-deps bumps=0.7.5.9 
     18rem %PYTHON% -m pip install -t ../sansview-install --no-deps bumps=0.7.5.6 
    1919rem PYTHON% -m pip install -t ../sansview-install --no-deps periodictable=1.3.0 
    2020rem %PYTHON% -m pip install -t ../sansview-install --no-deps pyparsing=1.5.5 
  • build_tools/requirements.txt

    r243fbc0 ra985c93  
    99PIL==1.1.7 
    1010periodictable==1.3.0 
    11 bumps==0.7.5.9 
     11bumps==0.7.5.5 
    1212# numpy==1.6.1 
    1313# scipy==0.10.1 
  • check_packages.py

    r243fbc0 r8e7044c  
    1919    'pylint':{'version':None,'import_name':'pylint','test':None}, 
    2020    'periodictable':{'version':'1.3.0','import_name':'periodictable','test':'__version__'}, 
    21     'bumps':{'version':'0.7.5.9','import_name':'bumps','test':'__version__'}, 
     21    'bumps':{'version':'0.7.5.7','import_name':'bumps','test':'__version__'}, 
    2222    'numpy':{'version':'1.6.1','import_name':'numpy','test':'__version__'}, 
    2323    'scipy':{'version':'0.10.1','import_name':'scipy','test':'__version__'}, 
  • sasview/README.txt

    r243fbc0 r792e6be  
    441- Features 
    55=========== 
    6  
    7     - New in Version 4.0.0-alpha 
    8       -------------------- 
    9       This alpha release brings a major overhaul of the model system. The new model 
    10       package allows rapid integration of custom models and access to polydispersity 
    11       without requiring a compiler. 
    12  
    13       - Model package changes and improvements 
    14          - Model interface moved to independent sasmodels package. 
    15          - Most models converted to new interface. 
    16          - Allows rapid integration of user-written models. 
    17          - OpenCL GPU utilization for faster fitting. 
    18          - Improved numerical integration of Bessel functions. 
    19       - SESANS integration and implementation 
    20          - Scripting interface added for analysis of SESANS data. 
    21          - Hankel transformation now accepts finite acceptance angles. 
    22          - 2D cosine transformation added for TOF SESANS analysis. 
    23       - Documentation improvements 
    24          - The documentation tree was restructured for a better end user experience. 
    25          - The documentation for each model was revamped and verified by at least 
    26            two people following the conversion of the model. 
    27          - Theoretical 1D (and 2D if applicable) scattering curves are auto-generated 
    28            and added to the model documentation for each model. 
    29       - Separation of GUI and calculations for future GUI enhancements 
    30       - Bug fixes 
    31          - Fixes bug #411 No stop button on simultaneous fit page 
    32          - Fixes bug #410 Error with raspberry model 
    33          - Fixes bug #364 Possible inconsistency in Poly_GausCoil model 
    34          - Fixes bug #439 Hayter Penfold MSA code needs checking 
    35          - Fixes bug #484 lammellerPC is precision limited 
    36          - Fixes bug #498 $HOME/.matplotlib conflicts 
    37          - Fixes bug #348 Control order in which fit parameters appear in the gui 
    38          - Fixes bug #456 Provide DREAM Results Panel with something to identify 
    39            data and age of results 
    40          - Fixes bug #556 Build script improvements for developers 
    41  
    42  
    436 
    447   - New in Version 3.1.2 
     
    343306            - unittest-xml-reporting 1.12.0 (MAC 1.10.0) 
    344307            - matplotlib Version Installed: 1.4.3 (MAC 1.1.1) 
    345             - bumps Version Installed: 0.7.5.9 
     308            - bumps Version Installed: 0.7.5.6 
    346309            - scipy Version Installed: 0.16.0b2 (MAC 0.11.0) 
    347310            - periodictable Version Installed: 1.4.1 
  • sasview/__init__.py

    rfa4ea80 r792e6be  
    1 __version__ = "4.0.0-alpha" 
     1__version__ = "3.1.2" 
    22__build__ = "1" 
  • sasview/default_categories.json

    r42585bf r6313823  
    1 {"Shapes": [["cylinder", true], ["lamellar_stack_paracrystal", true], ["multilayer_vesicle", true], ["core_shell_cylinder", true], ["lamellar_hg", true], ["fuzzy_sphere", true], ["sphere", true], ["triaxial_ellipsoid", true], ["rectangular_prism", true], ["core_shell_bicelle", true], ["flexible_cylinder", true], ["flexible_cylinder_elliptical", true], ["binary_hard_sphere", true], ["core_multi_shell", true], ["sc_paracrystal", true], ["ellipsoid", true], ["capped_cylinder", true], ["core_shell_ellipsoid", true], ["fcc_paracrystal", true], ["core_shell_parallelepiped", true], ["core_shell_ellipsoid_xt", true], ["elliptical_cylinder", true], ["pringle", true], ["hollow_rectangular_prism_thin_walls", true], ["hollow_rectangular_prism", true], ["vesicle", true], ["polymer_micelle", true], ["parallelepiped", true], ["hollow_cylinder", true], ["linear_pearls", true], ["spherical_sld", true], ["raspberry", true], ["lamellar_hg_stack_caille", true], ["pearl_necklace", true], ["lamellar", true], ["onion", true], ["lamellar_stack_caille", true], ["bcc_paracrystal", true], ["core_shell_sphere", true], ["stacked_disks", true]], "Structure Factor": [["hayter_msa", true], ["squarewell", true], ["stickyhardsphere", true], ["hardsphere", true]], "Shape-Independent": [["guinier_porod", true], ["polymer_excl_volume", true], ["gel_fit", true], ["teubner_strey", true], ["mono_gauss_coil", true], ["mass_surface_fractal", true], ["mass_fractal", true], ["adsorbed_layer", true], ["two_lorentzian", true], ["fractal", true], ["fractal_core_shell", true], ["dab", true], ["poly_gauss_coil", true], ["star_polymer", true], ["broad_peak", true], ["surface_fractal", true], ["two_power_law", true], ["power_law", true], ["rpa", true], ["be_polyelectrolyte", true], ["peak_lorentz", true], ["guinier", true], ["correlation_length", true], ["line", true], ["gaussian_peak", true], ["porod", true], ["gauss_lorentz_gel", true], ["lorentz", true]]} 
     1{"Shapes": [["barbell", true], ["pearl_necklace", true], ["hollow_cylinder", true], ["CoreMultiShellModel", true], ["fcc_paracrystal", true], ["parallelepiped", true], ["fuzzy_sphere", true], ["core_shell_ellipsoid_xt", true], ["lamellarPC", true], ["bcc_paracrystal", true], ["ellptical_cylinder", true], ["hollow_rectangular_prism_infinitely_thin_walls", true], ["core_shell_parallelepiped", true], ["OnionExpShellModel", true], ["multi_shell", true], ["raspberry", true], ["core_shell_ellipsoid", true], ["capped_cylinder", true], ["cylinder", true], ["SphericalSLDModel", true], ["sc_crystal", true], ["stacked_disks", true], ["LamellarPSHGModel", true], ["core_shell_bicelle", true], ["hollow_rectangular_prism", true], ["LamellarPSModel", true], ["ellipsoid", true], ["sphere", true], ["vesicle", true], ["triaxial_ellipsoid", true], ["lamellar", true], ["pringles", true], ["rectangular_prism", true], ["core_shell_cylinder", true], ["BinaryHSModel", true], ["flexible_cylinder", true], ["lamellarFFHG", true], ["flexible_cylinder_ex", true], ["linear_pearls", true], ["core_shell_sphere", true]], "Structure Factor": [["squarewell", true], ["hayter_msa", true], ["hardsphere", true], ["stickyhardsphere", true]], "Shape-Independent": [["two_power_law", true], ["gel_fit", true], ["dab", true], ["power_law", true], ["porod", true], ["guinier", true], ["rpa", true], ["teubner_strey", true], ["star_polymer", true], ["UnifiedPowerRgModel", true], ["mass_surface_fractal", true], ["adsorbed_layer", true], ["two_lorentzian", true], ["mono_gauss_coil", true], ["mass_fractal", true], ["guinier_porod", true], ["correlation_length", true], ["polymer_excl_volume", true], ["FractalModel", true], ["peak_lorentz", true], ["broad_peak", true], ["fractal_core_shell", true], ["gaussian_peak", true], ["be_polyelectrolyte", true], ["poly_gauss_coil", true], ["surface_fractal", true], ["gauss_lorentz_gel", true], ["lorentz", true]], "Uncategorized": [["ReflectivityModel", true], ["ReflectivityIIModel", true], ["line", true], ["micell_spherical_coil", true]]} 
  • sasview/setup_exe.py

    ra7c4ad2 r40fc798  
    256256data_files += guiframe.data_files() 
    257257 
    258 #import sas.models as models 
    259 import sasmodels.models as models 
     258import sas.models as models 
    260259data_files += models.data_files() 
    261260 
     
    339338packages = [ 
    340339    'matplotlib', 'scipy', 'encodings', 'comtypes', 
    341     'win32com', 'xhtml2pdf', 'bumps','sasmodels', 'sas', 
     340    'win32com', 'xhtml2pdf', 'bumps', 
    342341    ] 
    343342packages.extend([ 
  • sasview/setup_mac.py

    r5881b17 r5881b17  
    4343import sas.sasgui.perspectives.invariant as invariant 
    4444DATA_FILES += invariant.data_files() 
     45#import sas.models as models 
    4546import sasmodels.models as models 
    4647DATA_FILES += models.data_files() 
  • setup.py

    r5881b17 r5881b17  
    249249 
    250250package_dir["sas.sasgui.perspectives.fitting"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting") 
    251 package_dir["sas.sasgui.perspectives.fitting.plugin_models"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting", "plugin_models") 
    252 packages.extend(["sas.sasgui.perspectives.fitting", "sas.sasgui.perspectives.fitting.plugin_models"]) 
    253 package_data['sas.sasgui.perspectives.fitting'] = ['media/*', 'plugin_models/*'] 
     251packages.extend(["sas.sasgui.perspectives.fitting"]) 
     252package_data['sas.sasgui.perspectives.fitting'] = ['media/*'] 
    254253 
    255254packages.extend(["sas.sasgui.perspectives", "sas.sasgui.perspectives.calculator"]) 
     
    320319 
    321320required = [ 
    322     'bumps>=0.7.5.9', 'periodictable>=1.3.1', 'pyparsing<2.0.0', 
     321    'bumps>=0.7.5.6', 'periodictable>=1.3.1', 'pyparsing<2.0.0', 
    323322 
    324323    # 'lxml>=2.2.2', 
  • src/sas/sascalc/calculator/BaseComponent.py

    rcb4ef58 r53aa66d  
    5050        self.output_unit = "cm^{-1}" 
    5151 
    52         self.is_multiplicity_model = False 
    53         self.is_structure_factor = False 
    54         self.is_form_factor = False 
    55  
    5652    def __str__(self): 
    5753        """ 
  • src/sas/sascalc/calculator/sas_gen.py

    rcb4ef58 r9e531f2  
    8080        ## Parameter details [units, min, max] 
    8181        self.details = {} 
    82         self.details['scale'] = ['', 0.0, numpy.inf] 
    83         self.details['background'] = ['[1/cm]', 0.0, numpy.inf] 
    84         self.details['solvent_SLD'] = ['1/A^(2)', -numpy.inf, numpy.inf] 
    85         self.details['total_volume'] = ['A^(3)', 0.0, numpy.inf] 
    86         self.details['Up_frac_in'] = ['[u/(u+d)]', 0.0, 1.0] 
    87         self.details['Up_frac_out'] = ['[u/(u+d)]', 0.0, 1.0] 
    88         self.details['Up_theta'] = ['[deg]', -numpy.inf, numpy.inf] 
     82        self.details['scale'] = ['', None, None] 
     83        self.details['background'] = ['[1/cm]', None, None] 
     84        self.details['solvent_SLD'] = ['1/A^(2)', None, None] 
     85        self.details['total_volume'] = ['A^(3)', None, None] 
     86        self.details['Up_frac_in'] = ['[u/(u+d)]', None, None] 
     87        self.details['Up_frac_out'] = ['[u/(u+d)]', None, None] 
     88        self.details['Up_theta'] = ['[deg]', None, None] 
    8989        # fixed parameters 
    9090        self.fixed = [] 
  • src/sas/sascalc/fit/MultiplicationModel.py

    rcb4ef58 r08959b8  
     1 
     2from sas.sascalc.calculator.BaseComponent import BaseComponent 
     3#import numpy, math 
    14import copy 
    2  
    3 import numpy 
    4  
    5 from sas.sascalc.calculator.BaseComponent import BaseComponent 
    6  
     5from sas.sascalc.fit.pluginmodel import Model1DPlugin 
    76class MultiplicationModel(BaseComponent): 
    87    r""" 
     
    4847        ## Parameter details [units, min, max] 
    4948        self._set_details() 
    50         self.details['scale_factor'] = ['', 0.0, numpy.inf] 
     49        self.details['scale_factor'] = ['',     None, None] 
    5150         
    5251        #list of parameter that can be fitted 
     
    7675                self.multiplicity_info = p_model.multiplicity_info  
    7776                self.fun_list = p_model.fun_list 
    78                 self.is_multiplicity_model = True 
    7977            except: 
    8078                pass 
    8179        else: 
    82             self.is_multiplicity_model = False 
    83             self.multiplicity_info = [0] 
     80            self.multiplicity_info = [] 
    8481             
    8582    def _clone(self, obj): 
  • src/sas/sasgui/perspectives/calculator/model_editor.py

    rcb4ef58 raa03e0d  
    13291329SUM_TEMPLATE = """ 
    13301330# A sample of an experimental model function for Sum/Multiply(Pmodel1,Pmodel2) 
    1331 import os 
    1332 import sys 
    13331331import copy 
    1334  
    1335 import nuympy 
    1336  
    13371332from sas.sascalc.fit.pluginmodel import Model1DPlugin 
    13381333from sasmodels.sasview_model import make_class 
     
    13441339#P2_model: 
    13451340#from %s import Model as P2 
     1341import os 
     1342import sys 
    13461343 
    13471344class Model(Model1DPlugin): 
     
    13881385        ## Parameter details [units, min, max] 
    13891386        self._set_details() 
    1390         self.details['scale_factor'] = ['', 0.0, numpy.inf] 
     1387        self.details['scale_factor'] = ['', None, None] 
    13911388 
    13921389 
  • src/sas/sasgui/perspectives/fitting/__init__.py

    ra7c4ad2 r9e531f2  
    3939    data_files = [] 
    4040    path = os.path.dirname(__file__) 
    41     p_path = os.path.join(path, 'plugin_models') 
    42     for f in findall(p_path): 
    43         data_files.append(('plugin_models', [f])) 
     41    # p_path = os.path.join(path, 'plugin_models') 
     42    # for f in findall(p_path): 
     43    #     data_files.append(('plugin_models', [f])) 
    4444    # path = get_data_path(media="media") 
    4545    for f in findall(path): 
  • src/sas/sasgui/perspectives/fitting/basepage.py

    rcb4ef58 r08959b8  
    18961896                for model in self.model_list_box[mod_cat]: 
    18971897                    if 'sasmodels.sasview_model.' in str(model): 
    1898                         str_m = model.id 
     1898                        str_m = model._model_info['id'] 
    18991899                    else: 
    19001900                        str_m = str(model).split(".")[0] 
     
    19451945        mlist = [] 
    19461946        for models in list: 
    1947             if models.name != "NoStructure": 
    1948                 mlist.append((models.name, models)) 
     1947            model = models() 
     1948            name = model.__class__.__name__ 
     1949            if models.__name__ != "NoStructure": 
     1950                name = model.name 
     1951                mlist.append((name, models)) 
    19491952 
    19501953        # Sort the models 
     
    20962099        if form_factor != None: 
    20972100            # set multifactor for Mutifunctional models 
    2098             if form_factor.is_multiplicity_model: 
     2101            if form_factor().__class__ in \ 
     2102                                        self.model_list_box["Multi-Functions"]: 
    20992103                m_id = self.multifactorbox.GetCurrentSelection() 
    2100                 multiplicity = form_factor.multiplicity_info[0] 
     2104                multiplicity = form_factor().multiplicity_info[0] 
    21012105                self.multifactorbox.Clear() 
    21022106                self._set_multfactor_combobox(multiplicity) 
    21032107                self._show_multfactor_combobox() 
    21042108                #ToDo:  this info should be called directly from the model 
    2105                 text = form_factor.multiplicity_info[1]  # 'No. of Shells: ' 
     2109                text = form_factor().multiplicity_info[1]  # 'No. of Shells: ' 
    21062110 
    21072111                self.mutifactor_text.SetLabel(text) 
     
    21132117                if self.multi_factor == None: 
    21142118                    self.multi_factor = 0 
     2119                form_factor = form_factor(int(self.multi_factor)) 
    21152120                self.multifactorbox.SetSelection(m_id) 
    21162121                # Check len of the text1 and max_multiplicity 
     
    21262131                else: 
    21272132                    self.sld_axes = "" 
     2133 
    21282134            else: 
    21292135                self._hide_multfactor_combobox() 
    21302136                self.show_sld_button.Hide() 
     2137                form_factor = form_factor() 
    21312138                self.multi_factor = None 
    21322139        else: 
     
    21402147        if  struct_factor != None: 
    21412148            from sas.sascalc.fit.MultiplicationModel import MultiplicationModel 
    2142             self.model = MultiplicationModel(form_factor(self.multi_factor), 
    2143                                              struct_factor()) 
     2149            self.model = MultiplicationModel(form_factor, struct_factor()) 
    21442150            # multifunctional form factor 
    21452151            if len(form_factor.non_fittable) > 0: 
    21462152                self.temp_multi_functional = True 
    2147         elif form_factor != None: 
    2148             self.model = form_factor(self.multi_factor) 
    21492153        else: 
    2150             self.model = None 
    2151             return 
    2152  
     2154            if form_factor != None: 
     2155                self.model = form_factor 
     2156            else: 
     2157                self.model = None 
     2158                return self.model 
    21532159        # check if model has magnetic parameters 
    21542160        if len(self.model.magnetic_params) > 0: 
     
    22802286                parameter's error of fit, 
    22812287                parameter's minimum value, 
    2282                 parameter's maximum value , 
     2288                parrameter's maximum value , 
    22832289                parameter's units] 
    22842290        """ 
  • src/sas/sasgui/perspectives/fitting/fitpage.py

    rcb4ef58 rf27dd1e  
    1010import math 
    1111import time 
    12  
    13 from sasmodels.weights import MODELS as POLYDISPERSITY_MODELS 
    14  
    1512from sas.sasgui.guiframe.events import StatusEvent 
    1613from sas.sasgui.guiframe.events import NewPlotEvent 
     
    624621        model_disp = wx.StaticText(self, wx.ID_ANY, 'Function') 
    625622        CHECK_STATE = self.cb1.GetValue() 
     623        #import sas.models.dispersion_models 
     624        #self.polydisp = sas.models.dispersion_models.models 
     625        import sasmodels.weights 
     626        self.polydisp =  sasmodels.weights.models 
    626627 
    627628        ix = 0 
     
    783784                disp_box = wx.ComboBox(self, wx.ID_ANY, size=(65, -1), 
    784785                                       style=wx.CB_READONLY, name='%s' % name1) 
    785                 for key, value in POLYDISPERSITY_MODELS.iteritems(): 
     786                for key, value in self.polydisp.iteritems(): 
    786787                    name_disp = str(key) 
    787788                    disp_box.Append(name_disp, value) 
     
    947948                disp_box = wx.ComboBox(self, wx.ID_ANY, size=(65, -1), 
    948949                                style=wx.CB_READONLY, name='%s' % name1) 
    949                 for key, value in POLYDISPERSITY_MODELS.iteritems(): 
     950                for key, value in self.polydisp.iteritems(): 
    950951                    name_disp = str(key) 
    951952                    disp_box.Append(name_disp, value) 
  • src/sas/sasgui/perspectives/fitting/fitpanel.py

    r05228b0 rf60251f  
    1717import models 
    1818_BOX_WIDTH = 80 
     19 
    1920 
    2021class FitPanel(nb, PanelBase): 
     
    153154        """ 
    154155        """ 
     156        from bumps.options import FIT_CONFIG 
     157        current = FIT_CONFIG.selected_name 
     158        self.parent.SetTitle(self.window_name + " - Active Fitting Optimizer: " + current) 
    155159        pos = self.GetSelection() 
    156160        if pos != -1: 
  • src/sas/sasgui/perspectives/fitting/fitting.py

    r243fbc0 r86b049b  
    5656    ON_MAC = True 
    5757 
    58 import bumps.options 
    59 from bumps.gui.fit_dialog import show_fit_config 
    60 try: 
    61     from bumps.gui.fit_dialog import EVT_FITTER_CHANGED 
    62 except ImportError: 
    63     # CRUFT: bumps 0.7.5.8 and below 
    64     EVT_FITTER_CHANGED = None  # type: wx.PyCommandEvent 
     58 
    6559 
    6660class Plugin(PluginBase): 
     
    507501        self.parent.Bind(EVT_SLICER_PANEL, self._on_slicer_event) 
    508502        self.parent.Bind(EVT_SLICER_PARS_UPDATE, self._onEVT_SLICER_PANEL) 
    509  
    510         # CRUFT: EVT_FITTER_CHANGED is not None for bumps 0.7.5.9 and above 
    511         if EVT_FITTER_CHANGED is not None: 
    512             self.parent.Bind(EVT_FITTER_CHANGED, self.on_fitter_changed) 
    513         self._set_fitter_label(bumps.options.FIT_CONFIG) 
    514  
    515503        #self.parent._mgr.Bind(wx.aui.EVT_AUI_PANE_CLOSE,self._onclearslicer) 
    516504        #Create reader when fitting panel are created 
     
    775763        Open the bumps options panel. 
    776764        """ 
    777         show_fit_config(self.parent, help=self.on_help) 
    778  
    779     def on_fitter_changed(self, event): 
    780         self._set_fitter_label(event.config) 
    781  
    782     def _set_fitter_label(self, config): 
    783         self.fit_panel.parent.SetTitle(self.fit_panel.window_name 
    784                                        + " - Active Fitting Optimizer: " 
    785                                        + config.selected_name) 
     765        try: 
     766            from bumps.gui.fit_dialog import show_fit_config 
     767            show_fit_config(self.parent, help=self.on_help) 
     768        except ImportError: 
     769            # CRUFT: Bumps 0.7.5.6 and earlier do not have the help button 
     770            from bumps.gui.fit_dialog import OpenFitOptions 
     771            OpenFitOptions() 
    786772 
    787773    def on_help(self, algorithm_id): 
  • src/sas/sasgui/perspectives/fitting/models.py

    rcb4ef58 rdcdca68  
    296296        #Build list automagically from sasmodels package 
    297297        for model in load_standard_models(): 
    298             self.model_dictionary[model.name] = model 
    299             if model.is_structure_factor: 
     298            self.model_dictionary[model._model_info['name']] = model 
     299            if model._model_info['structure_factor'] == True: 
    300300                self.struct_list.append(model) 
    301             if model.is_form_factor: 
    302                 self.multiplication_factor.append(model) 
    303             if model.is_multiplicity_model: 
     301            if model._model_info['variant_info'] is not None: 
    304302                self.multi_func_list.append(model) 
    305303            else: 
    306                 self.model_name_list.append(model.name) 
     304                self.model_name_list.append(model._model_info['name']) 
     305            if model._model_info['ER'] is not None: 
     306                self.multiplication_factor.append(model) 
    307307 
    308308        #Looking for plugins 
     
    387387        Get the multifunctional models 
    388388        """ 
    389         items = [item for item in self.plugins if item.is_multiplicity_model] 
    390         self.multi_func_list = items 
     389        for item in self.plugins: 
     390            try: 
     391                # check the multiplicity if any 
     392                if item.multiplicity_info[0] > 1: 
     393                    self.multi_func_list.append(item) 
     394            except: 
     395                # pass to other items 
     396                pass 
    391397 
    392398    def get_model_list(self): 
  • src/sas/sasgui/plottools/PlotPanel.py

    r16b769b rd85c194  
    19941994        """ 
    19951995        try: 
    1996             self.toolbar.copy_figure(self.canvas) 
     1996            self.toolbar.copy_figure() 
    19971997        except: 
    19981998            print "Error in copy Image" 
Note: See TracChangeset for help on using the changeset viewer.