def sysabs_unique(hkl, syscond):
    """
    sysabs_unique checks whether a reflection is systematic absent
    
    sysabs_unique = sysabs_unique(hkl,syscond)
     
    INPUT:  hkl     : [h k l] 
            syscond : [1x26] with condition for systematic absences in this
                      space group, X in syscond should given as shown below
    OUTPUT: sysbs   :  if 1 the reflection is systematic absent 
                       if 0 its not
    
    syscond:
    class        systematic abs               sysconditions[i]
    HKL          H+K=XN                            0
                 H+L=XN                            1
                 K+L=XN                            2
                 H+K,H+L,K+L = XN                  3
                 H+K+L=XN                          4
                 -H+K+L=XN                         5 
    HHL          H=XN                              6
                 L=XN                              7
                 H+L=XN                            8
                 2H+L=XN                           9
    0KL          K=XN                             10
                 L=XN                             11
                 K+L=XN                           12
    H0L          H=XN                             13
                 L=XN                             14
                 H+L=XN                           15
    HK0          H=XN                             16
                 K=XN                             17
                 H+K=XN                           18
    HH0          H=XN                             19
    H00          H=XN                             20
    0K0          K=XN                             21
    00L          L=XN                             22
    H-HL         H=XN                             23
                 L=XN                             24
                 H+L=XN                           25

    Henning Osholm Sorensen, June 23, 2006.
    """
    h, k, l = hkl
    sysabs_type = 0
    if syscond[0] != 0:
        condition = syscond[0]
        if abs(h + k) % condition != 0:
            sysabs_type = 1
    if syscond[1] != 0:
        condition = syscond[1]
        if abs(h + l) % condition != 0:
            sysabs_type = 2
    if syscond[2] != 0:
        condition = syscond[2]
        if abs(k + l) % condition != 0:
            sysabs_type = 3
    if syscond[3] != 0:
        sysabs_type = 4
        condition = syscond[3]
        if abs(h + k) % condition == 0:
            if abs(h + l) % condition == 0:
                if abs(k + l) % condition == 0:
                    sysabs_type = 0
    if syscond[4] != 0:
        condition = syscond[4]
        if abs(h + k + l) % condition != 0:
            sysabs_type = 5
    if syscond[5] != 0:
        condition = syscond[5]
        if abs(-h + k + l) % condition != 0:
            sysabs_type = 6
    if h - k == 0:
        if syscond[6] != 0:
            condition = syscond[6]
            if abs(h) % condition != 0:
                sysabs_type = 7
        if syscond[7] != 0:
            condition = syscond[7]
            if abs(l) % condition != 0:
                sysabs_type = 8
        if syscond[8] != 0:
            condition = syscond[8]
            if abs(h + l) % condition != 0:
                sysabs_type = 9
        if syscond[9] != 0:
            condition = syscond[9]
            if abs(h + h + l) % condition != 0:
                sysabs_type = 10
    if h == 0:
        if syscond[10] != 0:
            condition = syscond[10]
            if abs(k) % condition != 0:
                sysabs_type = 11
        if syscond[11] != 0:
            condition = syscond[11]
            if abs(l) % condition != 0:
                sysabs_type = 12
        if syscond[12] != 0:
            condition = syscond[12]
            if abs(k + l) % condition != 0:
                sysabs_type = 13
    if k == 0:
        if syscond[13] != 0:
            condition = syscond[13]
            if abs(h) % condition != 0:
                sysabs_type = 14
        if syscond[14] != 0:
            condition = syscond[14]
            if abs(l) % condition != 0:
                sysabs_type = 15
        if syscond[15] != 0:
            condition = syscond[15]
            if abs(h + l) % condition != 0:
                sysabs_type = 16
    if l == 0:
        if syscond[16] != 0:
            condition = syscond[16]
            if abs(h) % condition != 0:
                sysabs_type = 17
        if syscond[17] != 0:
            condition = syscond[17]
            if abs(k) % condition != 0:
                sysabs_type = 18
        if syscond[18] != 0:
            condition = syscond[18]
            if abs(h + k) % condition != 0:
                sysabs_type = 19
    if l == 0:
        if h - k == 0:
            if syscond[19] != 0:
                condition = syscond[19]
                if abs(h) % condition != 0:
                    sysabs_type = 20
    if abs(k) + abs(l) == 0:
        if syscond[20] != 0:
            condition = syscond[20]
            if abs(h) % condition != 0:
                sysabs_type = 21
    if abs(h) + abs(l) == 0:
        if syscond[21] != 0:
            condition = syscond[21]
            if abs(k) % condition != 0:
                sysabs_type = 22
    if abs(h) + abs(k) == 0:
        if syscond[22] != 0:
            condition = syscond[22]
            if abs(l) % condition != 0:
                sysabs_type = 23
    if h + k == 0:
        if syscond[23] != 0:
            condition = syscond[23]
            if abs(h) % condition != 0:
                sysabs_type = 24
        if syscond[24] != 0:
            condition = syscond[24]
            if abs(l) % condition != 0:
                sysabs_type = 25
        if syscond[25] != 0:
            condition = syscond[25]
            if abs(h + l) % condition != 0:
                sysabs_type = 26
    return sysabs_type
