forked from Vindaar/TimepixAnalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathangle.py
More file actions
executable file
·92 lines (77 loc) · 2.57 KB
/
angle.py
File metadata and controls
executable file
·92 lines (77 loc) · 2.57 KB
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
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
import pylab
# set up some LaTeX plotting parameters
# still need to change parameters
fig_width_pt = 478.00812#246.0 # Get this from LaTeX using \showthe\columnwidth
inches_per_pt = 1.0/72.27 # Convert pt to inch
golden_mean = (np.sqrt(5)-1.0)/2.0 # Aesthetic ratio
fig_width = fig_width_pt*inches_per_pt # width in inches
fig_height = fig_width*golden_mean # height in inches
fig_size = [fig_width,fig_height]
params = {'backend': 'ps',
'axes.labelsize': 10,#10,
'axes.titlesize': 10,
'font.size': 10,
'legend.fontsize': 10,#10,
'xtick.labelsize': 8,#8,
'ytick.labelsize': 8,#8,
'text.usetex': True,
'text.latex.preamble': [r'\usepackage{siunitx}'],
'font.family': 'serif',
'font.serif': 'cm',
'figure.figsize': fig_size}
pylab.rcParams.update(params)
daten = open('solar_angle_2014.dat', 'r').readlines()
latitude_2014 = []
days_2014 = []
hours = []
day_iterator = 0
for i, line in enumerate(daten):
print i
if i > 1:
# split line into columns
line = line.split()
# append latitude to list
latitude_2014.append(float(line[11]))
# now create proper day element
day = (i-2)*1.0/24.0
days_2014.append(day)
hours.append(line[1])
print latitude_2014
print days_2014
print hours
plt.plot(days_2014, latitude_2014)
plt.xlabel('Days from 15/10/2014 to 16/11/2014')
plt.ylabel('Angle to solar equator / deg')
plt.savefig('./angles_2014.pdf')
plt.show()
daten = open('solar_angle_2015.dat', 'r').readlines()
latitude_2015 = []
days_2015 = []
hours = []
day_iterator = 0
for i, line in enumerate(daten):
print i
if i > 1:
# split line into columns
line = line.split()
# append latitude to list
latitude_2015.append(float(line[11]))
# now create proper day element
day = (i-2)*1.0/24.0
days_2015.append(day)
hours.append(line[1])
print latitude_2015
print days_2015
print hours
plt.plot(days_2015, latitude_2015)
plt.xlabel('Days from 20/06/2015 to 19/11/2015')
plt.ylabel('Angle to solar equator / deg')
plt.savefig('./angles_2015.pdf')
plt.show()
# plt.plot(order_calc, dist_calc, color='sienna', marker='', linestyle='-')
# plt.xlabel('Order of Lissajous figure')
# plt.ylabel('Arbitrary distance $x$ / \si{\cm}')
# plt.savefig('./Bilder/michelson_plot.eps')