VITESS Modules Writeout

The module writeout can be inserted between two other VITESS modules or put to the end of the instrument. It records the output of the preceding module by writing data sets of trajectories (or 'neutrons' or 'events') into an ASCII or binary file. The data can be written in 5 different formats: VITESS, McStas, MCPL, MCNP and MCNPX. For ASCII output, the separator (space or tab) and the data format (float or exponential) has to be specified. It is possible to write all data sets, but there are also different options to select the trajectories that are written to this file (see table Parameters for Module 'writeout'). In any case, all trajectories are written unchanged to the pipe for the following module, so the simulation is not disturbed by using this module.
There is the possibility to disable the module, i.e. suppress writing the output. For VITESS, there is also the option to select the written parameters (see table Parameters for Module 'writeout').
Note that the output file needs something like 0.1 kByte per trajectory and may therefore become very large.

The module read_in can read the data of the output file or data sets written by writeout or a corresponding module in another simulation program. see the read_in documentation for more information on how to use the read_in module.

To read and write data in MCPL format, the utiliy mcpl by Thomas Kittelmann is used (see MCPL-Homepage) which stores the trajectories in binary format. The interface does not allow options like using several input files, ASCII format, etc.

The following information is written for each trajectory (or neutron) in VITESS format:
column
   1    ID of the trajectory.                         (e.g. AA000123456)
   2    tracing information                           (T: tracing, N: no tracing)
   3    'color' of the trajectory                     (reserved for the user's demands)
   4    time of flight                        [ms]
   5    neutron wavelength                     [Å]
   6    intensity (or weight)                 [n/s]   (represented by the trajectory)
 7 - 9  x-,y-,z-coordinate of the position    [cm]    (with respect to the coordinate system provided by the module preceding writeout)
10 -12  x-,y-,z-coordinate of the flight dir.         (direction cosinus)
13 -15  x-,y-,z-coordinate of the spin

The following information is written for each trajectory (or neutron) in McStas format:
column
   1    intensity (or weight)                 [n/s]   (represented by the trajectory)
 2 - 4  x-,y-,z-coordinate of the position     [m]    (with respect to the coordinate system provided by the module preceding writeout)
 5 - 7  x-,y-,z-coordinate of the speed       [m/s]
   8    time of flight                         [s]
 9 -11  x-,y-,z-coordinate of the polarization

The ollowing information is written for each trajectory (or neutron) in MCNP format:
column
 1 - 3  x-,y-,z-coordinate of the position    [cm]    (with respect to the coordinate system provided by the module preceding writeout)
 4 - 6  x-,y-,z-coordinate of the flight dir.         (direction cosinus)
   7    neutron energy                        [MeV]
   8    weight                                [n/s]   (represented by the trajectory)
   9    time of flight                    [shakes=1e-8s]

The following information is written for each trajectory (or neutron) in MCNPX format:
column
   1    history                                [-]    not used, 0 written
   2    ID                                     [-]    not used, 0 written
   3    weight                                [n/s]   (represented by the trajectory)
   4    neutron energy                        [MeV]
   5    time of flight                    [shakes=1e-8s]
 6 - 8  x-,y-,z-coordinate of the position    [cm]    (with respect to the coordinate system provided by the module preceding writeout)
 9 -11  x-,y-,z-coordinate of the flight dir.         (direction cosinus)
  12    unused                                 [-]    not used, 0 written

Parameters for Module 'writeout'


Parameter
Unit
Description
Range or Values
Command Option
ASCII output file Name of the output file containing the neutron trajectories - -A
Active? "no": no output is written
"yes": output file is written
"no"
"yes"
-a
Header "no": no header is written
"yes": first 2 or 3 lines contain information, mainly about the content of the columns
"no"
"yes"
-a
data format The format in which the output file will be written "VITESS"
"McStas"
"MCPL"
"MCNP"
"MCNPX"
-f
storage format Data format in which float numbers are written to the output file
"exp": exponential (scientific) representation, "float": floating point representation, "binary": binary format
"exp"
"float"
"binary"
-F
separator Character used to separate the numbers in a VITESS output file
MCNPX and McStas data are separated by 'space'
"Space"
"Tabulator"
-S
Intensity factor for MCNPX
[n/s]
The weight of each neutron trajectory is divided by this factor to yield the counts in the MCNPX simulation.
The factor is: F = Isrc/ NMCNPX-Events
>0
typical 1.0e8
default: 1.0
-I
Columns Choice of output parameters for VITESS format - -c
writeout color (optional) Only trajectories of the given color are written to the output file.
Color -1 means: all trajectories are written
>= -1 (int)
default: -1
-C
filter lambda min/max
[Å]
(optional) Only neutrons within the given wavelength range are read >0 -l
-L
filter Y pos. min/max
[cm]
(optional) Only neutrons within the given horizontal space range are read any -y
-Y
filter Z pos. min/max
[cm]
(optional) Only neutrons within the given vertical space range are read any -z
-Z
filter hor. div. min/max
[]
(optional) Only neutrons within the given horizontal divergence range are read any -e
-d
filter vert. div. min/max
[]
(optional) Only neutrons within the given vertical divergence range are read any -E
-D
filter div. min/max
[]
(optional) Only neutrons within the given total divergence range are read >=0 -g
-G


Back to VITESS overview
vitess@fz-juelich.de