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_div

[ Identification | Description | Input parameters | Links ]

The Source_div Component

Neutron source with Gaussian or uniform divergence


  • Site:
  • Author: KL
  • Origin: Risoe
  • Date: November 20, 1998


The routine is a rectangular neutron source, which has a gaussian or uniform
divergent output in the forward direction.
The neutron energy is 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).
In the case of uniform distribution (gauss=0), angles are uniformly distributed
between -focus_aw and +focus_aw as well as -focus_ah and +focus_ah.
For Gaussian distribution (gauss=1), 'focus_aw' and 'focus_ah' define the
FWHM of a Gaussian distribution. Energy/wavelength distribution is also

Example: Source_div(xwidth=0.1, yheight=0.1, focus_aw=2, focus_ah=2, E0=14, dE=2, gauss=0)

Feb 2005: tested by Kim Lefmann    (o.k.)
Apr 2005: energy distribution used in external tests of Fermi choppers (o.k.)
Jun 2005: wavelength distribution used in external tests of velocity selectors (o.k.)
Validated by: K. Lieutenant

distribution is uniform in (hor. and vert.) angle (relative to moderator normal),
therefore not suited for large angles

Input parameters

Parameters in boldface are required; the others are optional.
xwidthmWidth of source
yheightmHeight of source
focus_awdegFWHM (Gaussian) or maximal (uniform) horz. width divergence
focus_ahdegFWHM (Gaussian) or maximal (uniform) vert. height divergence
E0meVMean energy of neutrons.0.0
dEmeVEnergy half spread of neutrons.0.0
lambda0AngMean wavelength of neutrons (only relevant for E0=0)0.0
dlambdaAngWavelength half spread of neutrons.0.0
gauss0|1Criterion: 0: uniform, 1: Gaussian distributions0
flux1/(s cm 2 st energy_unit)flux per energy unit, Angs or meV1


[ Identification | Description | Input parameters | Links ]

Generated on 2023-09-19 20:01:36

Last Modified: Wednesday, 03-Jan-2024 19:59:10 CET
Search website mailinglist archive GitHub repos