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

# 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.

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

by A. Tennant and D. McMorrow.

# Introduction

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.

• 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