-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSPRT_unc_1114.py
More file actions
48 lines (32 loc) · 1.02 KB
/
SPRT_unc_1114.py
File metadata and controls
48 lines (32 loc) · 1.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
import GTC
import openpyxl
from GTC import ureal
from its90 import Calculate_temp_from_W,Calculate_Wr
def lists2ureal(value_list,unc_list=[],k=2):
for i,val in enumerate(value_list):
try:
d=unc_list[i]
except:
unc_list.append(0)
result = [ureal(value_list_i, unc_list_i / k) for value_list_i, unc_list_i in zip(value_list, unc_list)]
return result
#Dane ze świadectwa dla typu 5685 nr 1114
R0=ureal(x=2.5534637,u=0.0000041/2,label='R0')
#print(Calculate_Wr(961.78))
#print(Calculate_temp_from_W(1.079488))
#Dane ze świadectwa
t=[961.78,660.332,419.527,231.928]
t_U=[0.0052,0.0040,0.0017,0.0015]
Wt=[4.28556295,3.37543469,2.56855103,1.89259628]
#Konwersja liczb do postaci ureal
t=lists2ureal(t,t_U)
Wt=lists2ureal(Wt)
Wr=map(Calculate_Wr,t)
print('t=',t)
print('Wt=',Wt)
print('Wr=',Wr)
for item in map(Calculate_Wr,t):
print(item)
path = r'C:\Users\Admin\PycharmProjects\HumidityGenerator\SPRT_nr_1114.xlsx'
book=openpyxl.load_workbook(path)
sheet=book['Swiadectwo']