S
I M R E S version 4.9
Program for ray-tracing simulation of neutron scattering instruments
Written by:
Jan Saroun, Nuclear Physics Institute,
Rez near Prague
Jiri Kulda, Institute Laue Langevin,
Grenoble
General information
SIMRES is the Monte Carlo (MC) ray-tracing program developed from the resolution
and data treatment program for three-axis neutron spectrometers - RESTRAX.
The original MC code of RESTRAX has been upgraded to simulate the
spectrometer components more realistically and to allow for higher flexibility
in designing new instruments or their parts (neutron guides, strain mapping
and powder diffractometers, three-axis spectrometers).
Installation
(see INSTALL for details)
The program comes in a single *.tar.gz package with source files
and installation scripts. Unpack the archive,
% gunzip < simres494.tar.gz | tar -xf -
enter the distribution directory,
% cd simres494
and follow instructions in the file
Requirements:
-
UNIX operating system
-
F 77 and F 90 compilers (F77 with extensions is enough for HPUX)
-
PGPLOT graphics
library
Compilation:
The program is developed and tested on following systems and compilers:
-
Linux, Absoft Fortran
-
Digital Unix, DEC Fortran 77/90
-
HP UX, HP Fortran 9000
In these cases, the configuration files are already prepared and tested.
The compiling and installation of the program is then as easy as writing
single command, e.g.
% Build DEC destination_folder
Porting to other UNIX platforms should be relatively simple. It requires
editting corresponding configuration file with library paths and compiler
options (see INSTALL.txt). Porting to other non-UNIX systems (Windows,
Mac) should also be possible, but wasn't yet tested.
How to start
(see help.html for details)
After installation, the simulation can be immediately started from the
./demo
subdirectory with example instrument definition files. You can use these
files as templates to define your own instrument setup.
Environment
-
Environment variables for PGPLOT library
-
PGPLOT_DIR has to point to the folder with PGPLOT library
-
PGPLOT_DEV optional, default device (e.g. /xserv)
-
PGPLOT_ILL_PRINT_CMD optional, print command (e.g. lpr
)
-
Copy following configuration files to the current directory (examples are
in the ./demo folder )
simres00.cfg ... file with parameters defining your
instrument
crystal.lib ... crystal library
file.res ... any file with instrument
settings (RESCAL format, can be modified interactively during the session)
mirrorn.n ... optional, lookup tables for mirror
reflectivity (e.g. mirror2.0 from ./demo folder)
flux.tab ... optional, lookup table with flux
distribution at the source (df/dl)
Start program
From a terminal window, type simres494 -help for the list
of command line options or
% simres494 [options]
batch file :
type the name of your job file name and press <enter> or press just
<enter> to start interactive session.
If the batch file is specified (and found), you are asked for the output
file name and all commands are read from the batch file. Otherwise the
initial dialog continues:
Energy In m[eV] Or T[Hz]? (meV)
Select energy units (meV is default)
Path to the spectra files -
Optionally, give the path, where the data files will be searched for
(to read parameters from ILL TAS data files)
Name of a parameter or data file -
Type the file name with instrument parameters (RESCAL format)
The session then continues interactively from the command line:
ResTrax> _
Type help to see the list of available commands with
short explanation. Consult the manual for details.
[Mail]