From b8e5d96c451e9a5be2ad9555f7cb73883cb3f2c9 Mon Sep 17 00:00:00 2001 From: xans Date: Sun, 5 May 2024 22:45:01 +0200 Subject: [PATCH] Delete AnalyzeU180Data.py --- AnalyzeU180Data.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 AnalyzeU180Data.py diff --git a/AnalyzeU180Data.py b/AnalyzeU180Data.py deleted file mode 100644 index f8a33a4..0000000 --- a/AnalyzeU180Data.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -import json -import time -import csv -import GPIBPrologix -import pandas as pd -from plotly.subplots import make_subplots -import plotly.graph_objects as go -from datetime import datetime -import numpy - -def readRunningConfigs(): - searchPath = os.path.realpath(os.path.dirname(__file__))+'/RunningConfigs/' - filenames = next(os.walk(searchPath), (None, None, []))[2] - filenames = [item for item in filenames if str.endswith(item,'.json')] - return filenames - -for file in readRunningConfigs(): - dataPath = os.path.realpath(os.path.dirname(__file__))+'/RunningConfigs/'+file - with open(dataPath, "r") as read_file: - configData = json.load(read_file) - serialPath = os.path.realpath(os.path.dirname(__file__))+'/data/'+configData['serial']+'/' - df = pd.read_csv(serialPath+configData['serial']+'.csv') - - time_x = pd.to_datetime(df['DateTime'],format='%d-%m-%y %H:%M:%S') - coefficients = numpy.polyfit(df['TEMP'], df['G10V'], 1, rcond=None, full=False, w=None, cov=False) - polynomial = numpy.poly1d(coefficients) - - fig = make_subplots(rows=1, cols=2) - fig.add_trace(go.Scatter(x=time_x, y=df['G10V']-polynomial(df['TEMP']),mode='lines+markers',name='time vs cal72 w tempcomp'),row=1, col=1) - fig.add_trace(go.Scatter(x=df['TEMP'], y=df['G10V'],mode='lines+markers',name='temp vs cal72'),row=1, col=2) - fig.write_html(serialPath+configData['serial']+'.html') \ No newline at end of file