grogupy._core.process_ref_directions

grogupy._core.process_ref_directions(ref_xcf_orientations: list[list[float]] | ndarray[Any, dtype[_ScalarType_co]] | list[dict], spin_model: str = 'generalised-fit') list[dict[str, ndarray[Any, dtype[_ScalarType_co]]]][source]

Preprocess the reference directions input for the Builder object.

If the reference directions are already in the expected format, which is list of dictionaries, with keys ‘o’, ‘vw’, where ‘o’ is the reference direction and ‘vw’ is any number of perpendicular directions, then it just return that with normalization. Otherwise either creates (x,y,z) directions for “generalised-grogu” or generates the perpendicular directions for the given reference directions for the “generalised-fit” model. In case of “isotropic-only” or “isotropic-biquadratic-only” only the first reference direction and the first perpendicular direction is used.

Parameters

ref_xcf_orientationsUnion[list[list[float]], NDArray, list[dict]]

The reference directions input for the Builder object

spin_model: str, optional

Defines the spin model used for the exchange and anisotropy, by default “generalised-fit”

Returns

list[dict]

The expected format for reference directions, see above.