- 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.
- __init__(sample, scale, background, resolution, name='EasyModel', interface=None)[source]#
Constructor.
- Parameters:
sample (
Sample
) – The sample being modelled.scale (
Parameter
) – Scaling factor of profile.background (
Parameter
) – Linear background magnitude.resolution (
Parameter
) – Constant resolution smearing percentage.name (
str
) – Name of the model, defaults to ‘EasyModel’.interface – Calculator interface, defaults to
None
.
- classmethod default(interface=None)[source]#
Default instance of the reflectometry experiment model.
- Parameters:
interface – Calculator interface, defaults to
None
.- Return type:
- classmethod from_pars(sample, scale, background, resolution, name='EasyModel', interface=None)[source]#
Instance of a reflectometry experiment model where the parameters are known.
- Parameters:
sample (
Sample
) – The sample being modelled.scale (
Parameter
) – Scaling factor of profile.background (
Parameter
) – Linear background magnitude.resolution (
Parameter
) – Constant resolution smearing percentage.name (
str
) – Name of the layer, defaults to ‘EasyModel’.interface – Calculator interface, defaults to
None
.
- Return type:
- add_item(*items)[source]#
Add a layer or item to the model sample.
- Parameters:
items (Layer | RepeatingMultilayer) – Layers or items 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 uid: int#
Return a UID from the borg map.
-
user_data:
dict
#