# $CVSHeader: pal8e/src/binData.py,v 1.2 2005/02/15 01:10:26 indraneel Rel $

import sys
from Bin import Bin

if (len(sys.argv) > 1):
    infile = sys.argv[1]
else:
    #infile = '../dat/stat/Hangle'
    #infile = '/home/indraneel/Eangle_i4pseudo'
    infile = '../dat/stat/elemHHovlap'
fh=file(infile)
lines = fh.readlines()
fh.close()
data = []
for line in lines:
    #(le, r)=line.split()
    r = line[:-1]
    data.append(float(r))
bin = Bin(data)
bin.bin(1.0)
bin.normalise()
data = bin.getNumarray()
for d in data:
    line = str(d[0])+'\t'+str(d[1])
    print line
