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

Bases: Material

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

Constructor.

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

  • density (Union[Parameter, float, None]) – Mass density for the material.

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

  • interface – Interface object, defaults to None.

property chemical_structure: str#

Get the chemical structure string.

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

Produces a cleaned dict using a custom as_dict method to skip necessary things. The resulting dict matches the parameters in __init__

Parameters:

skip (list) – List of keys to skip, defaults to None.

Return type:

dict[str, str]