Changeset aff7904 in sasview
- Timestamp:
- Apr 28, 2016 7:38:05 AM (9 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 3371d81
- Parents:
- 5881b17 (diff), 259aaa0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 1 added
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
build_tools/conda/bumps/meta.yaml
rb75079b r243fbc0 1 1 package: 2 2 name: bumps 3 version: !!str 0.7.5. 43 version: !!str 0.7.5.9 4 4 5 5 source: 6 fn: bumps-0.7.5. 4.tar.gz7 url: https://pypi.python.org/packages/source/b/bumps/bumps-0.7.5. 4.tar.gz6 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 8 8 md5: a47c035fbb18afa5ca53067506a5ff1c 9 9 # patches: -
build_tools/jenkins_linux_build.sh
r9d5427f r243fbc0 15 15 rm -rf build 16 16 17 "$EASY_INSTALL" -d "$WORKSPACE/utils" bumps==0.7.5. 617 "$EASY_INSTALL" -d "$WORKSPACE/utils" bumps==0.7.5.9 18 18 "$EASY_INSTALL" -d "$WORKSPACE/utils" periodictable==1.3.0 19 19 -
build_tools/jenkins_linux_build_ver02.sh
r22c1f1c r243fbc0 27 27 28 28 29 "$EASY_INSTALL" -d "$WORKSPACE/sasview/utils" bumps==0.7.5. 629 "$EASY_INSTALL" -d "$WORKSPACE/sasview/utils" bumps==0.7.5.9 30 30 "$EASY_INSTALL" -d "$WORKSPACE/sasview/utils" periodictable==1.3.0 31 31 -
build_tools/jenkins_osx_build.sh
r5881b17 raff7904 55 55 cd sasview 56 56 $PYTHON setup.py clean 57 $PYTHON setup.py build 58 #$PYTHON setup.py docs 57 $PYTHON setup.py build docs bdist_egg 59 58 60 59 61 # SASVIEW BUILD_egg with new docs60 # INSTALL SASVIEW 62 61 cd $WORKSPACE 63 62 cd sasview 64 $PYTHON setup.py docs bdist_egg65 63 cd dist 66 64 $EASY_INSTALL -d $WORKSPACE/sasview/sasview-install sasview*.egg 65 67 66 68 67 # TEST … … 72 71 #$PYTHON utest_sasview.py 73 72 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 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 79 77 80 78 # BUILD APP 81 #cd $WORKSPACE82 #cd sasview/sasview83 #$PYTHON setup_mac.py py2app79 cd $WORKSPACE 80 cd sasview/sasview 81 $PYTHON setup_mac.py py2app 84 82 -
build_tools/jenkins_rhel6_build.sh
r9d5427f r243fbc0 28 28 "$EASY_INSTALL" -d "$WORKSPACE/utils" lxml 29 29 "$EASY_INSTALL" -d "$WORKSPACE/utils" pyparsing==1.5.5 30 "$EASY_INSTALL" -d "$WORKSPACE/utils" bumps==0.7.5. 630 "$EASY_INSTALL" -d "$WORKSPACE/utils" bumps==0.7.5.9 31 31 "$EASY_INSTALL" -d "$WORKSPACE/utils" periodictable==1.3.0 32 32 python deps.py -
build_tools/jenkins_win32_build.bat
r9d5427f r243fbc0 16 16 RD /S /Q build 17 17 18 rem %PYTHON% -m pip install -t ../sasview-install --no-deps bumps=0.7.5. 618 rem %PYTHON% -m pip install -t ../sasview-install --no-deps bumps=0.7.5.9 19 19 rem PYTHON% -m pip install -t ../sasview-install --no-deps periodictable=1.3.0 20 20 rem %PYTHON% -m pip install -t ../sasview-install --no-deps pyparsing=1.5.5 -
build_tools/jenkins_win32_py27_build.bat
r9d5427f r243fbc0 16 16 RD /S /Q build 17 17 18 rem %PYTHON% -m pip install -t ../sansview-install --no-deps bumps=0.7.5. 618 rem %PYTHON% -m pip install -t ../sansview-install --no-deps bumps=0.7.5.9 19 19 rem PYTHON% -m pip install -t ../sansview-install --no-deps periodictable=1.3.0 20 20 rem %PYTHON% -m pip install -t ../sansview-install --no-deps pyparsing=1.5.5 -
build_tools/requirements.txt
ra985c93 r243fbc0 9 9 PIL==1.1.7 10 10 periodictable==1.3.0 11 bumps==0.7.5. 511 bumps==0.7.5.9 12 12 # numpy==1.6.1 13 13 # scipy==0.10.1 -
check_packages.py
r8e7044c r243fbc0 19 19 'pylint':{'version':None,'import_name':'pylint','test':None}, 20 20 'periodictable':{'version':'1.3.0','import_name':'periodictable','test':'__version__'}, 21 'bumps':{'version':'0.7.5. 7','import_name':'bumps','test':'__version__'},21 'bumps':{'version':'0.7.5.9','import_name':'bumps','test':'__version__'}, 22 22 'numpy':{'version':'1.6.1','import_name':'numpy','test':'__version__'}, 23 23 'scipy':{'version':'0.10.1','import_name':'scipy','test':'__version__'}, -
sasview/README.txt
r792e6be r243fbc0 4 4 1- Features 5 5 =========== 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 6 43 7 44 - New in Version 3.1.2 … … 306 343 - unittest-xml-reporting 1.12.0 (MAC 1.10.0) 307 344 - matplotlib Version Installed: 1.4.3 (MAC 1.1.1) 308 - bumps Version Installed: 0.7.5. 6345 - bumps Version Installed: 0.7.5.9 309 346 - scipy Version Installed: 0.16.0b2 (MAC 0.11.0) 310 347 - periodictable Version Installed: 1.4.1 -
sasview/__init__.py
r792e6be rfa4ea80 1 __version__ = " 3.1.2"1 __version__ = "4.0.0-alpha" 2 2 __build__ = "1" -
sasview/default_categories.json
r6313823 r42585bf 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]]}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]]} -
sasview/setup_exe.py
r40fc798 ra7c4ad2 256 256 data_files += guiframe.data_files() 257 257 258 import sas.models as models 258 #import sas.models as models 259 import sasmodels.models as models 259 260 data_files += models.data_files() 260 261 … … 338 339 packages = [ 339 340 'matplotlib', 'scipy', 'encodings', 'comtypes', 340 'win32com', 'xhtml2pdf', 'bumps', 341 'win32com', 'xhtml2pdf', 'bumps','sasmodels', 'sas', 341 342 ] 342 343 packages.extend([ -
sasview/setup_mac.py
r5881b17 raff7904 43 43 import sas.sasgui.perspectives.invariant as invariant 44 44 DATA_FILES += invariant.data_files() 45 #import sas.models as models46 45 import sasmodels.models as models 47 46 DATA_FILES += models.data_files() -
setup.py
r5881b17 raff7904 249 249 250 250 package_dir["sas.sasgui.perspectives.fitting"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting") 251 packages.extend(["sas.sasgui.perspectives.fitting"]) 252 package_data['sas.sasgui.perspectives.fitting'] = ['media/*'] 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/*'] 253 254 254 255 packages.extend(["sas.sasgui.perspectives", "sas.sasgui.perspectives.calculator"]) … … 319 320 320 321 required = [ 321 'bumps>=0.7.5. 6', 'periodictable>=1.3.1', 'pyparsing<2.0.0',322 'bumps>=0.7.5.9', 'periodictable>=1.3.1', 'pyparsing<2.0.0', 322 323 323 324 # 'lxml>=2.2.2', -
src/sas/sascalc/calculator/BaseComponent.py
r53aa66d rcb4ef58 50 50 self.output_unit = "cm^{-1}" 51 51 52 self.is_multiplicity_model = False 53 self.is_structure_factor = False 54 self.is_form_factor = False 55 52 56 def __str__(self): 53 57 """ -
src/sas/sascalc/calculator/sas_gen.py
r9e531f2 rcb4ef58 80 80 ## Parameter details [units, min, max] 81 81 self.details = {} 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]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] 89 89 # fixed parameters 90 90 self.fixed = [] -
src/sas/sascalc/fit/MultiplicationModel.py
r08959b8 rcb4ef58 1 import copy 2 3 import numpy 1 4 2 5 from sas.sascalc.calculator.BaseComponent import BaseComponent 3 #import numpy, math 4 import copy 5 from sas.sascalc.fit.pluginmodel import Model1DPlugin 6 6 7 class MultiplicationModel(BaseComponent): 7 8 r""" … … 47 48 ## Parameter details [units, min, max] 48 49 self._set_details() 49 self.details['scale_factor'] = ['', None, None]50 self.details['scale_factor'] = ['', 0.0, numpy.inf] 50 51 51 52 #list of parameter that can be fitted … … 75 76 self.multiplicity_info = p_model.multiplicity_info 76 77 self.fun_list = p_model.fun_list 78 self.is_multiplicity_model = True 77 79 except: 78 80 pass 79 81 else: 80 self.multiplicity_info = [] 82 self.is_multiplicity_model = False 83 self.multiplicity_info = [0] 81 84 82 85 def _clone(self, obj): -
src/sas/sasgui/perspectives/calculator/model_editor.py
raa03e0d rcb4ef58 1329 1329 SUM_TEMPLATE = """ 1330 1330 # A sample of an experimental model function for Sum/Multiply(Pmodel1,Pmodel2) 1331 import os 1332 import sys 1331 1333 import copy 1334 1335 import nuympy 1336 1332 1337 from sas.sascalc.fit.pluginmodel import Model1DPlugin 1333 1338 from sasmodels.sasview_model import make_class … … 1339 1344 #P2_model: 1340 1345 #from %s import Model as P2 1341 import os1342 import sys1343 1346 1344 1347 class Model(Model1DPlugin): … … 1385 1388 ## Parameter details [units, min, max] 1386 1389 self._set_details() 1387 self.details['scale_factor'] = ['', None, None]1390 self.details['scale_factor'] = ['', 0.0, numpy.inf] 1388 1391 1389 1392 -
src/sas/sasgui/perspectives/fitting/__init__.py
r9e531f2 ra7c4ad2 39 39 data_files = [] 40 40 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])) 44 44 # path = get_data_path(media="media") 45 45 for f in findall(path): -
src/sas/sasgui/perspectives/fitting/basepage.py
r08959b8 rcb4ef58 1896 1896 for model in self.model_list_box[mod_cat]: 1897 1897 if 'sasmodels.sasview_model.' in str(model): 1898 str_m = model. _model_info['id']1898 str_m = model.id 1899 1899 else: 1900 1900 str_m = str(model).split(".")[0] … … 1945 1945 mlist = [] 1946 1946 for models in list: 1947 model = models() 1948 name = model.__class__.__name__ 1949 if models.__name__ != "NoStructure": 1950 name = model.name 1951 mlist.append((name, models)) 1947 if models.name != "NoStructure": 1948 mlist.append((models.name, models)) 1952 1949 1953 1950 # Sort the models … … 2099 2096 if form_factor != None: 2100 2097 # set multifactor for Mutifunctional models 2101 if form_factor().__class__ in \ 2102 self.model_list_box["Multi-Functions"]: 2098 if form_factor.is_multiplicity_model: 2103 2099 m_id = self.multifactorbox.GetCurrentSelection() 2104 multiplicity = form_factor ().multiplicity_info[0]2100 multiplicity = form_factor.multiplicity_info[0] 2105 2101 self.multifactorbox.Clear() 2106 2102 self._set_multfactor_combobox(multiplicity) 2107 2103 self._show_multfactor_combobox() 2108 2104 #ToDo: this info should be called directly from the model 2109 text = form_factor ().multiplicity_info[1] # 'No. of Shells: '2105 text = form_factor.multiplicity_info[1] # 'No. of Shells: ' 2110 2106 2111 2107 self.mutifactor_text.SetLabel(text) … … 2117 2113 if self.multi_factor == None: 2118 2114 self.multi_factor = 0 2119 form_factor = form_factor(int(self.multi_factor))2120 2115 self.multifactorbox.SetSelection(m_id) 2121 2116 # Check len of the text1 and max_multiplicity … … 2131 2126 else: 2132 2127 self.sld_axes = "" 2133 2134 2128 else: 2135 2129 self._hide_multfactor_combobox() 2136 2130 self.show_sld_button.Hide() 2137 form_factor = form_factor()2138 2131 self.multi_factor = None 2139 2132 else: … … 2147 2140 if struct_factor != None: 2148 2141 from sas.sascalc.fit.MultiplicationModel import MultiplicationModel 2149 self.model = MultiplicationModel(form_factor, struct_factor()) 2142 self.model = MultiplicationModel(form_factor(self.multi_factor), 2143 struct_factor()) 2150 2144 # multifunctional form factor 2151 2145 if len(form_factor.non_fittable) > 0: 2152 2146 self.temp_multi_functional = True 2147 elif form_factor != None: 2148 self.model = form_factor(self.multi_factor) 2153 2149 else: 2154 if form_factor != None: 2155 self.model = form_factor 2156 else: 2157 self.model = None 2158 return self.model 2150 self.model = None 2151 return 2152 2159 2153 # check if model has magnetic parameters 2160 2154 if len(self.model.magnetic_params) > 0: … … 2286 2280 parameter's error of fit, 2287 2281 parameter's minimum value, 2288 par rameter's maximum value ,2282 parameter's maximum value , 2289 2283 parameter's units] 2290 2284 """ -
src/sas/sasgui/perspectives/fitting/fitpage.py
rf27dd1e rcb4ef58 10 10 import math 11 11 import time 12 13 from sasmodels.weights import MODELS as POLYDISPERSITY_MODELS 14 12 15 from sas.sasgui.guiframe.events import StatusEvent 13 16 from sas.sasgui.guiframe.events import NewPlotEvent … … 621 624 model_disp = wx.StaticText(self, wx.ID_ANY, 'Function') 622 625 CHECK_STATE = self.cb1.GetValue() 623 #import sas.models.dispersion_models624 #self.polydisp = sas.models.dispersion_models.models625 import sasmodels.weights626 self.polydisp = sasmodels.weights.models627 626 628 627 ix = 0 … … 784 783 disp_box = wx.ComboBox(self, wx.ID_ANY, size=(65, -1), 785 784 style=wx.CB_READONLY, name='%s' % name1) 786 for key, value in self.polydisp.iteritems():785 for key, value in POLYDISPERSITY_MODELS.iteritems(): 787 786 name_disp = str(key) 788 787 disp_box.Append(name_disp, value) … … 948 947 disp_box = wx.ComboBox(self, wx.ID_ANY, size=(65, -1), 949 948 style=wx.CB_READONLY, name='%s' % name1) 950 for key, value in self.polydisp.iteritems():949 for key, value in POLYDISPERSITY_MODELS.iteritems(): 951 950 name_disp = str(key) 952 951 disp_box.Append(name_disp, value) -
src/sas/sasgui/perspectives/fitting/fitpanel.py
rf60251f r05228b0 17 17 import models 18 18 _BOX_WIDTH = 80 19 20 19 21 20 class FitPanel(nb, PanelBase): … … 154 153 """ 155 154 """ 156 from bumps.options import FIT_CONFIG157 current = FIT_CONFIG.selected_name158 self.parent.SetTitle(self.window_name + " - Active Fitting Optimizer: " + current)159 155 pos = self.GetSelection() 160 156 if pos != -1: -
src/sas/sasgui/perspectives/fitting/fitting.py
r86b049b r243fbc0 56 56 ON_MAC = True 57 57 58 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 59 65 60 66 class Plugin(PluginBase): … … 501 507 self.parent.Bind(EVT_SLICER_PANEL, self._on_slicer_event) 502 508 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 503 515 #self.parent._mgr.Bind(wx.aui.EVT_AUI_PANE_CLOSE,self._onclearslicer) 504 516 #Create reader when fitting panel are created … … 763 775 Open the bumps options panel. 764 776 """ 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() 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) 772 786 773 787 def on_help(self, algorithm_id): -
src/sas/sasgui/perspectives/fitting/models.py
rdcdca68 rcb4ef58 296 296 #Build list automagically from sasmodels package 297 297 for model in load_standard_models(): 298 self.model_dictionary[model. _model_info['name']] = model299 if model. _model_info['structure_factor'] == True:298 self.model_dictionary[model.name] = model 299 if model.is_structure_factor: 300 300 self.struct_list.append(model) 301 if model._model_info['variant_info'] is not None: 301 if model.is_form_factor: 302 self.multiplication_factor.append(model) 303 if model.is_multiplicity_model: 302 304 self.multi_func_list.append(model) 303 305 else: 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) 306 self.model_name_list.append(model.name) 307 307 308 308 #Looking for plugins … … 387 387 Get the multifunctional models 388 388 """ 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 389 items = [item for item in self.plugins if item.is_multiplicity_model] 390 self.multi_func_list = items 397 391 398 392 def get_model_list(self): -
src/sas/sasgui/plottools/PlotPanel.py
rd85c194 r16b769b 1994 1994 """ 1995 1995 try: 1996 self.toolbar.copy_figure( )1996 self.toolbar.copy_figure(self.canvas) 1997 1997 except: 1998 1998 print "Error in copy Image"
Note: See TracChangeset
for help on using the changeset viewer.