Setting#
- class Setting(parameter, value)#
Bases:
object
Physical quantity represented as a Parameter attached to a numerical value.
Module:
exa.common.data.parameter
Attributes
Element-wise indices of the parameter in
self
.Label used as pretty identifier for display purposes, same as label of
parameter
.Name used as identifier, same as name of
parameter
.Parent label of the parameter of
self
.Parent name of the parameter of
self
.SI unit of the
value
, if applicable, same as unit ofparameter
.The parameter this Setting represents.
Data value attached to the parameter.
Methods
copy
Utility for creating an element-wise parameter for a single value in a collection valued parameter.
Return a one-sided difference between two sets of Settings, prioritising values in first.
get_by_name
merge
remove_by_name
replace
Create a new setting object with updated value.
- update(value)#
Create a new setting object with updated value.
- property parent_name#
Parent name of the parameter of
self
.
- property parent_label#
Parent label of the parameter of
self
.
- static diff_sets(first, second)#
Return a one-sided difference between two sets of Settings, prioritising values in first.
- Parameters:
- Returns:
A new set of Settings whose parameters are only found in first, and Settings in first whose values differ from their counterparts in second.
- Return type:
- create_element_parameter_for(indices)#
Utility for creating an element-wise parameter for a single value in a collection valued parameter.
- Parameters:
indices (int | list[int]) – The indices in the collection for which to create the element-wise parameter.
- Returns:
The element-wise parameter.
- Raises:
ValueError – If
self
is not collection-valued.- Return type: