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

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

The Single_crystal_inelastic Component

An extension of Single crystal with material dispersion


  • Author: Some Guy
  • Origin: DTU Physics
  • Date: August 2020
  • Version:(Unknown)


The component handles a 4D S(q,w) material dispersion, and scatters neutrons 
out of it. It is based on the Isotropic_Sqw methodology, extended to 4D. 

A number of approximations are applied:

 - geometry is restricted to box, cylinder and sphere
 - ignore absorption, multiple scattering and incoherent scattering
 - no temperature handling. The temperature must be taken into account when 
     generating the S(q,w) data sets, which should contain Bose/detailed balance.
 - intensity is used as provided by the S(q,w) data set
We recommend that you first try the Test_Single_crystal_inelastic example to 
learn how to use this complex component.

4D S(q,w) data files

The input data file derives from other McStas formats. It may contain structural
information as in Lau/Laz files, and a list of S(q,w) [one per row] with 5 columns
*   [ H K L E S(q,w) ]
An example file example.sqw4 is provided in the McStas/Data directory.

You may generate such files using iFit  such as:

  s = sqw_vaks('defaults');             % a 4D model
  d = iData(s);                         % use default coarse grid for axes [-0.5:0.5]
  saveas(d, 'sx_coh.sqw4', 'mcstas');   % export to 4D Sqw file

This component is undergoing validation.

WARNING: This is a contributed Component.

Input parameters

Parameters in boldface are required; the others are optional.
Name Unit Description Default
mosaic_AB arcmin,arcmin,1,1,1,1,1,1 In Plane mosaic rotation and plane vectors (anisotropic), mosaic_A, mosaic_B, A_h,A_k,A_l, B_h,B_k,B_l. Puts the crystal in the in-plane mosaic state. Vectors A and B define plane in which the crystal roation is defined, and mosaic_A, mosaic_B, denotes the resp. mosaicities (gaussian RMS) with respect to the the two reflections chosen by A and B (Miller indices). Mosaic_AB_Undefined
sqw 0
geometry string Name of an Object File Format (OFF) or PLY file for complex geometry. The OFF/PLY file may be generated from XYZ coordinates using qhull/powercrust. 0
qwidth 0.05
xwidth m Width of crystal. 0
yheight m Height of crystal. 0
zdepth no extinction simulated [m] Depth of crystal 0
radius m Outer radius of sample in (x,z) plane. 0
delta_d_d 1 Lattice spacing variance, gaussian RMS. 1e-4
mosaic arcmin Isotropic crystal mosaic, gaussian RMS. Puts the crystal in the isotropic mosaic model state, thus disregarding other mosaicity parameters. -1
mosaic_a arcmin Horizontal (rotation around lattice vector a) mosaic (anisotropic), gaussian RMS. Put the crystal in the anisotropic crystal vector state. I.e. model mosaicity through rotation around the crystal lattice vectors. Has precedence over in-plane mosaic model. -1
mosaic_b arcmin Vertical (rotation around lattice vector b) mosaic (anisotropic), gaussian RMS. -1
mosaic_c arcmin Out-of-plane (Rotation around lattice vector c) mosaic (anisotropic), gaussian RMS. -1
recip_cell 1 Choice of direct/reciprocal (0/1) unit cell definition. 0
barns 1 Flag to indicate if |F|^2 from 'reflections' is in barns or fm^2. barns=1 for laz and isotropic constant elastic scattering (reflections=NULL), barns=0 for lau type files. 0
ax AA / AA^-1 Coordinates of first (direct/recip) unit cell vector. 0
ay AA / AA^-1 a on y axis 0
az AA / AA^-1 a on z axis 0
bx AA / AA^-1 Coordinates of second (direct/recip) unit cell vector. 0
by AA / AA^-1 b on y axis 0
bz AA / AA^-1 b on z axis 0
cx AA / AA^-1 Coordinates of third (direct/recip) unit cell vector. 0
cy AA / AA^-1 c on y axis 0
cz AA / AA^-1 c on z axis 0
p_transmit 1 Monte Carlo probability for neutrons to be transmitted without any scattering. Used to improve statistics from weak reflections. -1
sigma_abs barns Absorption cross-section per unit cell at 2200 m/s. 0
sigma_inc barns Incoherent scattering cross-section per unit cell. 0
aa deg Unit cell angles alpha, beta and gamma. Then uses norms of vectors a,b and c as lattice parameters. 0
bb deg Beta angle. 0
cc deg Gamma angle. 0
order 1 Limit multiple scattering up to given order (0: all, 1: first, 2: second, ...). 0
RX m Radius of horizontal along X lattice curvature. flat for 0. 0
RY m Radius of vertical lattice curvature. flat for 0. 0
RZ m Radius of horizontal along Z lattice curvature. flat for 0. 0
max_stored_ki 1000
max_bad 10000

Output parameters

Name Unit Description Default


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

Generated automatically by McDoc, Peter Willendrup <> / Wed Jan 12 15:13:31 2022

Last Modified: Wednesday, 12-Jan-2022 16:13:31 CET
Search website mailinglist archive GitHub repos