structure_factor#

property ReciprocalLatticeVector.structure_factor#

Kinematical structure factors \(F\).

Returns:

structure_factor – Complex array. Filled with None if calculate_structure_factor() hasn’t been called yet.

Return type:

numpy.ndarray

Examples

See ReciprocalLatticeVector for the creation of rlv

>>> rlv
ReciprocalLatticeVector (2,), al (m-3m)
[[1. 1. 1.]
 [2. 0. 0.]]

Kinematical structure factors are by default not calculated

>>> rlv.structure_factor
array([nan+0.j, nan+0.j])

A unit cell with all asymmetric atom positions is required to calculate structure factors

>>> rlv.phase.structure
[Al   0.000000 0.000000 1.000000 1.0000]
>>> rlv.sanitise_phase()
>>> rlv.phase.structure
[Al   0.000000 0.000000 0.000000 1.0000,
 Al   0.000000 0.500000 0.500000 1.0000,
 Al   0.500000 0.000000 0.500000 1.0000,
 Al   0.500000 0.500000 0.000000 1.0000]
>>> rlv.calculate_structure_factor()
>>> rlv.structure_factor  
array([8.46881663-1.55569638e-15j, 7.04777513-8.63103525e-16j])