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

from Sigma import Sigma

fh=file('../../../Hanglebin')
lines = fh.readlines()
fh.close()
angbin = {}
for line in lines:
    (ang, rmsd)=line.split()
    ang = int(ang)
    rmsd = float(rmsd)
    if not angbin.has_key(ang):
        angbin[ang] = []
    angbin[ang].append(rmsd)
angs = angbin.keys()
angs.sort()
for ang in angs:
    data = angbin[ang]
    sigma = Sigma(data)
    s = sigma.sigma()
    line = str(ang)+'\t'+str(s)
    print line
