yt.frontends.enzo_p.misc module

Miscellaneous functions that are Enzo-P-specific

yt.frontends.enzo_p.misc.bdecode(block)[source]

Decode a block descriptor to get its left and right sides and level.

A block string consisting of (0, 1), with optionally one colon. The number of digits after the colon is the refinemenet level. The combined digits denote the binary representation of the left edge.

yt.frontends.enzo_p.misc.get_block_info(block, min_dim=3)[source]
yt.frontends.enzo_p.misc.get_block_level(block)[source]
yt.frontends.enzo_p.misc.get_block_string_and_dim(block, min_dim=3)[source]
yt.frontends.enzo_p.misc.get_child_index(anc_id, desc_id)[source]
yt.frontends.enzo_p.misc.get_root_block_id(block, min_dim=3)[source]
yt.frontends.enzo_p.misc.get_root_blocks(block, min_dim=3)[source]
yt.frontends.enzo_p.misc.is_parent(anc_block, desc_block)[source]
yt.frontends.enzo_p.misc.nested_dict_get(pdict, keys, default=None)[source]

Retrieve a value from a nested dict using a tuple of keys.

If a is a dict, and a[‘b’] = {‘c’: ‘d’}, then nested_dict_get(a, (‘b’, ‘c’)) returns ‘d’.