Skip to content

ckoerber/lsqfit-gui

Repository files navigation

Documentation Status Code Coverage Code style: black

Lsqfit GUI

Graphical user interface for lsqfit using dash.

GUI example generated by example/entrypoint.py

Install

Run the following commands in the repository root directory

pip install --upgrade numpy scipy
pip install [--user] [-e] .

Usage

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.

Tests

You need to install dev requirements and add WebDriver support according to Dash Testing. Afterwards, pytest . executes the tests.

About

Graphical user interface for performing Bayesian Inference (Bayesian fits).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published