[ Identification | Description | Input parameters | Output parameters | Links ]

The Virtual_input Component

Source-like component that generates neutron events from an ascii/binary 'virtual source' file.

Identification

Description

  This component reads neutron events stored into a file, and sends them into
the instrument. It thus replaces a Source component, using a previously
computed neutron set. The 'source' file type may be either of text or binary
format. The component may recognize its format automatically, but you may 
force the file type ('type' parameter). The number of neutron events for the
simulation is set to the length of the 'source' file times the
repetition parameter 'repeat_count' (1 by default).
  It is particularly useful to generate a virtual source at a point that few
neutron reach. A long simulation will then only be performed once, to create
the 'source' file. Further simulations are much faster if they start from
this low flux position with the 'source' file.

Possible file formats are:
1-text column formatted with lines containing 11 values in the order:
      p x y z vx vy vz t sx sy sz stored into about 83 bytes/n.
2-float or double binary files (with the 11 values 'p x y z vx vy vz t sx sy sz')
      stored into 44 and 88 bytes/n respectively for float/double.

EXAMPLE:
To create a 'source' file collecting all neutron states, use:
  COMPONENT MySourceCreator = Virtual_output(file = "MySource.list")
at the position where will be the Virtual_input.
Then unactivate the part of the simulation description before (and including)
the component MySourceCreator. Put the new instrument source:
  COMPONENT Source = Virtual_input(file="MySource.list")
at the same position as 'MySourceCreator'. 
A Vitess file may be obtained from the 'Vitess_output' component or from a
Vitess simulation (104 bytes per neutron) and read with Vitess_input.

Input parameters

Parameters in boldface are required; the others are optional.
Name Unit Description Default
file str name of the neutron input file, or stdin if left to 0. 0
type str may be "text", "float" or "double" to force file type. default is text file. 0
repeat_count 1
bufsize records Size of neutron input buffer. 0 for 'use all'. 0

Output parameters

Name Unit Description Default
rep  
pos  
nrows  
nread  
Offset  
rTable  
Virtual_input_Read_Input  

Links


[ Identification | Description | Input parameters | Output parameters | Links ]

Generated automatically by McDoc, Peter Willendrup <peter.willendrup@risoe.dk> / Feb 28 2006