StateAttributeLimitsHelper¶
- class glue.core.state_objects.StateAttributeLimitsHelper(state, attribute, random_subset=10000, margin=0, **kwargs)[source]¶
Bases:
StateAttributeCacheHelper
This class is a helper for attribute-dependent min/max level values. It is equivalent to AttributeLimitsHelper but operates on State objects and is GUI-independent.
- Parameters:
- attributestr
The attribute name - this will be populated once a dataset is assigned to the helper.
- random_subsetint
How many points to use at most for the percentile calculation (using all values is highly inefficient and not needed)
- marginfloat
Whether to add a margin to the range of values determined. This should be given as a floating point value that will be multiplied by the range of values to give the margin to add to the limits.
- lower, upperstr
The fields for the lower/upper levels
- percentile
QComboBox
instance, optional The scale mode combo - this will be populated by presets such as Min/Max, various percentile levels, and Custom.
- logbool
Whether the limits are in log mode (in which case only positive values are used when finding the limits)
Notes
Once the helper is instantiated, the data associated with the helper can be set/changed with:
>>> helper = AttributeLimitsHelper(...) >>> helper.data = data
The data can also be passed to the initializer as described in the list of parameters above.
Attributes Summary
Methods Summary
update_values
([force, use_default_modifiers])Attributes Documentation
- modifiers_names = ('log', 'percentile')¶
- values_names = ('lower', 'upper')¶
Methods Documentation