BehaviorHaver
- class PlasmaCalcs.dimensions.behavior.BehaviorHaver
Bases:
objectobject which has a behavior.
Methods
get_behavior([keys])return value of self.behavior.
Attributes
dict of {attr: self.attr} for attr in self.behavior_attrs.
list of attrs in self which control behavior of self.
cls_behavior_attrslist of attrs in self which control behavior of self, but which are NOT in self.dimensions.
- property behavior
dict of {attr: self.attr} for attr in self.behavior_attrs. Note dims are separate;
dims go in behavior.dims. E.g. Behavior({‘units’:’si’,…}, dims={‘snap’:0,…}).
- property behavior_attrs
list of attrs in self which control behavior of self.
Here, returns self.cls_behavior_attrs.Subclasses could override if any behavior attrs are not known at the class-level,e.g. if MySubclass’s list of behavior attrs varies between instances of MySubclass.
- get_behavior(keys=None)
return value of self.behavior.
keys: None or iterableif provided, only include these attrs.from nondim_behavior_attrs, or dims.
- property nondim_behavior_attrs
list of attrs in self which control behavior of self, but which are NOT in self.dimensions.