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

Bases: BaseCore

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

Constructor.

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

  • material_b (Optional[Material]) – The second material.

  • fraction (Union[Parameter, float, None]) – 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.

property sld: float#
property isld: float#
property fraction: float#

Get the fraction of material_b.

property material_a: Material#

Getter for material_a.

property material_b: Material#

Getter for material_b.

user_data: dict#
as_dict(skip=None)[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 (Optional[list]) – List of keys to skip, defaults to None.

Return type:

dict[str, str]