libpyvinyl.Parameters.Collections.MasterParameter
libpyvinyl.Parameters.Collections.MasterParameter¶
- class libpyvinyl.Parameters.Collections.MasterParameter(*args, **kwargs)¶
The master parameters need to affect multiple Parameters objects, and for this reason it is expanded on the basis of the Parameter class. A link system is added that contains information on which Parameters objects this master parameter should control parameters from.
- __init__(*args, **kwargs)¶
Create MasterParameter with uninitialized links
Methods
__init__(*args, **kwargs)Create MasterParameter with uninitialized links
add_interval(min_value, max_value, ...)Sets an interval for this parameter: [min_value, max_value] The interval is closed on both sides: min_value and and max_value are included.
add_links(links)Links is a dict with key being reference to calculator and name of parameter to overwrite
add_option(option, options_are_legal)Sets allowed values for this parameter
clear_intervals()Clear the intervals of this parameter.
clear_options()Clear the option values of this parameter.
from_dict(param_dict)Helper class method creating a new object from a dictionary providing
get_intervals()get_intervals_are_legal()get_options()get_options_are_legal()is_legal([values])Checks whether or not given or contained value is legal given constraints.
print_line()returns string with one line description of parameter
print_paramter_constraints()Print the legal and illegal intervals of this parameter.
Attributes
pint_valueReturning the value as a pint object if available, an error otherwise
unitReturning the units as a string
valuevalue_no_conversionReturning the object stored in value with no conversions
- add_links(links)¶
Links is a dict with key being reference to calculator and name of parameter to overwrite