Material#

class EasyReflectometry.sample.material.Material(sld, isld, name='EasyMaterial', interface=None)[source]#

Bases: BaseObj

classmethod default(interface=None)[source]#

Default constructor for the reflectometry material.

Return type

Material

Returns

Default material container

classmethod from_pars(sld, isld, name='EasyMaterial', interface=None)[source]#

Constructor of a reflectometry material where the parameters are known.

Parameters
  • sld (float) – Real scattering length density

  • isld (float) – Imaginary scattering length density

Return type

Material

Returns

Material container

isld: ClassVar[Parameter]#
sld: ClassVar[Parameter]#
property uid: int#

Return a UID from the borg map.

Return type

int

Returns

Unique id

user_data: dict#
class EasyReflectometry.sample.material.MaterialDensity(chemical_structure, density, name='EasyMaterialDensity', interface=None)[source]#

Bases: Material

as_dict(skip=[])[source]#

Custom as_dict method to skip necessary things.

Return type

dict

Returns

Cleaned dictionary.

property chemical_structure: str#

Chemical structure string

Type

returns

Return type

str

classmethod default(interface=None)[source]#

Default constructor for the material defined by density and chemical structure.

Parameters

interface – Interface object, defaults to None

Return type

MaterialDensity

Returns

Material container

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

Constructor for a material based on the 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 :param interface: Interface object, defaults to None :rtype: MaterialDensity :return: Material container

user_data: dict#
class EasyReflectometry.sample.material.MaterialMixture(material_a, material_b, fraction, name=None, interface=None)[source]#

Bases: BaseObj

as_dict(skip=[])[source]#

Custom as_dict method to skip necessary things.

Return type

dict

Returns

Cleaned dictionary.

classmethod default(interface=None)[source]#

Default constructor for a mixture of two materials.

Return type

MaterialMixture

Returns

Default material mixture container.

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

Constructor of a 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

Return type

MaterialMixture

Returns

MaterialMixture container.

property isld#
property material_a: Material#

the first material.

Type

return

Return type

Material

property material_b: Material#

the second material.

Type

return

Return type

Material

property sld#
property uid: int#

Return a UID from the borg map.

Return type

int

Returns

Unique id

user_data: dict#