Skip to content

Installation

EISFitpython needs Python 3.9 or newer. The installation also installs NumPy, SciPy, Matplotlib and pandas.

Install from the repository

git clone https://github.com/Sheyigold/EISFitpython.git
cd EISFitpython
python -m pip install -e .

The option -e installs the package in editable mode. Python then loads the package from this folder, and a change in the source is active immediately. For a normal installation, do not use -e.

Make sure that the import is correct:

python -c "import EISFitpython; print(EISFitpython.__version__)"

The command prints the version number of the package.

Run the tests

python -m pip install -e ".[test]"
python -m pytest tests

The tests take less than one minute. They compare the circuit calculations, the fit, the statistics and the derived quantities with known values. They also repeat the fits of the example scripts.

Build this documentation

python -m pip install -e ".[docs]"
mkdocs serve

mkdocs serve prints a local address. Open it in a browser to read the pages. To write the pages as static HTML into the folder site/, run:

mkdocs build --strict

Operation without a display

The plot and report functions open figure windows with matplotlib.pyplot.show(). On a server, or in an automated test run, select the Agg backend of Matplotlib. This backend draws the figures without a window:

MPLBACKEND=Agg python -m pytest tests

In Windows PowerShell:

$env:MPLBACKEND = "Agg"
python -m pytest tests

Location of the output files

The simulation, report and plot functions write their files into the current working directory. Before you start an analysis, go to a folder for its results. Then the files of one run do not replace the files of a different run.