@@ -214,8 +214,7 @@ def read_data(self, data, stype, qmax, qdamp):
214214
215215 data -- name of file from which to read data
216216 stype -- 'X' (xray) or 'N' (neutron)
217- qmax -- Q-value cutoff used in PDF calculation.
218- Use qmax=0 to neglect termination ripples.
217+ qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples.
219218 qdamp -- instrumental Q-resolution factor
220219
221220 Raises: IOError when the file cannot be read from disk
@@ -230,8 +229,7 @@ def read_data_string(self, data, stype, qmax, qdamp, name=""):
230229
231230 data -- string containing the contents of the data file
232231 stype -- 'X' (xray) or 'N' (neutron)
233- qmax -- Q-value cutoff used in PDF calculation.
234- Use qmax=0 to neglect termination ripples.
232+ qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples.
235233 qdamp -- instrumental Q-resolution factor
236234 name -- tag with which to label data
237235 """
@@ -250,8 +248,7 @@ def read_data_lists(
250248
251249 All lists must be of the same length.
252250 stype -- 'X' (xray) or 'N' (neutron)
253- qmax -- Q-value cutoff used in PDF calculation.
254- Use qmax=0 to neglect termination ripples.
251+ qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples.
255252 qdamp -- instrumental Q-resolution factor
256253 r_data -- list of r-values
257254 Gr_data -- list of G(r) values
@@ -298,9 +295,9 @@ def alloc(self, stype, qmax, qdamp, rmin, rmax, bin):
298295
299296 The structure from which to calculate the PDF must first be imported
300297 with the read_struct() or read_struct_string() method.
298+
301299 stype -- 'X' (xray) or 'N' (neutron)
302- qmax -- Q-value cutoff used in PDF calculation.
303- Use qmax=0 to neglect termination ripples.
300+ qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples.
304301 qdamp -- instrumental Q-resolution factor
305302 rmin -- minimum r-value of calculation
306303 rmax -- maximum r-value of calculation
@@ -494,24 +491,29 @@ def constrain(self, var, par, fcon=None):
494491 """Constrain(var, par[, fcon]) --> Constrain a variable to a parameter.
495492
496493 A variable can be constrained to a number or equation string.
497- var -- variable to constrain, such as x(1)
498- par -- parameter which to constrain the variable. This can be
499- an integer or an equation string containing a reference
500- to another parameter. Equation strings use standard c++
501- syntax. The value of a constrained parameter is accessed
502- as @p in an equation string, where p is the parameter.
503- e.g.
504- >>> constrain(x(1), 1)
505- >>> constrain(x(2), "0.5+@1")
506- fcon -- 'USER', 'IDENT', 'FCOMP', or 'FSQR'
507- this is an optional parameter, and I don't know how it is
508- used!
509494
510- Raises:
511- pdffit2.constraintError if a constraint is bad
512- pdffit2.unassignedError if variable does not yet exist
513- ValueError if variable index does not exist (e.g. lat(7))
495+ :param var: variable to constrain, such as x(1)
496+ :param par: parameter which to constrain the variable. This can be an
497+ integer or an equation string containing a reference to
498+ another parameter. Equation strings use standard C++
499+ syntax. The value of a constrained parameter is accessed
500+ as ``@p`` in an equation string, where ``p`` is the
501+ parameter.
502+ :type par: int or str
503+ :param fcon: 'USER', 'IDENT', 'FCOMP', or 'FSQR'. This is an optional
504+ parameter; usage is currently unclear.
505+ :type fcon: str
506+
507+ Example::
508+
509+ >>> constrain(x(1), 1)
510+ >>> constrain(x(2), "0.5+@1")
511+
512+ :raises pdffit2.constraintError: if a constraint is bad
513+ :raises pdffit2.unassignedError: if variable does not yet exist
514+ :raises ValueError: if variable index does not exist (e.g. lat(7))
514515 """
516+
515517 var_ref = self .__getRef (var )
516518 varnc = _convertCallable (var )
517519 if fcon :
0 commit comments