BehaviorHaver

class PlasmaCalcs.dimensions.behavior.BehaviorHaver

Bases: object

object which has a behavior.

Methods

get_behavior([keys])

return value of self.behavior.

Attributes

behavior

dict of {attr: self.attr} for attr in self.behavior_attrs.

behavior_attrs

list of attrs in self which control behavior of self.

cls_behavior_attrs

nondim_behavior_attrs

list 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 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.