Skip to content

Commit ddf7d40

Browse files
committed
faq rst fixes
1 parent 24a569a commit ddf7d40

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/faq.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Parameter will not be updated.
184184

185185
Parameter values that are "way off" are a common reason for Parameters
186186
being stuck at initial values. As an example, imagine fitting peak-like
187-
data with and `x` range of 0 to 10, peak centered at 6, and a width of 1 or
187+
data with and ``x`` range of 0 to 10, peak centered at 6, and a width of 1 or
188188
2 or so, as in the example at
189189
:ref:`sphx_glr_examples_documentation_model_gaussian.py`. A Gaussian
190190
function with an initial value of for the peak center at 5 and an initial
@@ -226,7 +226,7 @@ Can Parameters be used for Array Indices or Discrete Values?
226226

227227

228228
The short answer is "No": variables in all of the fitting methods used in
229-
`lmfit` (and all of those available in `scipy.optimize`) are treated as
229+
``lmfit`` (and all of those available in ``scipy.optimize``) are treated as
230230
continuous values, and represented as double precision floating point
231231
values. As an important example, you cannot have a variable that is
232232
somehow constrained to be an integer.
@@ -269,13 +269,13 @@ That you implement with a model function and use to fit data like this:
269269
result = mod.fit(ydat, pars, x=xdat)
270270
print(result.fit_report())
271271

272-
This will not result in a very good fit, as the value for `x0` cannot be
272+
This will not result in a very good fit, as the value for ``x0`` cannot be
273273
found by making a small change in its value. Specifically,
274-
`model[np.where(x<x0)]` will give the same result for `x0=22` and
275-
`x0=22.001`, and so that value is not changed during the fit.
274+
``model[np.where(x<x0)]`` will give the same result for ``x0=22`` and
275+
``x0=22.001``, and so that value is not changed during the fit.
276276

277277
There are a couple ways around this problems. First, you may be able to
278-
make the fit depend on `x0` in a way that is not just discrete. That
278+
make the fit depend on ``x0`` in a way that is not just discrete. That
279279
depends on your model function. A second option is treat the break not as a
280280
hard break but as a more gentle transition with a sigmoidal function, such
281281
as an error function. Like the break-point, these will go from 0 to 1, but
@@ -313,6 +313,6 @@ look like this and give better fit results:
313313
result = mod.fit(ydat, pars, x=xdat)
314314
print(result.fit_report())
315315

316-
The natural width of the error function is about 2 `x` units, but you can
317-
adjust this, shortening it with `erf((x-x0)*2)` to give a sharper
316+
The natural width of the error function is about 2 ``x`` units, but you can
317+
adjust this, shortening it with ``erf((x-x0)*2)`` to give a sharper
318318
transition for example.

0 commit comments

Comments
 (0)