@staticmethod
def identify_hpx_convention(header):
    """Identify the convention used to write this file."""
    if 'HPX_CONV' in header:
        return header['HPX_CONV'].lower()
    hduname = header.get('EXTNAME', None)
    if hduname == 'HPXEXPOSURES':
        return 'fgst-bexpcube'
    elif hduname == 'SKYMAP2':
        if 'COORDTYPE' in header.keys():
            return 'galprop'
        else:
            return 'galprop2'
    colname = header['TTYPE1']
    if colname == 'PIX':
        colname = header['TTYPE2']
    if colname == 'KEY':
        return 'fgst-srcmap-sparse'
    elif colname == 'ENERGY1':
        return 'fgst-template'
    elif colname == 'COSBINS':
        return 'fgst-ltcube'
    elif colname == 'Bin0':
        return 'galprop'
    elif colname == 'CHANNEL1' or colname == 'CHANNEL0':
        if hduname == 'SKYMAP':
            return 'fgst-ccube'
        else:
            return 'fgst-srcmap'
    else:
        raise ValueError('Could not identify HEALPIX convention')
