'Same as index_of, but ensures always returning a positive index
or zero.
(Really this should be called non_negative_index_of but it felt
too long.)
This means that if the key is a negative integer, we have to
convert it to the corresponding positive index.  This means
knowing the length of the HDUList, which in turn means loading
all HDUs.  Therefore using negative indices on HDULists is inherently
inefficient.'

def _positive_index_of(self, key):

    index = self.index_of(key)
    if (index >= 0):
        return index
    if (abs(index) > len(self)):
        raise IndexError('Extension    {}    is    out    of    bound    or    not    found.'.format(index))
    return (len(self) + index)
