astromodels.core.node_type module

class astromodels.core.node_type.NewNodeUnpickler[source]

Bases: object

class astromodels.core.node_type.NodeBase(_name: str, _parent: Union[Type[ForwardRef('NodeBase')], NoneType] = None, _children: Dict[str, Type[ForwardRef('NodeBase')]] = <factory>, _path: Union[str, NoneType] = '')[source]

Bases: object

property is_leaf: bool

is this a a leaf of the tree

property is_root: bool

is this the root of the tree

property name: str
property path: str
plot_tree() None[source]

this plots the tree to the screen

astromodels.core.node_type.block_width(block) int[source]
astromodels.core.node_type.stack_str_blocks(blocks) str[source]

Takes a list of multiline strings, and stacks them horizontally.

For example, given ‘aaa

aaa’ and ‘bbbb bbbb’, it returns

‘aaa bbbb

aaa bbbb’. As in:

‘aaa + ‘bbbb = ‘aaa bbbb

aaa’ bbbb’ aaa bbbb’

Each block must be rectangular (all lines are the same length), but blocks can be different sizes.