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

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding

Download
 Components
 Other Downloads (share)

Mailing list

Search web/mailinglist

Documentation
 Wiki (GitHub)
 McStas manual
 Publications

Links

Report bugs (GitHub)

Code-repository (GitHub)


McStas: Set_pol

[ Identification | Description | Input parameters | Links ]

The Set_pol Component

(Unphysical) way of setting the polarization.

Identification

  • Site:
  • Author: Peter Christiansen
  • Origin: Risoe
  • Date: August 2006

Description

This component has no physical size (like Arm - also drawn that
way), but is used to set the polarisation in one of four ways:
1) (randomOn=0, normalize=0) Hardcode the polarisation to the vector (px, py, pz)
2) (randomOn!=0, normalize!=0) Set the polarisation to a random vector on the unit sphere
3) (randomOn!=0, normalize=0) Set the polarisation to a radnom vector within the unit sphere
4) (randomOn=0, normalize!=0) Hardcode the polarisation to point in the direction of (px,py,pz) but with polarization=1.
Example: Set_pol(px=0, py=-1, pz=0)

Input parameters

Parameters in boldface are required; the others are optional.
NameUnitDescriptionDefault
px1X-component of polarisation vector (can be negative)0
py1Y-component of polarisation vector (can be negative)0
pz1Z-component of polarisation vector (can be negative)0
randomOn1Generate random values if randomOn!=0.0
normalize1Normalize the polarization vector. If used with randomOn will generate random vectors with length 1.0
AT ( , , ) RELATIVE
ROTATED ( , , ) RELATIVE

Links


[ Identification | Description | Input parameters | Links ]

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


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