Close This Window

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


Pour utiliser sur le web

Pour imprimer en haute résolution


Télécharger PNG

Télécharger TIF


Télécharger JPG

Télécharger EPS



Computing for Science

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

Version 4.2. (1999)

Loading data files

Choose a load function

Mfit uses load functions to get data from your data files into a form it can recognize. The first step in loading data is to choose the appropriate load function from the 'MFit:Control:Load Routine' menu in the control window:

Fig 1 : Mfit : control window

The functions that appear on the menu are those that Mfit read from the mfit.ini file when it started. Choose a load function from the menu by clicking on it. If you choose 'Other...' you can choose a load function that is not one of those listed in the .ini file. Mfit shows the currently selected load function in the control window.

Some load routines :

  • The General Load routine enables to load any data stored into a text (ascii) file. It does analyze the file contents (with looktxt ), separate and sort numerical parts (single numbers, vectors and matrices).
  • The MFIT parameter file enables to get the parameter values saved in an Mfit output file (see Saving results), for instance plot an amplitude vs. a temperature.
  • The Direct User data entry enables, when pressing 'New...' button or selecting 'Load New Data file...' in the control window, to enter directly an expression for x, y and the error. One can use here the user variables from the matlab session. A blank field will re-use the active data.
  • It is also possible to transfert directly (by typing matlab commands) data between Mfit and the matlab workspace. See Exchanging data between Mfit and the matlab workspace.


Usually, load routines are available as Graphic User Interface (GUI, asks user preferences) and Automatic (tries to guess, usefull for batch runs) modes
You can define your own load routines for special data formats.

Choose a data file

The next step is to choose your data file. There are actually three ways you can do this: the simplest is to press the 'New..' button to the right of the 'Data file' box in the control window (see the above figure 1). Alternatively, you can choose 'Load new data file...' from the control window 'File' menu (or Control-L key). In either you will be presented with a dialog box to allow you to choose a data file:

Fig 2 : Mfit : selecting a file to load.

Choose a file, changing directories if necessary. Mfit will attempt to load the selected file using the current load function. When using a Graphic User Interface (GUI) routine, the load routine might ask for additional informations about how to import the data. Often, the column selector  will appear.

Fig 3 : Mfit : column selector in GUI mode

Click OK button. If successful, a data window, containing a graph of your data will be opened. Get the example ILL data file here. It looks something like this:

Fig 4 : Mfit : the data window (with ILL data GUI load).

If the data file you want to load is in the current data directory (i.e. the same directory as the last data file loaded), you can just edit the name in the data file box in the control window, right next to the 'Data File' indication in the MFit Control window.
You may click on any text to edit it, zoom, select/deselect points with the left button. The middle button in the graph will indicate the point coordinates. You may also manipulate your data ('Change X-axis' and 'Transform' items of the 'MFit : Graph/Axes' menu). If you encounter some problems in viewing your data, you can still close the data window (MFit : Graph : Data menu/Close), and reload it (MFit : Control : File menu). You can also change the color mode with the matlab command '<tt>colordef</tt>'.

Next: Choosing fitting functions.
See also: Options when loading data files, Mfit batch files , The mfit.ini file , Manipulating data , How to write load functions.


(c) Martin Zinkin. June 14 1996. Revised E. Farhi and D. McMorrow. January 3, 2000.