def __sub_class_rename__(tab):
    """
    Changes the sub-class identification of SDSS DR12 in such a way, that for stars only the main identification
    (Kx, Fy, ...) is left. WD's are also only one sub-class and it won't be distingushed between
    hot and cool ones.
    The identification of galaxies and QSO's is untouched.

    :param tab: The input table with the data from the SDSS DR12
    :type tab: numpy.ndarray, astropy.table.Table
    :return: The input data with the changed sub-class identification
    :rtype: numpy.ndarray, astropy.table.Table
    """
    for i, t in enumerate(tab):
        sub_cl = t['subCl'].split(' ')
        if len(sub_cl) > 1:
            tab['subCl'][i] = sub_cl[0]
        sub_cl = sub_cl[0]
        if (len(sub_cl) == 3 or len(sub_cl) == 4) and sub_cl[-1] != 'N':
            if 'sd' in sub_cl:
                sub_cl = sub_cl[2:]
            else:
                sub_cl = sub_cl[:2]
            tab['subCl'][i] = sub_cl
        elif '/' in sub_cl:
            if 'Ib' in sub_cl:
                sub_cl = sub_cl.split('Ib')[0]
            else:
                sub_cl = sub_cl.split('/')[0]
            tab['subCl'][i] = sub_cl
        elif 'WD' in sub_cl:
            tab['subCl'][i] = 'WD'
        elif 'III' in sub_cl:
            sub_cl = sub_cl[:2]
            tab['subCl'][i] = sub_cl
        elif ':' in sub_cl:
            sub_cl = sub_cl.split(':')[-1]
            tab['subCl'][i] = sub_cl
        elif '.' in sub_cl:
            if 'Ib' in sub_cl:
                sub_cl = sub_cl.split('Ib')[0]
            elif 'V.' in sub_cl:
                sub_cl = sub_cl.split('V.')[0]
            sub_cl = sub_cl.split('.')[0]
            tab['subCl'][i] = sub_cl
        elif 'lb' in sub_cl:
            sub_cl = sub_cl.split('lb')[0]
            tab['subCl'][i] = sub_cl
        elif 'Ib' in sub_cl:
            sub_cl = sub_cl.split('Ib')[0]
            tab['subCl'][i] = sub_cl
        elif 'IV' in sub_cl:
            sub_cl = sub_cl.split('IV')[0]
            tab['subCl'][i] = sub_cl
        elif 'Ia' in sub_cl:
            sub_cl = sub_cl.split('Ia')[0]
            tab['subCl'][i] = sub_cl
        elif 'Vn' in sub_cl:
            sub_cl = sub_cl.split('Vn')[0]
            tab['subCl'][i] = sub_cl
    tab = tab[tab['subCl'] != '']
    return tab
