PlasmaCalcs.dimensions.behavior.BehaviorHaver

class PlasmaCalcs.dimensions.behavior.BehaviorHaver

Bases: object

object which has a behavior.
__init__()

Methods

__init__()

get_behavior([keys])

Attributes

behavior

behavior_attrs

cls_behavior_attrs

nondim_behavior_attrs

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 iterable
if 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.