Changeset 70e5f97 in sasview for src/sas/sasgui
- Timestamp:
- Apr 8, 2016 4:58:38 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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 6afc14b
- Parents:
- be2775f (diff), 1780d8b (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. - Location:
- src/sas/sasgui
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/data_processor.py
r74c5521 r468c253 10 10 The organization of the classes goes as: 11 11 12 #Path to this is: /sasview/src/sas/sasgui/guiframe/data_processor.py 13 #Path to image is: /sasview/src/sas/sasgui/guiframe/media/BatchGridClassLayout.png 14 15 .. image:: ./guiframe/media/BatchGridClassLayout.png 12 .. note:: Path to this is: /sasview/src/sas/sasgui/guiframe/data_processor.py 13 14 .. note:: Path to image is: /sasview/src/sas/sasgui/guiframe/media/BatchGridClassLayout.png 15 16 .. image:: ../../user/sasgui/guiframe/BatchGridClassLayout.png 16 17 :align: center 17 18 … … 156 157 attribute. 157 158 158 NOTE: There is no need to override this if you don't need159 to do something out of the ordinary.159 .. note:: There is no need to override this if you don't need 160 to do something out of the ordinary. 160 161 161 162 :param dc: the wxDC object for the paint -
src/sas/sasgui/perspectives/fitting/media/mag_help.rst
r7805458 reca66a1 22 22 Magnetic scattering is implemented in five (2D) models 23 23 24 * * SphereModel*25 * * CoreShellModel*26 * * CoreMultiShellModel*27 * * CylinderModel*28 * * ParallelepipedModel*24 * *sphere* 25 * *core_shell_sphere* 26 * *core_multi_shell* 27 * *cylinder* 28 * *parallelepiped* 29 29 30 30 In general, the scattering length density (SLD, = |beta|) in each region where the -
src/sas/sasgui/perspectives/fitting/models.py
rd85b0c7 r70e5f97 2 2 Utilities to manage models 3 3 """ 4 import wx5 4 import imp 6 5 import os 7 6 import sys 8 import math9 7 import os.path 10 8 # Time is needed by the log method … … 13 11 import py_compile 14 12 import shutil 15 from sas.sasgui.guiframe.events import StatusEvent16 13 # Explicitly import from the pluginmodel module so that py2exe 17 14 # places it in the distribution. The Model1DPlugin class is used 18 15 # as the base class of plug-in models. 19 16 from sas.sascalc.fit.pluginmodel import Model1DPlugin 20 from sas.sascalc.calculator.BaseComponent import BaseComponent21 17 from sas.sasgui.guiframe.CategoryInstaller import CategoryInstaller 22 from sasmodels import sasview_model,core18 from sasmodels.sasview_model import load_custom_model, load_standard_models 23 19 24 20 … … 27 23 def get_model_python_path(): 28 24 """ 29 25 Returns the python path for a model 30 26 """ 31 27 return os.path.dirname(__file__) … … 34 30 def log(message): 35 31 """ 36 32 Log a message in a file located in the user's home directory 37 33 """ 38 34 dir = os.path.join(os.path.expanduser("~"), '.sasview', PLUGIN_DIR) … … 87 83 def find_plugins_dir(): 88 84 """ 89 90 85 Find path of the plugins directory. 86 The plugin directory is located in the user's home directory. 91 87 """ 92 88 dir = os.path.join(os.path.expanduser("~"), '.sasview', PLUGIN_DIR) … … 133 129 class ReportProblem: 134 130 """ 135 131 Class to check for problems with specific values 136 132 """ 137 133 def __nonzero__(self): … … 159 155 160 156 def _findModels(dir): 161 """162 """163 157 # List of plugin objects 164 158 plugins = {} … … 198 192 else: 199 193 filename = os.path.join(dir, item) 200 plugins[name] = sasview_model.make_class_from_file(filename)194 plugins[name] = load_custom_model(filename) 201 195 202 196 except: … … 252 246 class ModelManagerBase: 253 247 """ 254 248 Base class for the model manager 255 249 """ 256 250 ## external dict for models … … 273 267 274 268 def __init__(self): 275 """276 """277 269 self.model_dictionary = {} 278 270 self.stored_plugins = {} … … 300 292 301 293 # regular model names only 302 base_message = "Unable to load model {0}"303 294 self.model_name_list = [] 304 295 305 296 #Build list automagically from sasmodels package 306 for model in sasview_model.standard_models():297 for model in load_standard_models(): 307 298 self.model_dictionary[model._model_info['name']] = model 308 299 if model._model_info['structure_factor'] == True: … … 328 319 """ 329 320 check the last time the plugin dir has changed and return true 330 321 is the directory was modified else return false 331 322 """ 332 323 is_modified = False
Note: See TracChangeset
for help on using the changeset viewer.