structure_factor_utils.structure_factor.ElasticNeutronFactor

class structure_factor_utils.structure_factor.ElasticNeutronFactor(name, atoms)

Bases: StructureFactor

Implements StructureFactor for elastic neutron scattering

__init__(name, atoms)

Constructor method

Methods

__init__(name, atoms)

Constructor method

from_cif(cif_path)

Instantiates StructureFactor with data from the .cif or .mcif file.

get_form_factor(scattering_vector)

Calculates the neutron magnetic form factor for a given scattering vector

get_sf_norm(scattering_vector)

Calculates norm of structure factor given a scattering vector

get_structure_factor(scattering_vector)

Calculates the elastic neutron scattering structure factor for a given scattering vector

classmethod from_cif(cif_path)

Instantiates StructureFactor with data from the .cif or .mcif file.

A finite state machine is used to read file data.

Parameters:

cif_path (str) – path to the .cif (.mcif) file

Returns:

StructureFactor instance with file data

Return type:

StructureFactor

get_form_factor(scattering_vector)

Calculates the neutron magnetic form factor for a given scattering vector

Parameters:

scattering_vector (tuple[float, float, float]) – reciprocal space scattering vector, in reciprocal lattice basis

Returns:

neutron magnetic form factor

Return type:

float

get_sf_norm(scattering_vector) float

Calculates norm of structure factor given a scattering vector

Note

Implementations of get_structure_factor() that return vectors must use a Cartesian basis for valid get_sf_norm().

Parameters:

scattering_vector (tuple[float, float, float]) – reciprocal space scattering vector, in reciprocal lattice basis

Returns:

norm of the structure factor

Return type:

float

get_structure_factor(scattering_vector) tuple[float, float, float]

Calculates the elastic neutron scattering structure factor for a given scattering vector

Parameters:

scattering_vector (tuple[float, float, float]) – reciprocal space scattering vector, in reciprocal lattice basis

Returns:

complex three-valued elastic neutron scattering structure factor

Return type:

tuple[float, float, float]