Skip to content
Snippets Groups Projects
Commit e94a5588 authored by Eduard Friske's avatar Eduard Friske
Browse files

Proof of Concept mit hart codiertem Pfad

parent 782251cb
No related branches found
No related tags found
No related merge requests found
...@@ -14,11 +14,13 @@ import math ...@@ -14,11 +14,13 @@ import math
import statistics import statistics
import pandas as pd import pandas as pd
import json import json
import couchdb import couchdb
from pathlib import Path
import os
#import pathlib
couch = couchdb.Server('http://a73434.berlin.ptb.de:5984') couch = couchdb.Server('http://a73434.berlin.ptb.de:5984')
db = couch['vl_db'] # existing db = couch['vl_db'] # existing
## Eingabe von: ## Eingabe von:
# - Kalibrierscheinnummer # - Kalibrierscheinnummer
# - Jahr der Kalibrierung # - Jahr der Kalibrierung
...@@ -26,7 +28,7 @@ db = couch['vl_db'] # existing ...@@ -26,7 +28,7 @@ db = couch['vl_db'] # existing
cal_cert = "75556" cal_cert = "75559"
year = "2024" year = "2024"
no = "0001" no = "0001"
...@@ -36,13 +38,25 @@ doc = db.get(json_file) ...@@ -36,13 +38,25 @@ doc = db.get(json_file)
# Die Daten aus dem File mit der entsprechenden Kalibrierscheinnummer werden eingelesen: # Die Daten aus dem File mit der entsprechenden Kalibrierscheinnummer werden eingelesen:
# datum, time, p_up und alle Temperaturen, # datum, time, p_up und alle Temperaturen,
path='C:\\Users\\becker07\\python\\TL2\\' path=Path('/home/friske01/O/Vakuum/Messplaetze/TL2/Messwerte')
datei = path + cal_cert + "PTB" + year
datei_S = path + cal_cert + "PTB" + year + "_S" #print(path.exists())
#datei = path.joinpath(year + ".json")
datei = path.joinpath(cal_cert + "PTB" + year)
#datei = "file://fs.isc.pad.ptb.de/fs/Abt7/Fb75/Vakuum/Messplaetze/TL2/Messwerte/75556PTB2024"
#print(datei, datei.exists(), datei.stat())
datei_S = path.joinpath(cal_cert + "PTB" + year + "_S")
print(json_file) print(json_file)
#exit()
#with smbclient.open_file(datei, mode= 'r') as datei_handle:
datei_pkt = pd.read_csv(datei, sep="\t", decimal = ',' ) datei_pkt = pd.read_csv(datei, sep="\t", decimal = ',' )
print(datei_pkt)
#with smbclient.open_file(datei_S, mode= 'r') as datei_handle:
datei_S_pkt = pd.read_csv(datei_S, sep="\t", decimal = ',' ) datei_S_pkt = pd.read_csv(datei_S, sep="\t", decimal = ',' )
print(datei_S_pkt)
exit()
datum=datei_pkt["Datum"] datum=datei_pkt["Datum"]
time=datei_pkt["Zeit"] time=datei_pkt["Zeit"]
p_up=datei_pkt["Druck"] p_up=datei_pkt["Druck"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment