Close This Window

Please download official ILL logos here


For using on the web or on a screenFor printing in high resolutionWhite version, for dark backgrounds

Download PNG

Download AI

Download white PNG

Download JPG


Download white AI

Rescal for Matlab

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

Rescal home page

These help pages were designed at the

Clarendon Laboratory, Department of Physics, Oxford University, U.K.

by A. Tennant and D. McMorrow.

Rescal for Matlab: a computational package for calculating neutron TAS resolution functions.

D.A. Tennant, Oxford Physics, Clarendon Laboratory, Parks Road, Oxford OX1 3PU UK

D. F. McMorrow, Dept. of Physics, Risoe National Laboratory, Roskilde DK-4000, Denmark


RESCAL for MATLAB is a comprehensive and integrated set of MATLAB programs which (1) calculate the resolution function of a neutron triple-axis spectrometer, (2) simulate scans using a 4D Monte Carlo convolution for a user-defined dispersion and line-shape, and (3) fit data within the MFIT environment for Matlab. Because Matlab is optimised for linear algebraic operations, it has been possible to write the code for RESCAL for MATLAB more concisely and transparently than would be possible with a conventional language like Fortran. The code is machine independent in that it will work equally well on any platform running Matlab and also has the advantage of not requiring compilation. RESCAL for MATLAB makes use of Matlab's powerful graphics and has been designed to be entirely windows and menu driven. The spectrometer parameters can be entered either from a file or interactively in the control windows. This makes learning how to use RESCAL easy. The main features of RESCAL for MATLAB are listed below: 

Choice of resolution methods 

  • Cooper-Nathans method : calculate resolution function from angular elements of spectrometer such as collimators but neglect spatial effects such as size of sample. 
  • Popovici method: calculates resolution function including spatial effects. 

Interactive windows and menus 

  • Save/read parameters to/from a file. 
  • Enter parameters interactively in windows. 
  • Choose operations such as open file, print, and resolution method from pull-down menus. 

Display calculated resolution parameters and ellipsoid projections 

  • Calculates resolution parameters such as Bragg widths, vanadium widths and phonon widths. 
  • Resolution widths and relevant parameters are written to a rescal figure which can be printed out. 
  • Plot of resolution ellipsoid projections is included in the figure.

Simulation of scans 

  • 4D Monte Carlo convolution of resolution ellipsoid with dispersion. 
  • User-defined dispersion and line-shape. 
  • Scan, dispersion and line width entered in parameter windows. 

Fitting scans 

For a guide to installing and starting up rescal use the hyperlink Installing and Starting RESCAL for MATLAB. If you have any queries or comments please mail us at the address below. 

(c) A. Tennant D. McMorrow November 29 1995