-
Notifications
You must be signed in to change notification settings - Fork 3
/
analy_drive.py
94 lines (76 loc) · 2.06 KB
/
analy_drive.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#! /usr/bin/env python
# coding:utf-8
import sys
import re
import numpy as np
import pylab as pl
fig = pl.figure()
#xr = [0,6800]
argvs = sys.argv
argc = len(argvs)
print argvs
print argc
print
if (argc != 2):
print 'Usage: # python %s filename' % argvs[0]
quit()
print 'The content of %s ...n' % argvs[1]
hoge = open(argvs[1],'r')
file = re.split(r'[ ,\n]+',hoge.read())
size = len(file)
#new = np.zeros((20,size/20))
new = np.zeros((16,size/16))
#new = np.zeros((11,size/11))
"""
for i in range(0,20):
for j in range(0,size/20):
new[i,j] = file[i+j*20];
"""
for i in range(0,16):
for j in range(0,size/16):
new[i,j] = file[i+j*16];
#for i in range(0,11):
#for j in range(0,size/11):
#new[i,j] = file[i+j*11];
#----------------------
# plot
#----------------------
#pl.ylim(,)
ax1 = fig.add_subplot(2,2,1)
#pl.plot(new[1,],new[2,]-new[4,],linestyle='None',marker='o')
#pl.plot(new[1,],new[2,]-new[4,])
plt.plot(new[1,],new[2,]-new[4,],label=u"indicated-encorder",linestyle='None',marker='.')
#pl.xlim(xr[0],xr[1])
pl.ylim(-7.0,7.0)
#pl.xlabel("secofday")
pl.ylabel("Az-refAz[arcsec]")
plt.legend(prop={'size' : 10})
plt.grid()
ax2 = fig.add_subplot(2,2,2)
#pl.plot(new[1,],new[3,]-new[5,])
plt.plot(new[1,],new[3,]-new[5,],label=u"indicated-encorder",linestyle='None',marker='.')
#pl.xlim(xr[0],xr[1])
pl.ylim(-7.0,7.0)
#pl.xlabel("secofday")
pl.ylabel("El-refEl[arcsec]")
plt.legend(prop={'size' : 10})
plt.grid()
ax3 = fig.add_subplot(2,2,3)
pl.plot(new[1,],new[2,],label=u"indicated value",linestyle='None',marker='.')
pl.plot(new[1,],new[4,],label=u"encorder",linestyle='None',marker='.')
#pl.xlim(xr[0],xr[1])
#pl.ylim(-164.0,-163.0)
pl.xlabel("secofday")
pl.ylabel("Az[arcsec]")
pl.legend(prop={'size' : 10})
pl.grid()
ax4 = fig.add_subplot(2,2,4)
pl.plot(new[1,],new[3,],label=u"indicated value",linestyle='None',marker='.')
pl.plot(new[1,],new[5,],label=u"encorder",linestyle='None',marker='.')
#pl.xlim(xr[0],xr[1])
#pl.ylim(42.0,43.0)
pl.xlabel("secofday")
pl.ylabel("El[arcsec]")
pl.legend(prop={'size' : 10})
pl.grid()
pl.show()