(Generate patch)
# Line 23 | Line 23
23    * ``'max'``    The maximum allowable value.
24    * ``'fixed'``  Either 'float', 'fixed', or a reference to another ROI.
25
26 < The ``min``, ``max``, and ``fixed`` keys are used during automatic curve-fitting.
27 < A fixed parameter is not allowed to change, while a float parameter is adjusted
28 < until the least-squares algorithm has minimized the sum-squared error.
29 < The *fixed* parameter may also be an integer, in which case it is fixed to
30 < the value of a parameter of the same name in another ROI.
31 <
32 < The model function returns an array of values obtained by numerical integration.
33 < The model is represented by differential equations and integrated using the
34 < rectangle rule or, preferentially, using the trapezoidal rule.
26 > The ``min``, ``max``, and ``fixed`` keys are used during automatic
27 > curve-fitting.  A fixed parameter is not allowed to change, while a
28 > float parameter is adjusted until the least-squares algorithm has
29 > minimized the sum-squared error.  The *fixed* parameter may also be an
30 > integer, in which case it is fixed to the value of a parameter of the
31 > same name in another ROI.
32 >
33 > The model function returns an array of values obtained by numerical
34 > integration.  The model is represented by differential equations and
35 > integrated using the rectangle rule or, preferentially, using the
36 > trapezoidal rule.
37 >
38 > Functions are also available that provide parameter dictionaries
39 > containing all the necessary default values.
40
41   .. moduleauthor:: Christopher Lausted,
42                    Institute for Systems Biology,
# Line 63 | Line 68
68    >>> data2 = mdl.simple1to1(times, data, param2)
69    >>> print round(data2[299], 1)
70    160.3
71 +
72   """
73   __version__ = "110517"
74
# Line 97 | Line 103
103      ## End of drift() function.
104
105   def drift_def_params():
106 <    """"
107 <    Return dictionary of default parameters for drift model::
106 >    """
107 >    Return dictionary of default parameters for drift model.
108 >    For example::
109
110 <    >>> from numpy import arange, zeros
111 <    >>> defaultparam0 = drift_def_params()
112 <    >>> data0 = drift(arange(100), zeros(100), defaultparam0)
113 <    >>> print round(data0[99], 1)
114 <    99.0
110 >      >>> from numpy import arange, zeros
111 >      >>> defaultparam0 = drift_def_params()
112 >      >>> data0 = drift(arange(100), zeros(100), defaultparam0)
113 >      >>> print round(data0[99], 1)
114 >      99.0
115      """
116      dpar = dict(rate=dict(value=1.0, min=-100.0, max=100.0, fixed=True))
117      return dpar
# Line 143 | Line 150
150      *Optional*
151      params['cofa']['value'] concentration factor, (1/dilution factor)
152      ======================= ============================================
146
153      """
154
155      ## Skip parameter validation steps for now.
# Line 190 | Line 196
196      """End of simple1to1() function"""
197
198   def simple1to1_def_params():
199 <    """"
200 <    Return a dictionary of default parameters for simple1to1 model::
199 >    """
200 >    Return a dictionary of default parameters for simple1to1 model.
201 >    For example::
202
203 <    >>> from numpy import arange, zeros
204 <    >>> defaultparam0 = simple1to1_def_params()
205 <    >>> data0 = simple1to1(arange(300), zeros(300), defaultparam0)
206 <    >>> print round(data0[299], 1)
207 <    160.3
203 >      >>> from numpy import arange, zeros
204 >      >>> defaultparam0 = simple1to1_def_params()
205 >      >>> data0 = simple1to1(arange(300), zeros(300), defaultparam0)
206 >      >>> print round(data0[299], 1)
207 >      160.3
208      """
209      dpar = {}
210      dpar['rmax'] =  dict(value=1e3,   min=1e1,   max=1e4,   fixed=True)
# Line 245 | Line 252
252      *Optional*
253      params['cofa']['value'] concentration factor, (1/dilution factor)
254      ======================= ============================================
248
255      """
256
257      ## Skip parameter validation steps for now.
# Line 299 | Line 305
305      """End of simple1to1_mtl() function"""
306
307   def simple1to1_mtl_def_params():
308 <    """"
309 <    Return dictionary of default parameters for simple1to1_mtl model::
310 <
305 <    >>> from numpy import arange, zeros
306 <    >>> defaultparam0 = simple1to1_mtl_def_params()
307 <    >>> data0 = simple1to1_mtl(arange(300), zeros(300), defaultparam0)
308 <    >>> print round(data0[299], 1)
309 <    161.1
308 >    """
309 >    Return dictionary of default parameters for simple1to1_mtl model.
310 >    For example::
311
312 +      >>> from numpy import arange, zeros
313 +      >>> defaultparam0 = simple1to1_mtl_def_params()
314 +      >>> data0 = simple1to1_mtl(arange(300), zeros(300), defaultparam0)
315 +      >>> print round(data0[299], 1)
316 +      161.1
317      """
318      dpar = simple1to1_def_params()  ## Based on simple1to1.
319      dpar['kmtl'] = dict(value=1e9, min=1e2, max=1e10, fixed=True)
# Line 403 | Line 409
409      return y
410
411   def simple1to1_series_def_params():
412 <    """"
412 >    """
413      Return a dictionary of default parameters for simple1to1_series model.
414      While parameters for eight injection times are provided, only the
415 <    first injection time is nonzero.::
415 >    first injection time is nonzero. For example::
416
417 <    >>> from numpy import arange, zeros
418 <    >>> defaultparam0 = simple1to1_series_def_params()
419 <    >>> data0 = simple1to1_series(arange(300), zeros(300), defaultparam0)
420 <    >>> print round(data0[298], 1)
421 <    160.3
417 >      >>> from numpy import arange, zeros
418 >      >>> defaultparam0 = simple1to1_series_def_params()
419 >      >>> data0 = simple1to1_series(arange(300), zeros(300), defaultparam0)
420 >      >>> print round(data0[298], 1)
421 >      160.3
422      """
423      dpar = {}
424      dpar['kon'] =  dict(value=1e4,   min=1e2,   max=1e7,   fixed=True)

### Diff Legend

 – Removed lines + Added lines < Changed lines > Changed lines