Graphical user interface for lsqfit
using dash
.
Run the following commands in the repository root directory
pip install --upgrade numpy scipy
pip install [--user] [-e] .
Either directly use a fit object to spawn a server
# some_script.py
from lsqfit import nonlinear_fit
from lsqfitgui import run_server
...
fit = nonlinear_fit(data, fcn=fcn, prior=prior)
run_server(fit)
or use the console script entry point pointing to a gvar
pickeled fit (and a fit function which is not stored in the pickled file)
#other_script.py
import gvar as gv
from lsqfit import nonlinear_fit
def fcn(x, p):
y = ...
return y
...
fit = nonlinear_fit(data, fcn=fcn, prior=prior)
gv.dump(fit, "fit.p")
and run
lsqfitgui [--function other_script.py:fcn] fit.p
Both commands will spawn a local server hosting the lsqfit interface.
For more information, see also the documentation.
You need to install dev requirements and add WebDriver support according to Dash Testing.
Afterwards, pytest .
executes the tests.