class EasyReflectometry.sample.elements.materials.material_density.MaterialDensity[source]#

Bases: Material

scattering_length_real: ClassVar[Parameter]#
scattering_length_imag: ClassVar[Parameter]#
molecular_weight: ClassVar[Parameter]#
density: ClassVar[Parameter]#
__init__(chemical_structure, density, name='EasyMaterialDensity', interface=None)[source]#

Constructor.

Parameters:
  • chemical_structure (str) – Chemical formula for the material.

  • density (Parameter) – Mass density for the material.

  • name (str) – Identifier, defaults to EasyMaterialDensity.

  • interface – Interface object, defaults to None.

classmethod default(interface=None)[source]#

Default instance of material defined by density and chemical structure.

Parameters:

interface – Interface object, defaults to None

Return type:

MaterialDensity

classmethod from_pars(chemical_structure, density, name='EasyMaterialDensity', interface=None)[source]#

Instance of a material from mass density and chemical structure, where these are known. :type chemical_structure: str :param chemical_structure: Chemical formula for the material :type density: float :param density: Mass density for the material :type name: str :param name: Identifier, defaults to EasyMaterialDensity :type interface: :param interface: Interface object, defaults to None :rtype: MaterialDensity :return: Material container

property chemical_structure: str#

Get the chemical structure string.

user_data: dict#
as_dict(skip=[])[source]#

Custom as_dict method to skip necessary things.

Return type:

dict[str, str]