def fileheader2dic(head):
    """
    Convert fileheader list into a Python dictionary
    """
    dic = dict()
    dic['nblocks'] = head[0]
    dic['ntraces'] = head[1]
    dic['np'] = head[2]
    dic['ebytes'] = head[3]
    dic['tbytes'] = head[4]
    dic['bbytes'] = head[5]
    dic['vers_id'] = head[6]
    dic['status'] = head[7]
    dic['nbheaders'] = 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['S_ACQPAR'] = (dic['status'] & 128) // 128
    dic['S_SECND'] = (dic['status'] & 256) // 256
    dic['S_TRANSF'] = (dic['status'] & 512) // 512
    dic['S_NP'] = (dic['status'] & 2048) // 2048
    dic['S_NF'] = (dic['status'] & 4096) // 4096
    dic['S_NI'] = (dic['status'] & 8192) // 8192
    dic['S_NI2'] = (dic['status'] & 16384) // 16384
    return dic
