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

These help pages were designed at theClarendon Laboratory, Department of Physics, Oxford University, U.K.by A. Tennant and D. McMorrow. Fitting with MFIT and RESCAL for MATLAB.RESCAL for MATLAB has been linked in with the MFIT environment for MATLAB. This is an extension of the Monte Carlo simulation method in RESCAL for MATLAB. When the trix2.m file is loaded into MFIT and chosen as the fitting function, the RESCAL for MATLAB parameter windows appear. Spectrometer parameters can be chosen from files or entered interactively. A window is generated for the fitting and dispersion parameters. The file trixsqw.m, which must be in the MFIT and RESCAL path, defines the line-shape in the same way as mc_sqw.m for the simulation. At the moment this is defined as a Lorentzian line shape - see simulation for the meaning of parameters. Fitting on some machines can be significantly speeded up by compiling a C routine for the Monte Carlo convolution with the dispersion into Matlab. This requires building a MEX-file which consists of a dispersion and cross-section, portable random number generator, and gateway routine. Fitting takes a couple of minutes on a DEC 3000 Alpha. As well as triple-axis fitting, MFIT also provides a number of other fitting functions such as Gaussians. Used in this way MFIT and RESCAL for MATLAB provide a comprehensive platform for analysing neutron triple-axis data. (c) A. Tennant D. McMorrow November 29 1995 |