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


About McStas
 Conditions of use
 Project funding

 Other Downloads (share)

Mailing list

Search web/mailinglist

 Wiki (GitHub)
 McStas manual


Report bugs (GitHub)

Code-repository (GitHub)

McStas: Source_simple

[ Identification | Description | Input parameters | Links ]

The Source_simple Component

A circular neutron source with flat energy spectrum and arbitrary flux


  • Site:
  • Author: Kim Lefmann
  • Origin: Risoe
  • Date: October 30, 1997


The routine is a circular 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 neutron energy is uniformly distributed between lambda0-dlambda and
lambda0+dlambda or between E0-dE and E0+dE.
The flux unit is specified in n/cm2/s/st/energy unit (meV or Angs).

This component replaces Source_flat, Source_flat_lambda,
Source_flux and Source_flux_lambda.

Example: Source_simple(radius=0.1, dist=2, focus_xw=.1, focus_yh=.1, E0=14, dE=2)

Input parameters

Parameters in boldface are required; the others are optional.
radiusmRadius of circle in (x,y,0) plane where neutrons are generated.0.1
yheightmHeight of rectangle in (x,y,0) plane where neutrons are generated.0
xwidthmWidth of rectangle in (x,y,0) plane where neutrons are generated.0
distmDistance to target along z axis.0
focus_xwmWidth of target.045
focus_yhmHeight of target.12
E0meVMean energy of neutrons.0
dEmeVEnergy half spread of neutrons (flat or gaussian sigma).0
lambda0AAMean wavelength of neutrons.0
dlambdaAAWavelength half spread of neutrons.0
flux1/(s*cm**2*st*energy unit)flux per energy unit, Angs or meV if flux=0, the source emits 1 in 4*PI whole space.1
gauss1Gaussian (1) or Flat (0) energy/wavelength distribution0
target_index1relative index of component to focus at, e.g. next is +1 this is used to compute 'dist' automatically.+1


[ Identification | Description | Input parameters | Links ]

Generated on 2024-01-03 11:47:43

Last Modified: Tuesday, 16-Apr-2024 20:05:22 CEST
Search website mailinglist archive GitHub repos