def blockheader2dic(head):
    """
    Convert a block header list into a Python dictionary.
    """
    dic = dict()
    dic['scale'] = head[0]
    dic['status'] = head[1]
    dic['index'] = head[2]
    dic['mode'] = head[3]
    dic['ctcount'] = head[4]
    dic['lpval'] = head[5]
    dic['rpval'] = head[6]
    dic['lvl'] = head[7]
    dic['tlt'] = head[8]
    dic['S_DATA'] = (dic['status'] & 1) // 1
    dic['S_SPEC'] = (dic['status'] & 2) // 2
    dic['S_32'] = (dic['status'] & 4) // 4
    dic['S_FLOAT'] = (dic['status'] & 8) // 8
    dic['S_COMPLEX'] = (dic['status'] & 16) // 16
    dic['S_HYPERCOMPLEX'] = (dic['status'] & 32) // 32
    dic['MORE_BLOCKS'] = (dic['status'] & 128) // 128
    dic['NP_CMPLX'] = (dic['status'] & 256) // 256
    dic['NF_CMPLX'] = (dic['status'] & 512) // 512
    dic['NI_CMPLX'] = (dic['status'] & 1024) // 1024
    dic['NI2_CMPLX'] = (dic['status'] & 2048) // 2048
    dic['NP_PHMODE'] = (dic['mode'] & 1) // 1
    dic['NP_AVMODE'] = (dic['mode'] & 2) // 2
    dic['NP_PWRMODE'] = (dic['mode'] & 4) // 4
    dic['NF_PHMODE'] = (dic['mode'] & 16) // 16
    dic['NF_AVMODE'] = (dic['mode'] & 32) // 32
    dic['NF_PWRMODE'] = (dic['mode'] & 64) // 64
    dic['NI_PHMODE'] = (dic['mode'] & 256) // 256
    dic['NI_AVMODE'] = (dic['mode'] & 512) // 512
    dic['NI_PWRMODE'] = (dic['mode'] & 1024) // 1024
    dic['NI2_PHMODE'] = (dic['mode'] & 4096) // 4096
    dic['NI2_AVMODE'] = (dic['mode'] & 8192) // 8192
    dic['NI2_PWRMODE'] = (dic['mode'] & 16384) // 16384
    return dic
