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: SNS_source

[ Identification | Description | Input parameters | Links ]

The SNS_source Component

A source that produces a time and energy distribution from the SNS moderator files


  • Site:
  • Author: G. Granroth
  • Origin: SNS Project Oak Ridge National Laboratory
  • Date: July 2004


Produces a time-of-flight spectrum from SNS moderator files
moderator files can be obtained from the SNS website .
IMPORTANT: The output units of this component are N/pulse
IMPORTANT: The component needs a FULL PATH to the source input file
(1) the raw moderator files are per Sr.  The focusing parameters provide the solid
angle accepted by the guide to remove the Sr dependence from the output. Therefore
the best practice is to set focus_xw and focus_yh to the width and height of the next beam
component, respectively. The dist parameter should then be set as the distance
from the moderator to the first component.
(2) This component works purely by interpolation. Therefore be sure that Emin and
Emax are within the limits of the moderator file

Input parameters

Parameters in boldface are required; the others are optional.
filenameFilename of source data
xwidthmwidth of moderator0.1
yheightmheight of moderator0.12
distmDistance from source to the focusing rectangle
focus_xwmWidth of focusing rectangle
focus_yhmHeight of focusing rectangle
EminmeVminimum energy of neutron to generate
EmaxmeVmaximum energy of neutron to generate


[ Identification | Description | Input parameters | Links ]

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

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