pypet/naturalnaming.py
def _debug(self):
        """Creates a dummy object containing the whole tree to make unfolding easier.

        This method is only useful for debugging purposes.
        If you use an IDE and want to unfold the trajectory tree, you always need to
        open the private attribute `_children`. Use to this function to create a new
        object that contains the tree structure in its attributes.

        Manipulating the returned object does not change the original tree!

        """

        class Bunch(object):
            """Dummy container class"""
            pass

        debug_tree = Bunch()

        if not self.v_annotations.f_is_empty():
            debug_tree.v_annotations = self.v_annotations
        if not self.v_comment == '':
            debug_tree.v_comment = self.v_comment

        for leaf_name in self._leaves:
            leaf = self._leaves[leaf_name]
            setattr(debug_tree, leaf_name, leaf)

        for link_name in self._links:
            linked_node = self._links[link_name]
            setattr(debug_tree, link_name, 'Link to `%s`' % linked_node.v_full_name)

        for group_name in self._groups:
            group = self._groups[group_name]
            setattr(debug_tree, group_name, group._debug())

        return debug_tree
def _debug(self):
        class Bunch(object):
            """Dummy container class"""
            pass

        debug_tree = Bunch()

        if not self.v_annotations.f_is_empty():
            debug_tree.v_annotations = self.v_annotations
        if not self.v_comment == '':
            debug_tree.v_comment = self.v_comment

        for leaf_name in self._leaves:
            leaf = self._leaves[leaf_name]
            setattr(debug_tree, leaf_name, leaf)

        for link_name in self._links:
            linked_node = self._links[link_name]
            setattr(debug_tree, link_name, 'Link to `%s`' % linked_node.v_full_name)

        for group_name in self._groups:
            group = self._groups[group_name]
            setattr(debug_tree, group_name, group._debug())

        return debug_tree
def _debug ( self ) : class Bunch ( object ) : """Dummy container class""" pass debug_tree = Bunch ( ) if not self . v_annotations . f_is_empty ( ) : debug_tree . v_annotations = self . v_annotations if not self . v_comment == '' : debug_tree . v_comment = self . v_comment for leaf_name in self . _leaves : leaf = self . _leaves [ leaf_name ] setattr ( debug_tree , leaf_name , leaf ) for link_name in self . _links : linked_node = self . _links [ link_name ] setattr ( debug_tree , link_name , 'Link to `%s`' % linked_node . v_full_name ) for group_name in self . _groups : group = self . _groups [ group_name ] setattr ( debug_tree , group_name , group . _debug ( ) ) return debug_tree
Creates a dummy object containing the whole tree to make unfolding easier.

        This method is only useful for debugging purposes.
        If you use an IDE and want to unfold the trajectory tree, you always need to
        open the private attribute `_children`. Use to this function to create a new
        object that contains the tree structure in its attributes.

        Manipulating the returned object does not change the original tree!
Creates a dummy object containing the whole tree to make unfolding easier .