@@ -184,7 +184,7 @@ Parameter will not be updated.
184
184
185
185
Parameter values that are "way off" are a common reason for Parameters
186
186
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
188
188
2 or so, as in the example at
189
189
:ref: `sphx_glr_examples_documentation_model_gaussian.py `. A Gaussian
190
190
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?
226
226
227
227
228
228
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
230
230
continuous values, and represented as double precision floating point
231
231
values. As an important example, you cannot have a variable that is
232
232
somehow constrained to be an integer.
@@ -269,13 +269,13 @@ That you implement with a model function and use to fit data like this:
269
269
result = mod.fit(ydat, pars, x=xdat)
270
270
print(result.fit_report())
271
271
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
273
273
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.
276
276
277
277
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
279
279
depends on your model function. A second option is treat the break not as a
280
280
hard break but as a more gentle transition with a sigmoidal function, such
281
281
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:
313
313
result = mod.fit(ydat, pars, x=xdat)
314
314
print(result.fit_report())
315
315
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
318
318
transition for example.
0 commit comments