fills a tree with nested parameters
        Args:
            tree: QtGui.QTreeView
            parameters: dictionary or Parameter object

        Returns:

def fill_tree(self, tree, input_dict):
        """
        fills a tree with nested parameters
        Args:
            tree: QtGui.QTreeView
            parameters: dictionary or Parameter object

        Returns:

        """


        def removeAll(tree):

            if tree.model().rowCount() > 0:
                for i in range(0, tree.model().rowCount()):
                    item = tree.model().item(i)
                    del item
                    tree.model().removeRows(0, tree.model().rowCount())
                    tree.model().reset()

        def add_probe(tree, instrument, probes):
            item = QtGui.QStandardItem(instrument)
            item.setEditable(False)

            for probe in probes.split(','):
                child_name = QtGui.QStandardItem(probe)
                child_name.setDragEnabled(True)
                child_name.setSelectable(True)
                child_name.setEditable(False)
                item.appendRow(child_name)
            tree.model().appendRow(item)

        removeAll(tree)

        for index, (instrument, probes) in enumerate(input_dict.items()):
            add_probe(tree, instrument, probes)
            # tree.setFirstColumnSpanned(index, self.tree_infile.rootIndex(), True)
        tree.expandAll()