def read_index(index_file):
    codes = []
    pKs = []
    with open(index_file) as f:
        for i in f:
            if (i[0] == '#'):
                continue
            (code, reso, year, pK, *others) = i.split()
            codes.append(code)
            pKs.append(float(pK))
    return (codes, pKs)
def read_index(index_file):
    codes = []
    pKs = []
    with open(index_file) as f:
        for i in f:
            if (i[0] == '#'):
                continue
            (code, reso, year, pK, *others) = i.split()
            codes.append(code)
            pKs.append(float(pK))
    return (codes, pKs)