PlotResults.ipynb
83 lines
| 2.3 KiB
| text/plain
|
TextLexer
In [ ]:
#%matplotlib qt
%matplotlib inline
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = [12,12]
import numpy as np
import pandas as pds
In [ ]:
def try_plot(df,ax,left,right):
try:
df[(df.index >= left) & (df.index <= right)].plot(ax=ax,subplots=True,legend=False)
except:
pass
def make_plots(path="./simulation",left=50e-3,right=100e-3):
inputSig = pds.read_csv(path+"/log_input.txt",index_col=0,delim_whitespace=True,header=None,names=["TSTAMP","BIAS1","BIAS2","BIAS3","BIAS4","BIAS5","B1","B2","B3"])
fXSig=[]
G=[0.89,0.87,0.89]
[fXSig.append(pds.read_csv(
path+"./log_output_f{0}.txt".format(F),index_col=0,delim_whitespace=True,header=None,
names=["TSTAMP","BIAS1","BIAS4","BIAS5","B1","B2","B3"])) for F in range(3) ]
inputSig.index*=5e-9
for F in range(3):
if len(fXSig[F].index):
fXSig[F].index*=5e-9
fXSig[F]/=G[F]
axes=inputSig[(inputSig.index >= left) & (inputSig.index <= right)].filter(["BIAS1","BIAS4","BIAS5","B1","B2","B3"]).plot(subplots=True,layout=(3,2))
[ try_plot(df,axes,left,right) for df in fXSig ]
In [ ]:
make_plots()