def GetComponentsFromGT(self, modes, innode):
        """Obtain components from graph table for the given
        observation mode keywords and starting node.

        .. note::

            This prints extra information to screen if
            ``pysynphot.tables.DEBUG`` is set to `True`.

        Parameters
        ----------
        modes : list of str
            List of individual keywords within the observation mode.

        innode : int
            Starting node, usually 1.

        Returns
        -------
        components, thcomponents : list of str
            List of optical and thermal component names.

        Raises
        ------
        KeyError
            No matches found for one of the keywords.

        ValueError
            Incomplete observation mode or unused keyword(s) detected.

        """
        components = []
        thcomponents = []
        outnode = 0
        inmodes=set(modes)
        used_modes=set()
        count = 0
        while outnode >= 0:
            if (DEBUG and (outnode < 0)):
                print("outnode == %d: stop condition"%outnode)

            previous_outnode = outnode

            nodes = N.where(self.innodes == innode)

            # If there are no entries with this innode, we're done
            if nodes[0].size == 0:
                if DEBUG:
                    print("no such innode %d: stop condition"%innode)
                #return (components,thcomponents)
                break

            # Find the entry corresponding to the component named
            # 'default', bacause thats the one we'll use if we don't
            # match anything in the modes list
            defaultindex = N.where(self.keywords[nodes] =='default')

            if 'default' in self.keywords[nodes]:
                dfi=N.where(self.keywords[nodes] == 'default')[0][0]
                outnode = self.outnodes[nodes[0][dfi]]
                component = self.compnames[nodes[0][dfi]]
                thcomponent = self.thcompnames[nodes[0][dfi]]
                used_default=True
            else:
                #There's no default, so fail if you don't match anything
                # in the keyword matching step.
                outnode = -2
                component = thcomponent = None

            # Now try and match something from the modes list
            for mode in modes:

                if mode in self.keywords[nodes]:
                    used_modes.add(mode)
                    index = N.where(self.keywords[nodes]==mode)
                    if len(index[0])>1:
                        raise KeyError('%d matches found for %s'%(len(index[0]),mode))
                    idx=index[0][0]
                    component = self.compnames[nodes[0][idx]]
                    thcomponent = self.thcompnames[nodes[0][idx]]
                    outnode = self.outnodes[nodes[0][idx]]
                    used_default=False

            if DEBUG:
                print("Innode %d  Outnode %d  Compname %s"%(innode, outnode, component))
            components.append(component)
            thcomponents.append(thcomponent)


            innode = outnode

            if outnode == previous_outnode:
                if DEBUG:
                    print("Innode: %d  Outnode:%d  Used default: %s"%(innode, outnode,used_default))
                count += 1
                if count > 3:
                    if DEBUG:
                        print("same outnode %d > 3 times: stop condition"%outnode)
                    break

        if (outnode < 0):
            if DEBUG:
                print("outnode == %d: stop condition"%outnode)
            raise ValueError("Incomplete obsmode %s"%str(modes))


        #Check for unused modes
        if inmodes != used_modes:
            unused=str(inmodes.difference(used_modes))
            raise ValueError("Warning: unused keywords %s"%unused)

        return (components,thcomponents)
Obtain components from graph table for the given
        observation mode keywords and starting node.

        .. note::

            This prints extra information to screen if
            ``pysynphot.tables.DEBUG`` is set to `True`.

        Parameters
        ----------
        modes : list of str
            List of individual keywords within the observation mode.

        innode : int
            Starting node, usually 1.

        Returns
        -------
        components, thcomponents : list of str
            List of optical and thermal component names.

        Raises
        ------
        KeyError
            No matches found for one of the keywords.

        ValueError
            Incomplete observation mode or unused keyword(s) detected.