Delete AnalyzeU180Data.py
This commit is contained in:
parent
ad89540c37
commit
b8e5d96c45
@ -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')
|
|
||||||
Loading…
x
Reference in New Issue
Block a user