- class easyreflectometry.experiment.model.Model[source]#
Bases:
BaseObj
Model is the class that represents the experiment. It is used to store the information about the experiment and to perform the calculations.
-
scale:
Parameter
#
-
background:
Parameter
#
- __init__(sample=None, scale=None, background=None, resolution_function=None, name='EasyModel', interface=None)[source]#
Constructor.
- Parameters:
sample (
Optional
[Sample
]) – The sample being modelled.scale (
Union
[Parameter
,Number
,None
]) – Scaling factor of profile.background (
Union
[Parameter
,Number
,None
]) – Linear background magnitude.name (
str
) – Name of the model, defaults to ‘EasyModel’.resolution_function (
Optional
[ResolutionFunction
]) – Resolution function, defaults to PercentageFhwm.interface – Calculator interface, defaults to None.
- add_item(*assemblies)[source]#
Add a layer or item to the model sample.
- Parameters:
assemblies (
list
[BaseAssembly
]) – Assemblies to add to model sample.- Return type:
None
- duplicate_item(idx)[source]#
Duplicate a given item or layer in a sample.
- Parameters:
idx (
int
) – Index of the item or layer to duplicate- Return type:
None
- remove_item(idx)[source]#
Remove an item from the model.
- Parameters:
idx (
int
) – Index of the item to remove.- Return type:
None
- property resolution_function: ResolutionFunction#
Return the resolution function.
- property interface#
Get the current interface of the object
-
user_data:
dict
#
-
scale: