Last change
on this file since 18729 was 13403, checked in by neise, 13 years ago |
initial commit
|
-
Property svn:executable
set to
*
|
File size:
828 bytes
|
Line | |
---|
1 | #!/usr/bin/python -tti
|
---|
2 | #
|
---|
3 | # Dominik Neise
|
---|
4 | #
|
---|
5 | import sys
|
---|
6 | import numpy as np
|
---|
7 | from plotters import Plotter
|
---|
8 |
|
---|
9 | def hard2chid(hardid):
|
---|
10 | hardid = int(hardid)
|
---|
11 | einer = hardid%10
|
---|
12 | hardid -= einer
|
---|
13 | zehner = hardid%100/10
|
---|
14 | hardid -= zehner*10
|
---|
15 | hunderter = hardid%1000/100
|
---|
16 | hardid -= hunderter*100
|
---|
17 | tausender = hardid%10000/1000
|
---|
18 |
|
---|
19 | chid = tausender*360 + hunderter*36 + zehner*9 + einer
|
---|
20 | return chid
|
---|
21 |
|
---|
22 | leftpath = sys.argv[1]
|
---|
23 | rightpath =sys.argv[2]
|
---|
24 |
|
---|
25 | left = np.loadtxt(leftpath)
|
---|
26 | right = np.loadtxt(rightpath)
|
---|
27 |
|
---|
28 | right = list(right)
|
---|
29 | for i,ri in enumerate(right):
|
---|
30 | right[i] = list(ri)
|
---|
31 |
|
---|
32 | for i in right:
|
---|
33 | i.append( hard2chid(i[1]) )
|
---|
34 |
|
---|
35 | right = sorted( right, key=lambda i: i[-1])
|
---|
36 |
|
---|
37 | right = np.array(right)
|
---|
38 |
|
---|
39 | pleft = Plotter('pleft', x=left[:,1])
|
---|
40 | pright= Plotter('pright',x=right[:,8])
|
---|
41 | pleft(left[:,2])
|
---|
42 | pright(-right[:,9]) |
---|
Note:
See
TracBrowser
for help on using the repository browser.