from oitg.fitting import line
line.fit([0,1],[0,1])
with error
Traceback (most recent call last):
File "C:\Users\LocalAdmin\Miniconda3\envs\artiq-env\lib\site-packages\oitg-0.1-py3.9.egg\oitg\fitting\FitBase.py", line 249, in fit
File "C:\Users\LocalAdmin\Miniconda3\envs\artiq-env\lib\site-packages\scipy\optimize\minpack.py", line 795, in curve_fit
res = least_squares(func, p0, jac=jac, bounds=bounds, method=method,
File "C:\Users\LocalAdmin\Miniconda3\envs\artiq-env\lib\site-packages\scipy\optimize\_lsq\least_squares.py", line 805, in least_squares
raise ValueError("`x0` is infeasible.")
ValueError: `x0` is infeasible.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "y:/testing/scratch_mfg/line_fit.py", line 2, in <module>
line.fit([0,1],[0,1])
File "C:\Users\LocalAdmin\Miniconda3\envs\artiq-env\lib\site-packages\oitg-0.1-py3.9.egg\oitg\fitting\FitBase.py", line 255, in fit
oitg.fitting.FitBase.FitError: `x0` is infeasible.
The following code fails
with error
One obvious thing that would fail is the
parameter_initialiser
in line.py https://github.com/OxfordIonTrapGroup/oitg/blob/9b64b4e2c19d64926e5852bb2e16fca0b54ff230/oitg/fitting/line.py#L6-L9 which would give division by 0 errors for a size two array.