BornAgain takes neutron polarization into account if there is magnetism in the sample model or if a polarizer is set in the instrument model. For x-rays, see x-ray polarization.
Sample magnetization is explained in Sample model > Materials > Magnetization.
Beam polarization is set through
polarizer_vec = R3(x, y, z)
beam.setPolarization(polarizer_vec) # for scattering
scan.setPolarization(polarizer_vec) # for specular and offspec
The polarizer_vec is an R3 vector representing the
Bloch vector.
If it is a unit vector, then the beam polarization is perfect.
A shorter vector indicates imperfect polarization.
The analyzer properties are through
analyzer_vec = R3(x, y, z)
detector.setAnalyzer(analyzer_vec, t_parallel, t_antiparallel) # for scattering and offspec
scan.setAnalyzer(analyzer_vec, t_parallel, t_antiparallel) # for specular
Only the direction of the nonzero analyzer_vec matters. Analyzer
efficiency is set by t_parallel and t_antiparallel, which are optional and
default to 1 and 0, for a perfect analyzer.
t_parallel is the probability of passing the particle with the “desired”
(or selected) spin component (along the analyzer orientation).
t_antiparallel is the probability of passing the particle with the “undesired”
(or suppressed) spin component (against the analyzer orientation).
In an applied magnetic field, polarizer and analyzer must be parallel or antiparallel to the field.