Fermer cette fenetre

Merci de télécharger les logos officiels de l'ILL ici


Pour utiliser sur le webPour imprimer en haute résolutionLogo blanc pour fonds foncés

Télécharger PNG

Télécharger AI

Télécharger logo blanc PNG

Télécharger JPG

Télécharger logo blanc AI

Matlab ILL

The Computing for Science (CS) group supports ILL scientists, students and visitors in a number of activities including data analysis, instrument simulation and sample simulation.

Back to ILL Homepage
English French Deutsch 

All Software

Some Matlab programs

This page offers you to import some programs for Matlab libraries for software like:


The iFit tool is the prototype to the new MFit software. It is currently mostly script based. However, it is in principle much more powerful, resembling spec1d in design. Please visit ifit.mccode.org for more.

iFit is bundled with the ResLibCal resolution function computation for TAS (based upon ResCal and ResLib)

Matlab Graphic User Interface Applications Description

iFit (now 1.3, March 2013)

is a complete data treatment environment in the style of spec1d/specnd. It supports importation of a very large set of data formats, plotting of 1D,2D and 3D data sets, numerous mathematical operators to be used for data reduction, saving of the work into numerous formats, fitting of data sets with plenty of mathematical models, as well as models used in neutron/x-ray scattering, an interface to run and optimize McStas/McXtrace instruments.

iFit is distributed both as source code (requires a Matlab license), as well as standalone (provides a -slightly reduced- Matlab environment without the need for a license).

ResLibCal (now 1.0, March 2013)

This application gathers a set of analytical computational methods to estimate the resolution function of a triple-axis neutron spectrometer (TAS). ResLibCal is based on Matlab. The Cooper-Nathans and Popovici methods are proposed, in different implementations.

Mfit (now v4.3.3, Aug 23rd 2005) - refer to iFit for a more recent software
provides an attractive and easy to use point-and-click interface. Most operations (including guessing starting parameters for fits) can be performed via the mouse. The main object is to fit any type of (x,y) data with any fit function (even combinaisons), with various efficient algorithms. Many options are also available. A full manual is available.

Mview (now v4.2.2,  Aug 22nd 2005)
is designed in order to manipulate and display up to 20 data files. As Mfit, it is also a point-and-click application. A link with MFit permits to fit each data set.

Rescal (now v5.1) - refer to ResLibCal for a more recent software
is a specific application to compute 4D resolution ellipsoid for inelastic scattering instruments (neutrons... Popovici's and Cooper Nathan's methods). It is then possible to use it through a 4D convolution in a fit function (see "trix", which is included in archives).(note : this program is not based on "Rescal" famous code). A full manual is available (Jan. 1999).

Spec1d  - refer to iFit for a more recent software
is a set of commands in order to fit and manipulate data from Matlab's prompt. It requires load routines, fit functions and routines. In fact it is an MFit without the Graphical User Interface. A full manual is available (v2, Feb. 2001).

MFit/Mview Load routines (load)
enable importation of any data through "looktxt" program (down there), but also supply specific load routines (ILL, SPEC, TASCOM...). If this doesn't satisfy you, writing a new load routine is quite easy. A Mex version of looktxt is available (called "texmex")

MFit Fit functions (funcs)
provide all basic functions. Mutlifunction is also possible, combining some functions into an arbitrary expression, for instance convolution with "convlv" (coming from SpectraTools)... Writing a specific fit function is also very easy.

MFit Fit routines (nllsq)
non linear least square minimisation routines, with Gradient and Simplex methods.

Mfit was initially developped by M. Zinkin (version 0.3, 1997), and then updated by E. Farhi and D. McMorrow.(version 4.2, 1999).
The MRescal extension for triple axis spectrometers was written by A. Tennant and D. McMorrow (version 5, 1998), inspired from parts of ResTrax by J. Kulda and J. Saroun.
The SSym program was written by E. Farhi.
Mview was written by D. McMorrow. and A.R. Wildes
Spec1d was written by D. McMorrow and H. Ronnow.

iFit and ResLibCal where written by E. Farhi.

Downloading (Matlab stuff)

To get the more recent iFit and ResLibCal, refer to their corresponding links.

All programs are available under the GNU General Public Licence terms.
The installation procedure is explained in the "Install.txt" file (containing descriptions, installation procedures and Whatsnew).

Complete archives. The whole source package is about 4 Mo.

Matlab Source Code
requires Matlab >= 5.4
Windows Executable
(free, Matlab 7 built)
Linux Executable x86/AMD
(free, Matlab 7 built)
(free, Matlab 7 built)

MCRInstaller.exe [ 149.2 Mo ]
extract into the standalone directory

PPC (before 2005): get  MCRInstaller.zip [ 156.6 Mo ] extract into the standalone directory

get standalone [ 3.0 Mo ] (20071009) extract, launch 'install.csh' and then 'go'

ZIP [ 3.9 Mo ] standalone [ 3.0 Mo ] (20070925)
extract and launch startill.exe
standalone [ 108 Mo ] (20071205)
extract, launch 'install.sh' and then 'go'
Intel: get standalone [213 Mo] (20081126) extract and install the MCRInstaller. Then open a Terminal and type the './run_startill.sh /Applications/MATLAB/MATLAB_Compiler_Runtime/v79/' command.

Installation summary for Source Code: (see Install.txt for details and changes)

  1. get the archive
  2. extract the archive into a directory that Matlab/Octave can access (e.g./usr/local/matlab/toolbox/local)
  3. Inside Matlab/Octave, launch the 'install' script (no guaranty). Under Unix systems, it is better to be 'root' so that mex generation can create MeX files.
    1. or

  4. verify the startup.m file, in order to install the pathes to these libraries (e.g. just modify the libroot variable to /usr/local/matlab/toolbox/local)
  5. create the MeX files for your plateform (see Install.txt or Mfit:download page)
  6. launch "matlab" and type "mfit" for instance

Installation summary for Standalone: (free, does not require Matlab) including MView, MFit and Matlab/Rescal.

  1. extract the standalone archive
  2. extract MCRInstaller archive inside the standalone directory (should create a v72 directory there)
  3. under linux/macosx, launch 'install.csh'. [You need csh or tcsh, OR adapt the install.csh and go scripts for bash.]
  4. launch 'startill.exe' (windows) or 'go' (linux)
  5. NOTE: you may have to change the /usr/bin/csh first line in scripts install.csh and go for Linux/MacOSX (firtst lines) into /bin/csh, depending on your system.

Help pages

MFit 4.2 Manual (Data fitting)
This help is directly available in the MFit application
Rescal Manual (4D TAS resolution function)
This help is directly available in the Rescal/Matlab application
Spec1d Manual (data browsing and fitting)
No help exists.
[ HTML, PS and PDF version ] [HTML, PS and PDF version ] [ HTML, PS and PDF version ] Use tooltips

Older MFit help page [ PS file 110 ko] (August 1999, version 4.2). 

In french (15/11/1997).

MFit help page (french doc.)

Other resources

Risoe Physics Department Homepage with Matlab programs (29 Aug 1997 version)

X-Ray Laboratory in Oxford Physics where were created MFit, MView and Rescal

The ResLib 2.1 program for Triple-Axis Resolution Calculation