Changeset 8d78399 in sasview for sansview/perspectives/fitting
- Timestamp:
- Sep 17, 2009 6:41:16 PM (15 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:
- 09fe12d
- Parents:
- 2051cbe
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/gui_thread.py
rbfe4644 r8d78399 78 78 # Thread was interrupted, just proceed and re-raise. 79 79 # Real code should not print, but this is an example... 80 raise KeyboardInterrupt80 raise 81 81 82 82 … … 148 148 # Thread was interrupted, just proceed and re-raise. 149 149 # Real code should not print, but this is an example... 150 raise KeyboardInterrupt150 raise 151 151 -
sansview/perspectives/fitting/models.py
rbfe4644 r8d78399 11 11 import os,sys,math 12 12 import os.path 13 from sans.models.pluginmodel import Model1DPlugin 13 14 14 (ModelEvent, EVT_MODEL) = wx.lib.newevent.NewEvent() 15 15 from sans.guicomm.events import StatusEvent … … 38 38 @param model: class model to add into the plugin list 39 39 @param name:name of the module plugin 40 @return model: model if valid model or nothingif not valid40 @return model: model if valid model or None if not valid 41 41 """ 42 42 #Check is the plugin is of type Model1DPlugin … … 44 44 msg= "Plugin %s must be of type Model1DPlugin \n"%str(name) 45 45 log(msg) 46 return 46 return None 47 47 if model.__name__!="Model": 48 48 msg= "Plugin %s class name must be Model \n"%str(name) 49 49 log(msg) 50 return 50 return None 51 51 try: 52 52 new_instance= model() … … 55 55 str(sys.exc_type),sys.exc_value) 56 56 log(msg) 57 return 57 return None 58 58 59 59 new_instance= model() … … 65 65 str(sys.exc_type),sys.exc_value) 66 66 log(msg) 67 return 67 return None 68 68 else: 69 69 msg="Plugin %s needs a method called function \n"%str(name) 70 70 log(msg) 71 return 71 return None 72 72 return model 73 73 … … 92 92 try: 93 93 if _check_plugin(module.Model, name)!=None: 94 #plugins.append(module.Model)95 94 plugins.append(module.Model) 96 95 except:
Note: See TracChangeset
for help on using the changeset viewer.