Skip to content

Instantly share code, notes, and snippets.

@shhong
Created July 6, 2009 16:20
Show Gist options
  • Save shhong/141519 to your computer and use it in GitHub Desktop.
Save shhong/141519 to your computer and use it in GitHub Desktop.
x = pickle.load(open('final.no.40.pkl','r'))
In [383]: cgm = loadtxt('/Users/shhong/CGM/hwidth_HHLS_40.dat').tolist()
In [384]: l = []
In [385]: for k in cgm:
l.append([(int(k[0]), int(k[1])), k[2]])
.....:
.....:
In [387]: m = []
In [388]: for t in l:
j = find_by_pair(x, t[0])
if abs(t[1])<100: m.append([t[1],j['correlation'][2]/0.4/sqrt(prod(j['correlation'][0:2]))])
.....:
.....:
In [391]:
In [392]:
In [393]: m = array(m)
In [394]: plot(m[:,0],m[:,1],'or')
Out[394]: [<matplotlib.lines.Line2D object at 0x1739ce50>]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment