Changes in src/sas/models/MultiplicationModel.py [fb3f9af:ac7be54] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/models/MultiplicationModel.py
rfb3f9af rac7be54 10 10 which will be calculated from P(Q) via calculate_ER(), 11 11 and 2) 'scale' in P model which is synchronized w/ volfraction in S 12 then P*S is multiplied by a new param eter, 'scale_factor'.12 then P*S is multiplied by a new param, 'scale_factor'. 13 13 The polydispersion is applicable only to P(Q), not to S(Q). 14 15 .. note:: P(Q) refers to 'form factor' model while S(Q) does to 'structure factor'. 14 Note: P(Q) refers to 'form factor' model while S(Q) does to 'structure factor'. 16 15 """ 17 16 def __init__(self, p_model, s_model ): … … 82 81 def _clone(self, obj): 83 82 """ 84 Internal utility function to copy the internal data members to a85 fresh copy.83 Internal utility function to copy the internal 84 data members to a fresh copy. 86 85 """ 87 86 obj.params = copy.deepcopy(self.params) … … 97 96 def _set_dispersion(self): 98 97 """ 99 combine the two models' dispersions. Polydispersity should not be100 applied to s_model98 combined the two models dispersions 99 Polydispersion should not be applied to s_model 101 100 """ 102 101 ##set dispersion only from p_model … … 108 107 Get SLD profile of p_model if exists 109 108 110 :return: (r, beta) where r is a list of radius of the transition points\ 111 beta is a list of the corresponding SLD values 112 113 .. note:: This works only for func_shell num = 2 (exp function). 109 : return: (r, beta) where r is a list of radius of the transition points 110 beta is a list of the corresponding SLD values 111 : Note: This works only for func_shell num = 2 (exp function). 114 112 """ 115 113 try: … … 123 121 def _set_params(self): 124 122 """ 125 Concatenate the parameters of the two models to create126 thesemodel parameters123 Concatenate the parameters of the two models to create 124 this model parameters 127 125 """ 128 126 … … 143 141 def _set_details(self): 144 142 """ 145 Concatenate details of the two models to create146 this model'sdetails143 Concatenate details of the two models to create 144 this model details 147 145 """ 148 146 for name, detail in self.p_model.details.iteritems(): … … 156 154 def _set_scale_factor(self): 157 155 """ 158 Set scale=volfraction forP model156 Set scale=volfraction to P model 159 157 """ 160 158 value = self.params['volfraction'] … … 170 168 def _set_effect_radius(self): 171 169 """ 172 Set effective radius to S(Q) model170 Set effective radius to S(Q) model 173 171 """ 174 172 if not 'effect_radius' in self.s_model.params.keys(): … … 208 206 def _setParamHelper(self, name, value): 209 207 """ 210 Helper function to setparam208 Helper function to setparam 211 209 """ 212 210 # Look for dispersion parameters … … 231 229 def _set_fixed_params(self): 232 230 """ 233 Fill the self.fixed list with the p_model fixed list231 fill the self.fixed list with the p_model fixed list 234 232 """ 235 233 for item in self.p_model.fixed: … … 242 240 """ 243 241 Evaluate the model 244 245 242 :param x: input q-value (float or [float, float] as [r, theta]) 246 243 :return: (scattering function value) … … 253 250 254 251 def runXY(self, x = 0.0): 255 """ 256 Evaluate the model 257 258 :param x: input q-value (float or [float, float] as [qx, qy]) 259 :return: scattering function value 252 """ Evaluate the model 253 @param x: input q-value (float or [float, float] as [qx, qy]) 254 @return: scattering function value 260 255 """ 261 256 # set effective radius and scaling factor before run … … 271 266 """ 272 267 Evaluate the model in cartesian coordinates 273 274 268 :param x: input q[], or [qx[], qy[]] 275 269 :return: scattering function P(q[]) … … 285 279 """ 286 280 Set the dispersion object for a model parameter 287 288 281 :param parameter: name of the parameter [string] 289 282 :dispersion: dispersion object of type DispersionModel … … 300 293 def fill_description(self, p_model, s_model): 301 294 """ 302 Fill the description for P(Q)*S(Q)295 Fill the description for P(Q)*S(Q) 303 296 """ 304 297 description = ""
Note: See TracChangeset
for help on using the changeset viewer.