iFit: a simple library to analyze data
E. Farhi, ILL/DS/CS - Version 1.0.4 - Oct. 24, 2011
Welcome to the
iFit Data Analysis library !
"Simple
methods
to
be
used
for complex data analysis"
Purpose
The
iFit
library is a set of methods to load, analyze, plot, fit and
optimize models, and export results.
iFit
is based on
Matlab.

It does not currently include advanced graphical user interfaces (GUI),
and rather focuses on
doing the math
right.
Any text file can be imported straight away, and a 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).
The spirit of the library is to include a single object definition,
with a set of methods that provide all the means to perform the
usual data analysis procedures.
Obtaining the package
To install the package, refer to the
Install
page, you just need
Matlab.
Please register to the
ifit-users
mailing list.
The package is currently available from the
ifit.mccode.org web site:
- source package
for
all platforms, requires a Matlab license to
run [ zip, 7
Mb, Changes and Bugs].
- standalone packages for Linux, Windows and Mac OS X will be
available in future versions.
- The development repository is available at McCode
CVS.
What's in the box...
The
iData
objects
(iFit/@iData): the core of the package
The
iData
objects have been defined in
order to perform the following
operations seamlessly:
- Load any text formatted file, and a
large
set of binary format files
- Display object information, including metadata from the
original
file
- Plot the object Signal in a simple view
for 1D, 2D and 3D objects
- Perform mathematical operations using
objects (=-/* trigonometric projections integration re-binning...)
- Fit a parametrized model to the object
Signal, which makes use of the iOptim and iFuncs libraries.
- Save the object into a set of output
formats
An extended list of iData methods is
available in the
Methods page.
The
optimization
library
(iFit/iOptim)
A set of optimization routines has been
gathered in the
iOptim part of iFit. It
enables to choose and compare how different optimization methods can
solve a problem. This library is used transparently by the iData
fits method, but it may also be used independently.
The fit
functions/models (iFit/iFuncs)
A set of parametrized models is given in the
iFuncs
part of iFit in order to fit some imported data and find best parameter
sets which describe it. These functions may be used by the iData
fits and
ieval
method, and the lower level
iOptim library.
The
lower
level
import
routines
(iFit/iFiles)
The file import method used by iData is
performed on a lower level by the
iFiles
part of iFit. Its purpose is to import any text file, without knowing
its free format. However, a number of post-import wrappers exist in
order to reshape the imported data to match specific needs. These
wrappers are very short to write.
If needed, other importation methods should be added there, to be able
to handle more formats. This library is used transparently by the iData
load method, but it may also be used
independently to produce simple structures describing the data files
(even though we do not recommand this).
The documentation
(iFit/Docs)
The documentation is given as web pages, and all methods/functions have
their own embedded help. To access it use:
>> doc(iData)
A list of all available
iData methods is
also available, and can be directly accesed with
>> methods(iData)
The documentation currently contains the following pages:
- Changes: Version releases, Changes and
Bugs list.
- Credits: Credits, Licensing and
contributions from others.
- Fit: how to fit data sets onto
mathematical models and find the best parameter set
- iData: the description of the
fundamental object used in iFit, properties and how to handle it
- iFiles: how to import data files into
structures, which can be converted into idata afterwards. This is a
sub-library which you should only use if you need the data NOT to be an
object (but you then loose most of the iData capabilities).
- iFuncs: model functions that cab be use
for data fitting. A function maker tool is also provided.
- index: This iFit Welcome page.
- Install: the installation page.
- iOptim: the low level optimization
methods.
- Load: how to load data set directly as
iData objects. This is what you should use.
- Math: all mathematical operations and
related data handling to apply on iData objects.
- McStas: an interface with the McStas
neutron scattering ray-tracing simulation code for simulation, scanning
and optimization.
- Methods: a list of all available
methods for iData objects.
- Plot: many ways to plot the iData objects.
- QuickStart: where you should start
(a quick tutorial).
- Save: Saving iData objects into many file
formats.
You may also search this whole documentation (using Google):
Example data files
(iFit/Data)
Some
Data files are given as examples to be used
along the documentation web pages and in the
Quick
Start.
Interfaces with other
software and Graphical front-ends (iFit/GUI)
Specific interfaces have been written in order to use iFit
transparently for end-user applications:
Ok, let's start !
To install the package, refer to the
Install
page, you just need Matlab.
If you want a quick example, refer to the
Quick
Start page. Otherwise, the typical usage would be:
Start Matlab...
>> addpath(genpath('/some/path/to/iFit'))
>> a=iData(file)
>> plot(a)
>> b=2*a+log(a)
>> parameters=fits(a,'gauss')
>> saveas(a,'filename','pdf')
For beginners
If you do not know
Matlab already, 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.
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
object, you will quickly find that the
iFit follows exactly the
same syntax.
If you come from
the Python world, you will
find out that the syntax is pretty close, with methods,
objects/classes. A version of iFit could probably be ported to Python,
using the Scientific Python (see
Enthought Python and
Python(x,y), Pyhton Scientific
Matplotlib Numeric Numpy...).
Help me !
An extensive documentation is provided as web pages (such as this
one) which you access from Matlab with either
>> doc(iData)
>> methods(iData)
and help pages for each function/method, which you can access with
>> help iData
>> help iData/load
You may also search this whole documentation (using Google):
If you find bugs please send them to me [farhi (at) ill.fr] with:
- 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 ;-)
A list of bugs and release
history is recorded in the Changes page.
The ifit-users
is the list set-up in order to exchange information (issues, questions,
announcements). Messages should be sent to ifit-users@mccode.org.
You may register by entering your email address and press subscribe:
Credits and Disclaimer
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:
- E. Farhi, Y. Debab and P. Willedrup, J. Neut. Res., 17 (2011).
- E. Farhi, The iFit data
analysis library, ILL, Computing for Science (2011) <http://ifit.mccode.org>.
iFit is a product from the Computing
for
Science group at the Institut
Laue-Langevin, Grenoble, France.
See the Credits page for more information
on contributions, including licensing.
Disclaimer:
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]
if you want them to be fixed quickly. Also, this prototype is known to
be slow. This will be improved gradually...
E.
Farhi - iFit Welcome - $Date: 2011-08-25 09:33:09 $ $Revision: 1.26 $
- back to
Main iFit Page