iFit: a simple library to analyze data
E. Farhi, ILL/DS/CS - Version 2.0.2
- Nov. 27, 2018
the iFit Data Analysis library !
"Simple methods to be used for
complex data analysis"
Main functionalities are
[ iData Load Plot Math Fit Save Optimization iFunc
[ miFit PyFit
McStas Neutron Scattering
library (pronounce [eye-fit
is a set of methods to load, analyze, plot, fit and optimize
scientific data sets and models, and export results. iFit
is based on Matlab
, but can also be
launched without Matlab license (stand-alone version).
library focuses on doing the
. Any text file can be imported straight
away, and a large set of binary files are supported. Any data
dimensionality can be handled, including event based data sets
(even though not all methods do work for these). Any model can
be assembled for fitting data sets.
A gallery of some of the things iFit
The iFit package constitutes a full data analysis
infrastructure. To summarize, we list below the most important
resources you may use:
||the main container for data sets
||how to import data sets into iData
||how to plot a data set (1D, 2D, 3D and
||plenty of math to work with data sets
||how to fit a model onto a data set (using
||saving data sets
||routines for optimisation of anything
||the main model object
||a list of supported input file formats
(for data sets and models)
||the main iFit user interface (for those
avoiding command lines)
||using iFit from Python
In addition, we provide some higher level applications
||pre-defined models (1D, 2D, 4D)
|Neutron scattering data treatment
||lattice dynamics aka phonons
||Neutron triple-axis spectrometer model,
resolution and fitting
||Monte-Carlo neutron/x-ray ray-tracing
The library can be used from user interfaces
, or from
the prompt as a set of commands and scripts.
|From the prompt (command
|User interface: miFit
|neutron TAS: ResLibCal
Have a look at the Quick
Start or the iFit standalone
page. There, you mostly manipulate iData
and iFunc objects.
an advanced yet simple user interface to load data sets,
plot, transform, export, and fit.
compute the neutron TAS spectrometer resolution
ellipsoid (ResCal/ResLib merge)
Get more details about what's in the
Ok, let's start !
To download and install the package,
refer to the Install
We then recommend that you start with the miFit
If you want a quick example with commands, refer to the Quick Start
page. Otherwise, the
typical usage would be:
Start Matlab... or iFit stand-alone
>> addpath(genpath('/some/path/to/iFit')); % not needed for the stand-alone version
>> a = iData([ ifitpath 'Data/ILL_IN6.dat' ]);
If you do not know Matlab
you will discover that using the iFit library does not require
advanced IT knowledge. The general syntax are rather intuitive,
and all methods are able to tolerate (and correct) most of the
user mistakes. In this respect, when some of the input parameters
are missing, sensible choices can be made automatically. You can
look at the iFit
standalone page, where a
short Matlab introduction is available.
If you have
used in the past the MFit/MView
suite, you will find that this library has the same scope, but
omitting the user interface.
If you have
used the Spec1d
, you will quickly find that the iFit
follows exactly the same
If you come
from the Python world
you will find out that the iFit syntax is pretty close. We provide
for you a Python interface to iFit which exposes iFit objects and
methods into Python. Refer to the PyFit
Help me !
An extensive documentation is provided as web pages (such as this
one) which you access from Matlab with either
and help pages for each function/method, which you can access with
>> help iData
A Tutorial (Jan 2012)
is available as PDF presentations with exercises.
>> help iData/load
>> help iFunc
You may also search this whole documentation (using Google):
Finally, the whole Matlab documentation is available on-line for
free, especially to complement the standalone limited help system.
A list of bugs and release
history is recorded in the Changes
If you find new bugs please send them to me [farhi (at) ill.fr] with:
is the list set-up in order to exchange information (issues,
questions, announcements). Messages should be sent to email@example.com.
- your Matlab version
- the iFit version which you can get from the Matlab command version(iData)
- the script/command that reproduces the error together with any
required external data file
- a copy of the error messages produced by the script/command.
- a smile ;-)
You may register by entering your email address and press subscribe:
To install the package, refer to the Install
page. See the Changes.
Installation for Linux Debian-class systems is simplified using
package managers - see here.
When starting from scratch, we recommend installing a Ubuntu system,
then add package ifit-phonons from our Debian repository.
Please register to the ifit-users
Credits, Links and
iFit was invented by E.
Farhi and took many years to come to you.
Substantial contributions from Y.
Debab and P. Willendrup.
If you produce scientific output using iFit, I'd appreciate if you
cite the following reference:
iFit is a product from the Computing
for Science group at the Institut
Laue-Langevin, Grenoble, France.
- E. Farhi, Y. Debab and P. Willendrup, J. Neut. Res., 17 (2013) 5. DOI:
- E. Farhi, The iFit data
analysis library, ILL, Computing for Science
See the Credits page for more
information on contributions, including licensing.
A set of links to related
packages is also included there.
If you wish to contribute, send
suggestions, scripts, and new functions/methods to [farhi (at) ill.fr]. Your
contribution will then be included in the next release, with proper
credits to the authors.
An other solution is to use the GitHub 'pull request' mechanism,
i.e. login at GitHub, fork
your own iFit repository, modify it at your convenience, and
changes for inclusion back into the master iFit branch. These
changes will then eventually be validated, and inserted into the
This software is experimental, and should not be considered
bullet-proof. In particular, expect many bugs - which should be
reported to me [farhi (at) ill.fr]
or as an 'issue'
on GitHub if you want them to be fixed quickly. Also, this
prototype is known to be slow. This will be improved gradually...
- iFit Welcome - Nov. 27, 2018 2.0.2
- back to Main iFit Page