Repository navigation
Expand file tree
/
Copy pathplot_trend.py
More file actions
125 lines (110 loc) · 3.02 KB
/
Copy pathplot_trend.py
File metadata and controls
125 lines (110 loc) · 3.02 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import numpy as np
import matplotlib.pyplot as plt
# =============================================================================
# functions
# =============================================================================
def extract_temperature(fn):
idx = fn.find('_T')
temperature = float(fn[idx+2:idx+9])
return temperature
# =============================================================================
# Main
# =============================================================================
data_list = []
data = {
"fn": "Bar3s2_thermal_CW03-58_160nm_vac_chp2_15283.7s_T159.169C_th0.150_x-0.300_y0.000_20.00s_010300_saxs.png",
"a_nm": 12.5,
"b_nm": 8.9,
"alpha": 90,
"beta": 90,
"gamma": 111,
#"fit": [52141, 234807, 0.2221]
#"fit_all": [149328, 2626354, 0.0569],
}
data_list.append(data)
data = {
"fn": "Bar3s2_thermal_CW03-58_160nm_vac_chp2_15914.3s_T164.458C_th0.150_x-0.200_y0.000_20.00s_010441_saxs.png",
"a_nm": 11.8,
"b_nm": 8.9,
"alpha": 90,
"beta": 90,
"gamma": 111,
#"fit": [50235, 227377, 0.2209],
# "fit_all": [140486, 2549325, 0.0551]
}
data_list.append(data)
data = {
"fn": "Bar3s2_thermal_CW03-58_160nm_vac_chp2_16723.6s_T171.150C_th0.150_x-0.000_y0.000_20.00s_010469_saxs.png",
"a_nm": 11.4,
"b_nm": 8.6,
"alpha": 90,
"beta": 90,
"gamma": 113.5,
}
data_list.append(data)
data = {
"fn": "Bar3_offline/Index/Bar3s2_thermal_CW03-58_160nm_vac_chp2_17532.9s_T177.948C_th0.150_x0.150_y0.000_20.00s_010606_saxs.png",
"a_nm": 10.9,
"b_nm": 8.45,
"alpha": 90,
"beta": 90,
"gamma": 114,
# 43212, 204523, 0.2113
# 109542, 2296006, 0.0477
}
data_list.append(data)
data = {
"fn": "Bar3_offline/Index/Bar3s2_thermal_CW03-58_160nm_vac_chp2_18831.3s_T188.714C_th0.150_x0.400_y0.000_20.00s_010758_saxs.png",
"a_nm": 10.3,
"b_nm": 8.38,
"alpha": 90,
"beta": 90,
"gamma": 116.5,
}
data_list.append(data)
data = {
"fn": "Bar3s2_thermal_CW03-58_160nm_vac_chp2_19688.8s_T195.894C_th0.150_x0.600_y0.000_20.00s_010786_saxs.png",
"a_nm": 10.0,
"b_nm": 8.31,
"alpha": 90,
"beta": 90,
"gamma": 116.5,
# 34810, 165732, 0.2100
# 78916, 1868215, 0.0422
}
data_list.append(data)
data = {
"fn": "Bar3s2_thermal_CW03-58_160nm_vac_chp2_20713.9s_T204.430C_th0.150_x0.800_y0.000_20.00s_010935_saxs.png",
"a_nm": 9.65,
"b_nm": 8.3,
"alpha": 90,
"beta": 90,
"gamma": 117,
# 31058, 150363, 0.2066
# 67576, 1696752, 0.0398
}
data_list.append(data)
temp_array = []
a_array = []
b_array = []
gamma_array = []
for data in data_list:
temp_array.append(extract_temperature(data['fn']))
a_array.append(data['a_nm'])
b_array.append(data['b_nm'])
gamma_array.append(data['gamma'])
plt.figure(10); plt.clf()
plt.subplot(211)
plt.plot(temp_array, a_array, 'o-', label='a')
plt.plot(temp_array, b_array, 'o:', label='b')
plt.legend()
plt.grid()
fn = data['fn']
idx = fn.find('s_')
st = "{}".format(fn[0:idx-8])
plt.title(st)
plt.subplot(212)
plt.plot(temp_array, gamma_array, 'rx-', label='gamma')
plt.legend()
plt.grid()
plt.xlabel('temperature (degC)',fontsize=10)