Manual

Fit-o-mat written and © by Andreas Möglich 2017-2022, Universität Bayreuth, Germany
Released under the GNU General Public License version 3.0 or later
andreasmoeglichuni-bayreuthde
Möglich, A. (2018) An open-source, cross-platform resource for nonlinear least-squares curve fitting. J Chem Educ 95(12), 2273-2278 [10.1021/acs.jchemed.8b00649]

General remarks

Purpose & audience

Fit-o-mat is an all-purpose, open-source, cross-platform program for nonlinear least-squares data fitting. The software is written in Python 3 and resorts to the Python libraries NumPy and SciPy for numerical methods, and to matplotlib for visualization. The program is operated via a graphical user interface implemented in PyQt5. In a nutshell, Fit-o-mat provides a front-end to data-fitting algorithms implemented in Python and thereby strives to unlock their application for a broad audience, including people not versed in computer programming.

The intended target audience for Fit-o-mat is anybody interested in nonlinear least-squares analysis, specifically but not limited to students, teachers and researchers in the life sciences. As a case in point, we have been using the program in the classroom and for preparing figures for publication.

Gallery

A few examples of graphics prepared with Fit-o-mat (in a matter of minutes only).

Disclaimer

The program is released under the GNU General Public License version 3.0 or later. Hence, it can be freely used and distributed as long as it is unmodified. Use at your own responsibility, the author cannot be held responsible for any data loss etc. If you encounter bugs, try to reproduce, save program state right before bug occurs (cf. below) and send to andreasmoeglichuni-bayreuthde. Feature requests and illustrations for the figure gallery may also be sent to the same address.

If you employ Fit-o-mat in a publication, please acknowledge use:
Möglich, A. (2018) An open-source, cross-platform resource for nonlinear least-squares curve fitting. J Chem Educ 95(12), 2273-2278, doi: 10.1021/acs.jchemed.8b00649 [10.1021/acs.jchemed.8b00649]

Features

Fit-o-mat attempts to meet these objectives:

Installation

Fit-o-mat requires a working Python 3 installation and the following modules, all of which are pretty standard: PyQt5, sys, glob, functools, copy, ast, time, os, webbrowser, matplotlib, xlrd, xlsxwriter, numpy, scipy, io, zipfile. To install Python 3, the following information may be helpful. If you encounter problems, please refer to Troubleshooting.

The actual Fit-o-mat program is a Python script named fit-o-mat.py. Copy this script as well as the accompanying file folders to a desired directory. Run the Python program. (Under Linux/OS X, the script assumes that the Python 3 interpreter is located at /usr/bin/python3.) If installation has been successful, a program window should now appear that depending upon operating system looks approximately like this.
Windows
Linux
OS X (dark theme [courtesy of C. Kambach])
On Linux/OS X platforms, the graphical user interface may appear overly small (depending on screen resolution). In this case, you can try to start the program with the following command line argument:

   ./fit-o-mat.py -font 14

This argument sets the base font size of the user interface, and one may try different values here. Note that the command line argument will have no effect on Windows platforms.

Troubleshooting

The following list contains problems that may occur when using Fit-o-mat and shows how to address them:

Tutorials

How to learn using Fit-o-mat? One option certainly is to go through this manual but arguably the best way to learn using (and liking) Fit-o-mat is to actually try it out. In this spirit, Fit-o-mat comes with several tutorial files that can be executed via the 'Open State' button located in the bottom right corner of the program window (or, by pressing Ctrl-O, or, by dragging the state file on the program window). To familiarize themselves with the core functionality of Fit-o-mat, fresh users are advised to go through these tutorials. Instructors may add their own tutorials as they see fit. Moreover, the button 'Tooltips' in the bottom right of the program window activates tooltips when hovering over elements of the user interface.

Credits

Kudos to my research group at Universität Bayreuth for patience, comments, inspiration, testing, beta-testing and (rather painful) alpha-testing. Thanks to my old pals Max2, Marvin, Falko et al. at Humboldt-Universität zu Berlin for hooking me up with Python (used to be a camelid before). Thanks to Andrés García de Fuentes, Nischal Karki, Carolin Schnedermann and Vincent Emann, and Drs. Julia Dietler, Christian Kambach, Jochen Reinstein, David Richter, Dagmar Wachten, Michael Weyand, and Brian Zoltowski for stimulating discussion and motivation.

Feature reference

Main window

The program window is divided into two halves, with the left showing one of six tabs and the right displaying main and residuals plots. The usage of the six tabs is detailed below. The right part of the window allows to set limits and scale (linear or log) for the x any y axes; the checkboxes turn on/off automatic zoom to current data/curve during program usage. The button 'split' in the bottom right corner turns on/off a split x axis; once turned on, a second plot will be displayed next to the principal one. This option is for example useful for plotting split log and linear axes. The button 'Clear Selection' below the plot unselects any data points currently selected (see 'Results' tab for more details on selection).

Clicking in the main graph area elicits a number of actions as follows:

The very bottom of the program window contains a status bar that displays messages in case of problems during program usage. Watch this space to become aware of (and hopefully solve) any problems. At the right edge of the status bar, buttons are available for saving and loading the current state (or, session) of the program; for controlling the magnification of on-screen display; and for accessing advanced program options (additional settings for export, graphics options, minimization and random search -- use with care). Additional buttons access the online help and activate tooltips when hovering over elements of the user interface.

Fit-o-mat responds to a number of keyboard shortcuts as follows:

Data tab

The purpose of this tab is to import data, and to optionally reduce and transform them.

Fit tab

The purpose of this tab is to fit the data.

Global tab

This tab allows global fitting of several data sets to one or several functions.

Results tab

This tab lists the current data and fit function values.

Objects tab

This tab grants access to the organization and the appearance of data, curve, residuals and extra graphics objects.

Graphics tab

This tab is used to adjust and export graphics. Note that additional graphics settings can be accessed by enabling advanced graphics options in the Advanced menu. It's arguably easier to try out and see what these settings are doing than reading the below, but just in case, here we go:

2nd Axes tab

This tab is initially hidden but will be displayed once at least one item (data set, curve or extra) has been moved to the second y axis, cf. Objects tab. The tab offers a number of settings for the second y axis that correspond to the ones in the Graphics tab for the principal y axis; see there for details.

Advanced settings

This menu can be opened by clicking on the 'Advanced' button in the status bar. The following options can be configured: