Changeset fb3f9af in sasview for src/sas/models
- Timestamp:
- Jul 26, 2015 6:28:26 PM (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.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:
- ae2a197
- Parents:
- 1f5f206
- Location:
- src/sas/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/models/MultiplicationModel.py
rac7be54 rfb3f9af 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 , 'scale_factor'.12 then P*S is multiplied by a new parameter, 'scale_factor'. 13 13 The polydispersion is applicable only to P(Q), not to S(Q). 14 Note: P(Q) refers to 'form factor' model while S(Q) does to 'structure factor'. 14 15 .. note:: P(Q) refers to 'form factor' model while S(Q) does to 'structure factor'. 15 16 """ 16 17 def __init__(self, p_model, s_model ): … … 81 82 def _clone(self, obj): 82 83 """ 83 Internal utility function to copy the internal84 data members to afresh copy.84 Internal utility function to copy the internal data members to a 85 fresh copy. 85 86 """ 86 87 obj.params = copy.deepcopy(self.params) … … 96 97 def _set_dispersion(self): 97 98 """ 98 combined the two models dispersions99 Polydispersion should not beapplied to s_model99 combine the two models' dispersions. Polydispersity should not be 100 applied to s_model 100 101 """ 101 102 ##set dispersion only from p_model … … 107 108 Get SLD profile of p_model if exists 108 109 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). 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). 112 114 """ 113 115 try: … … 121 123 def _set_params(self): 122 124 """ 123 124 thismodel parameters125 Concatenate the parameters of the two models to create 126 these model parameters 125 127 """ 126 128 … … 141 143 def _set_details(self): 142 144 """ 143 144 this modeldetails145 Concatenate details of the two models to create 146 this model's details 145 147 """ 146 148 for name, detail in self.p_model.details.iteritems(): … … 154 156 def _set_scale_factor(self): 155 157 """ 156 Set scale=volfraction toP model158 Set scale=volfraction for P model 157 159 """ 158 160 value = self.params['volfraction'] … … 168 170 def _set_effect_radius(self): 169 171 """ 170 172 Set effective radius to S(Q) model 171 173 """ 172 174 if not 'effect_radius' in self.s_model.params.keys(): … … 206 208 def _setParamHelper(self, name, value): 207 209 """ 208 210 Helper function to setparam 209 211 """ 210 212 # Look for dispersion parameters … … 229 231 def _set_fixed_params(self): 230 232 """ 231 fill the self.fixed list with the p_model fixed list233 Fill the self.fixed list with the p_model fixed list 232 234 """ 233 235 for item in self.p_model.fixed: … … 240 242 """ 241 243 Evaluate the model 244 242 245 :param x: input q-value (float or [float, float] as [r, theta]) 243 246 :return: (scattering function value) … … 250 253 251 254 def runXY(self, x = 0.0): 252 """ Evaluate the model 253 @param x: input q-value (float or [float, float] as [qx, qy]) 254 @return: scattering function value 255 """ 256 Evaluate the model 257 258 :param x: input q-value (float or [float, float] as [qx, qy]) 259 :return: scattering function value 255 260 """ 256 261 # set effective radius and scaling factor before run … … 266 271 """ 267 272 Evaluate the model in cartesian coordinates 273 268 274 :param x: input q[], or [qx[], qy[]] 269 275 :return: scattering function P(q[]) … … 279 285 """ 280 286 Set the dispersion object for a model parameter 287 281 288 :param parameter: name of the parameter [string] 282 289 :dispersion: dispersion object of type DispersionModel … … 293 300 def fill_description(self, p_model, s_model): 294 301 """ 295 302 Fill the description for P(Q)*S(Q) 296 303 """ 297 304 description = "" -
src/sas/models/sas_extension/__init__.py
r79492222 rfb3f9af 1 """ 2 This is an empty package - should probably delete 3 """
Note: See TracChangeset
for help on using the changeset viewer.