Changeset ddbac66 in sasview for src/sas/sasgui/perspectives/calculator/model_editor.py
- Timestamp:
- Feb 26, 2017 11:20:48 PM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b61bd57
- Parents:
- 5295cf5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/calculator/model_editor.py
ra08b89b rddbac66 5 5 function of y (usually the intensity). It also provides a drop down of 6 6 standard available math functions. Finally a full python editor panel for 7 complete customizati n is provided.8 9 :TODO the writi ong of the file and name checking (and maybe some other10 fun tions?) should be moved to a computational module which could be called11 fro pm a python script. Basically one just needs to pass the name,7 complete customization is provided. 8 9 :TODO the writing of the file and name checking (and maybe some other 10 functions?) should be moved to a computational module which could be called 11 from a python script. Basically one just needs to pass the name, 12 12 description text and function text (or in the case of the composite editor 13 13 the names of the first and second model and the operator to be used). … … 61 61 """ 62 62 Dialog for easy custom composite models. Provides a wx.Dialog panel 63 to choose two existing models (including pre-existing custom models which63 to choose two existing models (including pre-existing Plugin Models which 64 64 may themselves be composite models) as well as an operation on those models 65 65 (add or multiply) the resulting model will add a scale parameter for summed … … 380 380 color = 'blue' 381 381 except: 382 msg = "Easy Custom Sum/Multipy: Error occurred..."382 msg = "Easy Sum/Multipy Plugin: Error occurred..." 383 383 info = 'Error' 384 384 color = 'red' … … 501 501 self.factor = factor 502 502 self._operator = operator 503 self.explanation = " CustomModel = %s %s (model1 %s model2)\n" % \503 self.explanation = " Plugin Model = %s %s (model1 %s model2)\n" % \ 504 504 (self.factor, f_oper, self._operator) 505 505 self.explanationctr.SetLabel(self.explanation) … … 617 617 class EditorPanel(wx.ScrolledWindow): 618 618 """ 619 Custom model function editor619 Simple Plugin Model function editor 620 620 """ 621 621 def __init__(self, parent, base, path, title, *args, **kwds): … … 652 652 self.msg_sizer = None 653 653 self.warning = "" 654 self._description = "New Custom Model" 654 #This does not seem to be used anywhere so commenting out for now 655 # -- PDB 2/26/17 656 #self._description = "New Plugin Model" 655 657 self.function_tcl = None 656 658 self.math_combo = None … … 991 993 else: 992 994 self._notes = result 993 msg = "Successful! Please look for %s in CustomizedModels."%name995 msg = "Successful! Please look for %s in Plugin Models."%name 994 996 msg += " " + self._notes 995 997 info = 'Info' … … 1138 1140 def on_help(self, event): 1139 1141 """ 1140 Bring up the CustomModel Editor Documentation whenever1142 Bring up the New Plugin Model Editor Documentation whenever 1141 1143 the HELP button is clicked. 1142 1144 … … 1190 1192 #self.Destroy() 1191 1193 1192 ## Templates for custommodels1194 ## Templates for plugin models 1193 1195 1194 1196 CUSTOM_TEMPLATE = """
Note: See TracChangeset
for help on using the changeset viewer.