def read_kl(filename):
    with open(filename, 'r') as f:
        inp = f.read()
    inlist = inp.split('\n')
    inlist = [ x for x in inlist if x != '']
    inlist = [ x for x in inlist if x[0] != '#']
    inlist = [x.split(' ') for x in inlist]
    #print inlist
    x_in = np.array([ float(x[0]) for x in inlist])
    y_in = np.array([ float(x[1]) for x in inlist])
    return x_in, y_in