McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics NEXMAP

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding
 Screenshots

Download
 Components
 Linux Install (deb/rpm)
 Mac OS X Install
 Unix Install (src code)
 Windows Install
 Other Downloads (share)

Mailing list

Search web/mailinglist

Documentation
 McStas manual
 FAQ
 Known problems
 Publications
 C Compilers
 Other
 Tools
 Tutorial

Workshops/conferences

Developments

Links

Report bugs

Git

McStas Ubuntu live-dvd


McStas: Virtual_input Component

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

The Virtual_input Component

Source-like component that generates neutron events from an ascii 'virtual source' filename.

Identification

  • Author: E. Farhi
  • Origin: ILL
  • Date: Sep 28th, 2001
  • Version:(Unknown)
  • Modification history:
    • EF, Oct 2002. make use of shared read-table library.

Description

  This component reads neutron events stored from a file, and sends them into
the instrument. It thus replaces a Source component, using a previously
computed neutron set. The 'source' file type is an ascii text file with the
format listed below. 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' filename. Further simulations are much faster if they start from
this low flux position with the 'source' filename.

The output file format is:
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.

%BUGS
We recommend NOT to use parallel execution (MPI) with this component. If you
need to, set parameter 'smooth=1'.

EXAMPLE:
To create a 'source' file collecting all neutron states, use:
  COMPONENT MySourceCreator = Virtual_output(filename = "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(filename="MySource.list")
at the same position as 'MySourceCreator'.
A Vitess filename 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
filename str Name of the neutron input file. Empty string "" unactivates component 0
verbose 0/1 Display additional information about source, recommended 0
repeat_count 1 Number of times the source must be generated/repeated 1
smooth 0/1 Smooth sparsed event files for filename repetitions. Use this option with MPI. This will apply gaussian distributions around initial events from the file 1
display 0

Output parameters

Name Unit Description Default
read_block  
pos  
nrows  
Offset  
rTable  
repeat_number  
filename_ncount  
mean_vx  
mean_vy  
mean_vz  
mean_dx  
mean_dy  
mean_dz  
n_neutrons  
min_x  
min_y  
min_z  
max_x  
max_y  
max_z  
min_vx  
min_vy  
min_vz  
max_vx  
max_vy  
max_vz  
first_block  
mean_x  
mean_y  
mean_z  
end_reading  
n_count_extrapolated  
repeat_cnt  

Links


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

Generated automatically by McDoc, Peter Willendrup <peter.willendrup@risoe.dk> / Mon May 29 08:29:49 2017


Last Modified: Monday, 29-May-2017 10:29:49 CEST
Search website mailinglist archive GitHub repos