Changeset 69ebe91 in sasview
- Timestamp:
- Jul 27, 2012 11:33:14 AM (12 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:
- fa3f081
- Parents:
- fd1aec6f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/ModelAdaptor.py
rdacf52f r69ebe91 35 35 def __init__(self, parameters): 36 36 """ 37 38 @param parameters: new-style 'parameters' dictionary37 Initialization 38 param parameters: new-style 'parameters' dictionary 39 39 """ 40 40 self.parameters = parameters … … 48 48 class ModelAdaptor(object): 49 49 """ 50 50 Model adaptor to provide old-style model functionality 51 51 """ 52 53 52 def __init__(self): 54 53 """ Initialization""" … … 59 58 ## Additional details, provided for backward compatibility 60 59 self.details = {} 61 self.description =''60 self.description = '' 62 61 ## Dictionary used to store the dispersity/averaging 63 62 # parameters of dispersed/averaged parameters. … … 66 65 67 66 # Old-style methods that are no longer used 68 def setParamWithToken(self, name, value, token, member): return NotImplemented 69 def getParamWithToken(self, name, token, member): return NotImplemented 70 def getParamListWithToken(self, token, member): return NotImplemented 71 def __add__(self, other): raise ValueError, "Model operation are no longer supported" 72 def __sub__(self, other): raise ValueError, "Model operation are no longer supported" 73 def __mul__(self, other): raise ValueError, "Model operation are no longer supported" 74 def __div__(self, other): raise ValueError, "Model operation are no longer supported" 75 67 def setParamWithToken(self, name, value, token, member): 68 """ 69 set Param With Token 70 """ 71 return NotImplemented 76 72 73 def getParamWithToken(self, name, token, member): 74 """ 75 get Param With Token 76 """ 77 return NotImplemented 78 79 def getParamListWithToken(self, token, member): 80 """ 81 get Param List With Token 82 """ 83 return NotImplemented 84 def __add__(self, other): 85 """ 86 add 87 """ 88 raise ValueError, "Model operation are no longer supported" 89 def __sub__(self, other): 90 """ 91 sub 92 """ 93 raise ValueError, "Model operation are no longer supported" 94 def __mul__(self, other): 95 """ 96 mul 97 """ 98 raise ValueError, "Model operation are no longer supported" 99 def __div__(self, other): 100 """ 101 div 102 """ 103 raise ValueError, "Model operation are no longer supported" 77 104 78 105 if __name__ == "__main__":
Note: See TracChangeset
for help on using the changeset viewer.