1. Georg Brandl
  2. ufit

Overview

HTTPS SSH

README for ufit

ufit is a universal scattering data fitting package for use in noninteractive scripts, and with a graphical user interface.

It handles complex fitting functions by combining them from pre-defined "model" objects and handling parameter constraints and interdependencies well.

Fitting is done by one of several backends:

  • lmfit (L-M leastsq that allows parameter constraints)
  • minuit (pyminuit 1 or 2)
  • scipy (basic L-M leastsq from scipy.optimize)

Results can be easily plotted and further processed. Plotting is handled by matplotlib.

The GUI uses PyQt 4.

Icons by Yusuke Kamiyamane. Licensed under a Creative Commons Attribution 3.0 License. See http://p.yusukekamiyamane.com/.

Generating Windows EXEcutables and installation

Generation of the Windows executables is done in PyInstaller.

Recommended way is using Single Folder script:
Generate:
in the base-directory run:
pyinstaller ufit_singlefolder.spec [-y] [--clean]

-y option will overwrite everything in dist directory --clean will generate everything fro scratch

Result:

A Folder named 'ufit' in the folder 'dist', in which you can find all the files you need to run the 'Ufit.exe' contained in said folder.

Because this is not easy to distribute to the end users, it is reccomended to create installer. Use open source installer NSIS. Tool can be downlaoded from: http://nsis.sourceforge.net/

Open the tool and run script Ufit-Install.nsi from the root folder.

The result will be one ca 180 MB big install file, which can be distributed to the users.

There is also possible to generate single file executable by running:
pyinstaller ufit_singlefile.spec [-y] [--clean]

This option will be very slow to start the ufit and therefore it is not recommended.

Remarks for PyInstaller:
Created files are big, because they do not use UPX packaging. The reason is, that upx will create some problems with QT and will cause Ufit to crash by memory violation exception.