subroutine hkgtigen + retrieve the list of validity ranges from CAL for instrument <inst> + merge/modify list according command line parameters => <valrangelist> + foreach periodic HK file <hk> in ODF for instrument <inst> + forach exposure <exp> of instrument <inst> + get list <l> of columns in <hk> + construct boolean expression <e> from <l> and <valrangelist> + invoke tabgtigen with <e>, on <file> => <gti> + merge all GTI sets <gti> constructed in inner loops + write final GTI set end subroutine hkgtigen