class EasyReflectometry.sample.elements.materials.material_mixture.MaterialMixture[source]#

Bases: BaseElement

__init__(material_a, material_b, fraction, name=None, interface=None)[source]#

Constructor.

Parameters:
  • material_a (Material) – The first material.

  • material_b (Material) – The second material.

  • fraction (Parameter) – The fraction of material_b in material_a.

  • name (Optional[str]) – Name of the material, defaults to None that causes the name to be constructed.

  • interface – Calculator interface, defaults to None.

classmethod default(interface=None)[source]#

Default instance for a mixture of two materials.

Return type:

MaterialMixture

classmethod from_pars(material_a, material_b, fraction, name=None, interface=None)[source]#

Instance of mixture of two materials where the parameters are known.

Parameters:
  • material_a (Material) – The first material.

  • material_b (Material) – The second material.

  • fraction (float) – The fraction of material_b in material_a.

  • name (Optional[str]) – Name of the material, defaults to ‘EasyMaterialMixture’.

  • interface – Calculator interface, defaults to None.

Return type:

MaterialMixture

property sld#
property isld#
property fraction: Parameter#

the fraction of material a.

Type:

return

property material_a: Material#

Getter for material_a.

user_data: dict#
property material_b: Material#

Getter for material_b.

as_dict(skip=None)[source]#

Custom as_dict method to skip necessary things.

Return type:

dict[str, str]