@@ -9,9 +9,10 @@ class MultiplicationModel(BaseComponent):
99 The model parameters are combined from both models, P(Q) and S(Q), except 1) 'effect_radius' of S(Q)
1010 which will be calculated from P(Q) via calculate_ER(),
1111 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'.
1313 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'.
1516 """
1617 def __init__ (self , p_model , s_model ):
1718 BaseComponent .__init__ (self )
@@ -80,8 +81,8 @@ def __init__(self, p_model, s_model ):
8081
8182 def _clone (self , obj ):
8283 """
83- Internal utility function to copy the internal
84- data members to a fresh copy.
84+ Internal utility function to copy the internal data members to a
85+ fresh copy.
8586 """
8687 obj .params = copy .deepcopy (self .params )
8788 obj .description = copy .deepcopy (self .description )
@@ -95,8 +96,8 @@ def _clone(self, obj):
9596
9697 def _set_dispersion (self ):
9798 """
98- combined the two models dispersions
99- Polydispersion should not be applied to s_model
99+ combine the two models' dispersions. Polydispersity should not be
100+ applied to s_model
100101 """
101102 ##set dispersion only from p_model
102103 for name , value in self .p_model .dispersion .iteritems ():
@@ -106,9 +107,10 @@ def getProfile(self):
106107 """
107108 Get SLD profile of p_model if exists
108109
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).
112114 """
113115 try :
114116 x , y = self .p_model .getProfile ()
@@ -120,8 +122,8 @@ def getProfile(self):
120122
121123 def _set_params (self ):
122124 """
123- Concatenate the parameters of the two models to create
124- this model parameters
125+ Concatenate the parameters of the two models to create
126+ these model parameters
125127 """
126128
127129 for name , value in self .p_model .params .iteritems ():
@@ -140,8 +142,8 @@ def _set_params(self):
140142
141143 def _set_details (self ):
142144 """
143- Concatenate details of the two models to create
144- this model details
145+ Concatenate details of the two models to create
146+ this model's details
145147 """
146148 for name , detail in self .p_model .details .iteritems ():
147149 if name != 'scale' :
@@ -153,7 +155,7 @@ def _set_details(self):
153155
154156 def _set_scale_factor (self ):
155157 """
156- Set scale=volfraction to P model
158+ Set scale=volfraction for P model
157159 """
158160 value = self .params ['volfraction' ]
159161 if value != None :
@@ -167,7 +169,7 @@ def _set_scale_factor(self):
167169
168170 def _set_effect_radius (self ):
169171 """
170- Set effective radius to S(Q) model
172+ Set effective radius to S(Q) model
171173 """
172174 if not 'effect_radius' in self .s_model .params .keys ():
173175 return
@@ -205,7 +207,7 @@ def setParam(self, name, value):
205207
206208 def _setParamHelper (self , name , value ):
207209 """
208- Helper function to setparam
210+ Helper function to setparam
209211 """
210212 # Look for dispersion parameters
211213 toks = name .split ('.' )
@@ -228,7 +230,7 @@ def _setParamHelper(self, name, value):
228230
229231 def _set_fixed_params (self ):
230232 """
231- fill the self.fixed list with the p_model fixed list
233+ Fill the self.fixed list with the p_model fixed list
232234 """
233235 for item in self .p_model .fixed :
234236 self .fixed .append (item )
@@ -239,6 +241,7 @@ def _set_fixed_params(self):
239241 def run (self , x = 0.0 ):
240242 """
241243 Evaluate the model
244+
242245 :param x: input q-value (float or [float, float] as [r, theta])
243246 :return: (scattering function value)
244247 """
@@ -249,9 +252,11 @@ def run(self, x = 0.0):
249252 self .s_model .run (x )
250253
251254 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
255260 """
256261 # set effective radius and scaling factor before run
257262 self ._set_effect_radius ()
@@ -265,6 +270,7 @@ def runXY(self, x = 0.0):
265270 def evalDistribution (self , x = []):
266271 """
267272 Evaluate the model in cartesian coordinates
273+
268274 :param x: input q[], or [qx[], qy[]]
269275 :return: scattering function P(q[])
270276 """
@@ -278,6 +284,7 @@ def evalDistribution(self, x = []):
278284 def set_dispersion (self , parameter , dispersion ):
279285 """
280286 Set the dispersion object for a model parameter
287+
281288 :param parameter: name of the parameter [string]
282289 :dispersion: dispersion object of type DispersionModel
283290 """
@@ -292,7 +299,7 @@ def set_dispersion(self, parameter, dispersion):
292299
293300 def fill_description (self , p_model , s_model ):
294301 """
295- Fill the description for P(Q)*S(Q)
302+ Fill the description for P(Q)*S(Q)
296303 """
297304 description = ""
298305 description += "Note:1) The effect_radius (effective radius) of %s \n " % \
0 commit comments