mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 03:53:41 +02:00
refactor: _standard_fit method made redundant. (#154)
* refactor: _standard_fit method made redundant. * fix: xs and yz in Corr.fit promoted to arrays. * fix: x promoted to array in _combined_fit if input is just a list. * feat: residual_plot and qqplot now work with combined fits with dictionary inputs. * tests: test for combined fit resplot and qqplot added. * docs: docstring of fits.residual_plot extended.
This commit is contained in:
parent
de35332a80
commit
dc7033e51f
3 changed files with 75 additions and 225 deletions
|
@ -734,8 +734,8 @@ class Corr:
|
|||
if len(fitrange) != 2:
|
||||
raise Exception("fitrange has to have exactly two elements [fit_start, fit_stop]")
|
||||
|
||||
xs = [x for x in range(fitrange[0], fitrange[1] + 1) if not self.content[x] is None]
|
||||
ys = [self.content[x][0] for x in range(fitrange[0], fitrange[1] + 1) if not self.content[x] is None]
|
||||
xs = np.array([x for x in range(fitrange[0], fitrange[1] + 1) if not self.content[x] is None])
|
||||
ys = np.array([self.content[x][0] for x in range(fitrange[0], fitrange[1] + 1) if not self.content[x] is None])
|
||||
result = least_squares(xs, ys, function, silent=silent, **kwargs)
|
||||
return result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue