material: Material definitions#

Material class and related functions.

class daxs.utils.material.Material(a: float, b: float, c: float, alpha: float, beta: float, gamma: float, name: str | None = None)[source]#

Bases: object

__init__(a: float, b: float, c: float, alpha: float, beta: float, gamma: float, name: str | None = None) None[source]#

Initialize a material with its unit cell parameters.

property volume: float#
property s11: float#
property s22: float#
property s33: float#
property s12: float#
property s23: float#
property s31: float#
calculate_d_spacing(reflection: Iterable[int] = (1, 1, 1))[source]#

Calculate the d spacing for a given reflection.

classmethod from_name(name: str) Material[source]#

Initialize a material from its name.

classmethod from_cif(filename: str) Material[source]#

Initialize a material from a CIF file.