Skip to content
Snippets Groups Projects
Commit b2a5f52b authored by Ute Becker's avatar Ute Becker :relaxed:
Browse files

Kalibrierschein TL1 und das cer-dokument werden erstellt

parent df6851a5
Branches
No related tags found
No related merge requests found
...@@ -25,9 +25,9 @@ db = couch['vl_db'] # existing ...@@ -25,9 +25,9 @@ db = couch['vl_db'] # existing
cal_cert = "75573" cal_cert = "75561"
year = "2024" year = "2024"
no = "0001" no = "0002"
QMS="ja" ######### ja beim Scan QMS="ja" ######### ja beim Scan
kk_ik_pn= "kk" ######## kk,ik oder pn kk_ik_pn= "kk" ######## kk,ik oder pn
...@@ -37,9 +37,11 @@ json_file = "cal-" + year + "-fm1-kk-" + cal_cert + "_" + no ...@@ -37,9 +37,11 @@ json_file = "cal-" + year + "-fm1-kk-" + cal_cert + "_" + no
doc = db.get(json_file) doc = db.get(json_file)
print(json_file) print(json_file)
path='C:\\Users\\becker07\\python\\TL1\\'
dateiTab = cal_cert dateiTab = path + cal_cert
#print(dateiTab) #dateiTab='C:\\Users\\becker07\\python\\TL1\\75561'
print(dateiTab)
dateiTab=pd.read_csv(dateiTab, sep="\t", decimal = ',' ) dateiTab=pd.read_csv(dateiTab, sep="\t", decimal = ',' )
...@@ -54,10 +56,10 @@ print('Leitwer : ',L) ...@@ -54,10 +56,10 @@ print('Leitwer : ',L)
gauge = float(doc["Calibration"]["CustomerObject"]["Setup"]["CDG"]) gauge = float(doc["Calibration"]["CustomerObject"]["Setup"]["CDG"])
print(gauge) print(gauge)
fileQMS = "QMS" + cal_cert + ".txt" fileQMS = path + "QMS" + cal_cert + ".txt"
dateiQMS =fileQMS dateiQMS =fileQMS
ScanQMS="Scan"+cal_cert + ".txt" ScanQMS= path + "Scan"+cal_cert + ".txt"
ScanOffsQMS="Scan_Offs"+cal_cert + ".txt" ScanOffsQMS= path + "ScanOffs"+cal_cert + ".txt"
print(ScanQMS) print(ScanQMS)
# Die Daten aus dem File mit der entsprechenden Kalibrierscheinnummer werden eingelesen: # Die Daten aus dem File mit der entsprechenden Kalibrierscheinnummer werden eingelesen:
...@@ -517,17 +519,17 @@ if L == 1 : ...@@ -517,17 +519,17 @@ if L == 1 :
lis_h = h.tolist() lis_h = h.tolist()
doc["Calibration"]["Measurement"]["Values"]={"Temperature": [{"Unit": "C","Type": "T-FM ","Comment":"Temperatur T ","Value": lis_T_fm}, doc["Calibration"]["Measurement"]["Values"]={"Temperature": [{"Unit": "C","Type": "T-FM","Comment":"Temperatur T ","Value": lis_T_fm},
{"Unit": "C","Type": "T-Room","Comment":"Temperatur T","Value": lis_T_room}, {"Unit": "C","Type": "T-Room","Comment":"Temperatur T","Value": lis_T_room},
{"Unit": "C","Type": "T-TL1 ","Comment":"Temperatur T","Value": lis_T_tl1}, {"Unit": "C","Type": "T-TL1","Comment":"Temperatur T","Value": lis_T_tl1},
{"Unit": "C","Type": "T-TL2 ","Comment":"Temperatur T","Value":lis_T_tl2}, {"Unit": "C","Type": "T-TL2","Comment":"Temperatur T","Value":lis_T_tl2},
{"Unit": "C","Type": "T-TL2 ","Comment":"Temperatur T","Value":lis_T_tl3}, {"Unit": "C","Type": "T-TL2","Comment":"Temperatur T","Value":lis_T_tl3},
{"Unit": "C","Type": "T-TL3 ","Comment":"Temperatur T","Value": lis_T_tl4}], {"Unit": "C","Type": "T-TL3","Comment":"Temperatur T","Value": lis_T_tl4}],
"Pressure": [{"Unit": "Pa","Type": "Offset pressure ","Value":lis_p_offs}, "Pressure": [{"Unit": "Pa","Type": "Offset pressure","Value":lis_p_offs},
{"Unit": "Pa","Type": " pressure mean","Value":lis_p_fill}, {"Unit": "Pa","Type": "pressure mean","Value":lis_p_fill},
{"Unit": "bar","Type": "TL1 pressure ","Value":lis_p_ig}], {"Unit": "bar","Type": "TL1 pressure ","Value":lis_p_ig}],
"Date": [{"Unit": "year-month-day","Type": "Datum ","Value":lis_datum}, "Date": [{"Unit": "year-month-day","Type": "Datum","Value":lis_datum},
{"Unit": "hh:mm:ss","Type": "Messzeit ","Value":lis_time}], {"Unit": "hh:mm:ss","Type": "Messzeit","Value":lis_time}],
"Valve": [{"Unit": "1","Type": "Connection", "Comment":"Connection of the leak" ,"Value":lis_valve}], "Valve": [{"Unit": "1","Type": "Connection", "Comment":"Connection of the leak" ,"Value":lis_valve}],
"Current": [{"Unit": "mbar","Type": "I-TL","Value": lis_I_TL}, "Current": [{"Unit": "mbar","Type": "I-TL","Value": lis_I_TL},
{"Unit": "mbar","Type": "I-FM","Value": lis_I_FM}, {"Unit": "mbar","Type": "I-FM","Value": lis_I_FM},
...@@ -573,17 +575,17 @@ else: ...@@ -573,17 +575,17 @@ else:
if gauge == 0.01 : if gauge == 0.01 :
doc["Calibration"]["Measurement"]["Values"]={"Temperature": [{"Unit": "C","Type": "T-FM ","Comment":"Temperatur T ","Value": lis_T_fm}, doc["Calibration"]["Measurement"]["Values"]={"Temperature": [{"Unit": "C","Type": "T-FM ","Comment":"Temperatur T ","Value": lis_T_fm},
{"Unit": "C","Type": "T-Room","Comment":"Temperatur T","Value": lis_T_room}, {"Unit": "C","Type": "T-Room","Comment":"Temperatur T","Value": lis_T_room},
{"Unit": "C","Type": "T-TL1 ","Comment":"Temperatur T","Value": lis_T_tl1}, {"Unit": "C","Type": "T-TL1","Comment":"Temperatur T","Value": lis_T_tl1},
{"Unit": "C","Type": "T-TL2 ","Comment":"Temperatur T","Value":lis_T_tl2}, {"Unit": "C","Type": "T-TL2","Comment":"Temperatur T","Value":lis_T_tl2},
{"Unit": "C","Type": "T-TL2 ","Comment":"Temperatur T","Value":lis_T_tl3}, {"Unit": "C","Type": "T-TL2","Comment":"Temperatur T","Value":lis_T_tl3},
{"Unit": "C","Type": "T-TL3 ","Comment":"Temperatur T","Value": lis_T_tl4}], {"Unit": "C","Type": "T-TL3","Comment":"Temperatur T","Value": lis_T_tl4}],
"Pressure": [{"Unit": "DCR","Type": "Offset pressure SRG","Value":lis_p_offs_srg}, "Pressure": [{"Unit": "DCR","Type": "Offset pressure SRG","Value":lis_p_offs_srg},
{"Unit": "DCR","Type": "Fill pressure SRG ","Value":lis_p_fill_srg}, {"Unit": "DCR","Type": "Fill pressure SRG ","Value":lis_p_fill_srg},
{"Unit": "Pa","Type": "Offset pressure 01Torr","Value":lis_p_offs_01}, {"Unit": "Pa","Type": "Offset pressure 01Torr","Value":lis_p_offs_01},
{"Unit": "Pa","Type": "Fill pressure 01Torr","Value":lis_p_fill_01}, {"Unit": "Pa","Type": "Fill pressure 01Torr","Value":lis_p_fill_01},
{"Unit": "bar","Type": "TL1 pressure ","Value":lis_p_ig}], {"Unit": "mbar","Type": "TL1 pressure ","Value":lis_p_ig}],
"Date": [{"Unit": "year-month-day","Type": "Datum ","Value":lis_datum}, "Date": [{"Unit": "year-month-day","Type": "Datum","Value":lis_datum},
{"Unit": "hh:mm:ss","Type": "Messzeit ","Value":lis_time}], {"Unit": "hh:mm:ss","Type": "Messzeit","Value":lis_time}],
"Valve": [{"Unit": "1","Type": "Connection", "Comment":"Connection of the leak" ,"Value":lis_valve}], "Valve": [{"Unit": "1","Type": "Connection", "Comment":"Connection of the leak" ,"Value":lis_valve}],
"Current": [{"Unit": "mbar","Type": "I-TL","Value": lis_I_TL}, "Current": [{"Unit": "mbar","Type": "I-TL","Value": lis_I_TL},
{"Unit": "mbar","Type": "I-FM","Value": lis_I_FM}, {"Unit": "mbar","Type": "I-FM","Value": lis_I_FM},
...@@ -596,18 +598,18 @@ else: ...@@ -596,18 +598,18 @@ else:
print("SRG") print("SRG")
else: else:
doc["Calibration"]["Measurement"]["Values"]={"Temperature": [{"Unit": "C","Type": "T-FM ","Comment":"Temperatur T ","Value": lis_T_fm}, doc["Calibration"]["Measurement"]["Values"]={"Temperature": [{"Unit": "C","Type": "T-FM","Comment":"Temperatur T ","Value": lis_T_fm},
{"Unit": "C","Type": "T-Room","Comment":"Temperatur T","Value": lis_T_room}, {"Unit": "C","Type": "T-Room","Comment":"Temperatur T","Value": lis_T_room},
{"Unit": "C","Type": "T-TL1 ","Comment":"Temperatur T","Value": lis_T_tl1}, {"Unit": "C","Type": "T-TL1","Comment":"Temperatur T","Value": lis_T_tl1},
{"Unit": "C","Type": "T-TL2 ","Comment":"Temperatur T","Value":lis_T_tl2}, {"Unit": "C","Type": "T-TL2","Comment":"Temperatur T","Value":lis_T_tl2},
{"Unit": "C","Type": "T-TL2 ","Comment":"Temperatur T","Value":lis_T_tl3}, {"Unit": "C","Type": "T-TL2","Comment":"Temperatur T","Value":lis_T_tl3},
{"Unit": "C","Type": "T-TL3 ","Comment":"Temperatur T","Value": lis_T_tl4}], {"Unit": "C","Type": "T-TL3","Comment":"Temperatur T","Value": lis_T_tl4}],
"Pressure": [{"Unit": "Pa","Type": "Offset pressure ","Value":lis_p_offs}, "Pressure": [{"Unit": "Pa","Type": "Offset pressure","Value":lis_p_offs},
{"Unit": "Pa","Type": " pressure fill","Value":lis_p_fill}, {"Unit": "Pa","Type": " pressure fill","Value":lis_p_fill},
{"Unit": "bar","Type": "TL1 pressure ","Value":lis_p_ig}], {"Unit": "mbar","Type": "TL1 pressure","Value":lis_p_ig}],
"Date": [{"Unit": "year-month-day","Type": "Datum ","Value":lis_datum}, "Date": [{"Unit": "year-month-day","Type": "Datum","Value":lis_datum},
{"Unit": "hh:mm:ss","Type": "Messzeit ","Value":lis_time}], {"Unit": "hh:mm:ss","Type": "Messzeit","Value":lis_time}],
"Valve": [{"Unit": "1","Type": "Connection", "Comment":"Connection of the leak" ,"Value":lis_valve}], "Valve": [{"Unit": "1","Type": "Connection", "Comment":"Connection of the leak" ,"Value":lis_valve}],
"Current": [{"Unit": "mbar","Type": "I-TL","Value": lis_I_TL}, "Current": [{"Unit": "mbar","Type": "I-TL","Value": lis_I_TL},
{"Unit": "mbar","Type": "I-FM","Value": lis_I_FM}, {"Unit": "mbar","Type": "I-FM","Value": lis_I_FM},
...@@ -617,7 +619,7 @@ else: ...@@ -617,7 +619,7 @@ else:
{"Unit": "dd.mm.yy hh:mm:ss -dd.mm.yy hh:mm:ss","Type": "I-FM","Value": lis_I_FM_time}, {"Unit": "dd.mm.yy hh:mm:ss -dd.mm.yy hh:mm:ss","Type": "I-FM","Value": lis_I_FM_time},
{"Unit": "dd.mm.yy hh:mm:ss -dd.mm.yy hh:mm:ss","Type": "I-Offs","Value": lis_I_Offs_time}] {"Unit": "dd.mm.yy hh:mm:ss -dd.mm.yy hh:mm:ss","Type": "I-Offs","Value": lis_I_Offs_time}]
} }
doc["Calibration"]["Measurement"]["Values"]["Conductance"]={ "C": [{"Unit": "m^3/s","Type": "Constanter Leitwert ","Value": lis_c}]} doc["Calibration"]["Measurement"]["Values"]["Conductance"]={ "C": [{"Unit": "m^3/s","Type": "Constanter Leitwert","Value": lis_c}]}
print("Constanter Leitwert") print("Constanter Leitwert")
...@@ -645,10 +647,10 @@ key_value_offs=dict(zip(def_key_offs, def_value_offs)) ...@@ -645,10 +647,10 @@ key_value_offs=dict(zip(def_key_offs, def_value_offs))
doc["Calibration"]["Measurement"]["AuxValues"]={"ScanQMS": [{"Unit": "Mass","Type": "QMS ","Comment":"Masse ","Value":lis_mass_no}, doc["Calibration"]["Measurement"]["AuxValues"]={"ScanQMS": [{"Unit": "Mass","Type": "QMS","Comment":"Masse ","Value":lis_mass_no},
{"Unit": "mbar","Type": "Current","Comment":"Wert / Masse","Value": lis_mass_value}, {"Unit": "mbar","Type": "Current","Comment":"Wert / Masse","Value": lis_mass_value},
{"Unit": "mbar","Type": "Current Offset","Comment":"Wert / Masse","Value": lis_mass_value_offs}], {"Unit": "mbar","Type": "Current Offset","Comment":"Wert / Masse","Value": lis_mass_value_offs}],
"DefQMS": [{"Type": "Scan QMS ","Value":key_value}, "DefQMS": [{"Type": "Scan QMS","Value":key_value},
{"Type": "Scan Offset QMS","Value": key_value_offs}]} {"Type": "Scan Offset QMS","Value": key_value_offs}]}
......
...@@ -26,7 +26,7 @@ db = couch['vl_db'] # existing ...@@ -26,7 +26,7 @@ db = couch['vl_db'] # existing
cal_cert = "75556" cal_cert = "75586"
year = "2024" year = "2024"
no = "0001" no = "0001"
......
[cert]
cal_cert = 75560
year = 2024
no = 0001
[path]
path=C:\\Users\\becker07\\kalibrierschein\\ks-
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment