A circular neutron source with flat energy spectrum and arbitrary flux
Author: Kim Lefmann
Date: October 30, 1997
KL, October 4, 2001
Emmanuel Farhi, October 30, 2001. Serious bug corrected.
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)
Parameters in boldface are required;
the others are optional.
Radius of circle in (x,y,0) plane where neutrons are generated.
Height of rectangle in (x,y,0) plane where neutrons are generated.
Width of rectangle in (x,y,0) plane where neutrons are generated.
Distance to target along z axis.
Width of target
Height of target
Mean energy of neutrons.
Energy half spread of neutrons (flat or gaussian sigma).
Mean wavelength of neutrons.
Wavelength half spread of neutrons.
flux per energy unit, Angs or meV if flux=0, the source emits 1 in 4*PI whole space.
Gaussian (1) or Flat (0) energy/wavelength distribution
relative index of component to focus at, e.g. next is +1 this is used to compute 'dist' automatically.