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: Source_multi_surfaces Component

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

The Source_multi_surfaces Component

Rectangular neutron source with subareas - using wavelength spectra reading from files

Identification

  • Author: Ludovic Giller, Uwe Filges
  • Origin: PSI/Villigen
  • Date: 31.10.06
  • Version:(Unknown)
  • Modification history:

Description

This routine is a rectangular neutron source, which aims at a square target
centered at the beam (in order to improve MC-acceptance rate).
The angular divergence is then given by the dimensions of the target.
The source surface can be divided in subareas (maximum 7 in one dimension). 
For each subarea a discret spectrum must be loaded given by its corresponding
file. The name of the files are saved in one file and will be called with the
parameter "filename".
In fact the routine first reads the spectrum from files (up to 49) and it 
selects randomly a subarea. Secondly it generates a neutron with an random
energy, selected from the spectrum corresponding to the subsurface chosen, and
with a random direction of propagation within the target.
ATTENTION 1:  the files must be located in the working directory where also
		the instrument file is located
ATTENTION 2:  the wavelenght distribution (or binning) must be uniform 

The file giving the name of sub-sources is matrix like, 
   eg. for a 3x2 (x,y) division :
                   spec1_1.dat spec1_2.dat spec1_3.dat
                   spec2_1.dat spec2_2.dat spec2_3.dat(RETURN-key)

               ATTENTION : The line break after the last line is important.
			     Otherwise the files can not be read in !!!

               and for example spec1_2.dat must be like, always from big to
               small lambda :
			#surface 1_2
			#comments must be preceded by "#"
			#lambda [AA] 	intensity [a.u.]
			9.0		1.39E+08
			8.75		9.67E+08
			8.5		1.17E+09
			8.25		1.50E+09
			8.0		1.60E+09
			7.75		1.43E+09
			7.5		1.40E+09
			7.25		1.36E+09
			7.0		1.35E+09
			6.75		1.33E+09
			6.5		1.32E+09
			6.25		1.31E+09


		[a.u.] 	means that your chosen unit for the intensity influences
			the outcoming unit. What you put in you will get out !
			i.e. whatever is the unit for the input intensity you
			will have the same unit for the the output.
			Generally McStas works in neutrons per second [n/s].

Usage example:
  Source_multi_surfaces(yheight=0.16,xwidth=0.09,dist=1.18,xw=0.08,yh=0.15,xdim=4,ydim=4,
                        Lmin=0.01,Lmax=10.0,filename="files_name.dat")

WARNING: This is a contributed Component.

Input parameters

Parameters in boldface are required; the others are optional.
Name Unit Description Default
filename str Name of the file containing a list of the spectra file names 0
yheight m Source y-height 0.16
xwidth m Source x-width 0.09
dist m Distance to target along z axis 1.18
xw m Width(x) of target 0.08
yh m Height(y) of target 0.15
xdim int Number of subareas in the x direction 4
ydim int Number of subareas in the y direction 4
Emin eV Minimum energy of neutrons 0.0
Emax eV Maximum energy of neutrons 0.0
Lmin AA Minimum wavelength of neutrons 0.0
Lmax AA Maximum wavelength of neutrons 0.0

Output parameters

Name Unit Description Default
p_in  

Links


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

Generated automatically by McDoc, Peter Willendrup <peter.willendrup@risoe.dk> / Mon Jun 26 12:27:17 2017


Last Modified: Monday, 26-Jun-2017 14:27:17 CEST
Search website mailinglist archive GitHub repos