Update Code/HoseiPlot.py
This commit is contained in:
parent
cbf19fe651
commit
951f8df5cf
@ -161,27 +161,28 @@ if minMaxEqual:
|
|||||||
# not implemented as of yet
|
# not implemented as of yet
|
||||||
print("not implemented")
|
print("not implemented")
|
||||||
else:
|
else:
|
||||||
# postive part of INL
|
# postive part of INL
|
||||||
correctionfactors[0] = df.loc[df['SetVolts'] == 2]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == 0]["DutToRefVolts"].iloc[0]
|
correctionfactors[0] = (df.loc[df['SetVolts'] == 0]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == 2]["DutToRefVolts"].iloc[0])/2
|
||||||
correctionfactors[1] = df.loc[df['SetVolts'] == 4]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == 2]["DutToRefVolts"].iloc[0]
|
correctionfactors[1] = (df.loc[df['SetVolts'] == 2]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == 4]["DutToRefVolts"].iloc[0])/2
|
||||||
correctionfactors[2] = df.loc[df['SetVolts'] == 6]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == 4]["DutToRefVolts"].iloc[0]
|
correctionfactors[2] = (df.loc[df['SetVolts'] == 4]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == 6]["DutToRefVolts"].iloc[0])/2
|
||||||
correctionfactors[3] = df.loc[df['SetVolts'] == 8]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == 6]["DutToRefVolts"].iloc[0]
|
correctionfactors[3] = (df.loc[df['SetVolts'] == 6]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == 8]["DutToRefVolts"].iloc[0])/2
|
||||||
correctionfactors[4] = df.loc[df['SetVolts'] == 10]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == 8]["DutToRefVolts"].iloc[0]
|
correctionfactors[4] = (df.loc[df['SetVolts'] == 8]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == 10]["DutToRefVolts"].iloc[0])/2
|
||||||
# negative part of INL
|
# negative part of INL
|
||||||
correctionfactors[5] = df.loc[df['SetVolts'] == -0.02]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == 0]["DutToRefVolts"].iloc[0]
|
minusRangeScaling = df.loc[df['SetVolts'] == -10]["DutToRefVolts"].iloc[0]/10
|
||||||
correctionfactors[6] = df.loc[df['SetVolts'] == -0.04]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -0.02]["DutToRefVolts"].iloc[0]
|
df["DutToRefVolts"] = df["DutToRefVolts"]-minusRangeScaling*-df["SetVolts"]
|
||||||
correctionfactors[7] = df.loc[df['SetVolts'] == -0.06]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -0.04]["DutToRefVolts"].iloc[0]
|
correctionfactors[5] = (df.loc[df['SetVolts'] == -0.02]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == 0]["DutToRefVolts"].iloc[0])/0.02
|
||||||
correctionfactors[8] = df.loc[df['SetVolts'] == -0.08]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -0.06]["DutToRefVolts"].iloc[0]
|
correctionfactors[6] = (df.loc[df['SetVolts'] == -0.04]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -0.02]["DutToRefVolts"].iloc[0])/0.02
|
||||||
correctionfactors[9] = df.loc[df['SetVolts'] == -0.1]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -0.08]["DutToRefVolts"].iloc[0]
|
correctionfactors[7] = (df.loc[df['SetVolts'] == -0.06]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -0.04]["DutToRefVolts"].iloc[0])/0.02
|
||||||
correctionfactors[10] = df.loc[df['SetVolts'] == -2]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -0.1]["DutToRefVolts"].iloc[0]
|
correctionfactors[8] = (df.loc[df['SetVolts'] == -0.08]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -0.06]["DutToRefVolts"].iloc[0])/0.02
|
||||||
correctionfactors[11] = df.loc[df['SetVolts'] == -4]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -2]["DutToRefVolts"].iloc[0]
|
correctionfactors[9] = (df.loc[df['SetVolts'] == -0.1]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -0.08]["DutToRefVolts"].iloc[0])/0.02
|
||||||
correctionfactors[12] = df.loc[df['SetVolts'] == -6]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -4]["DutToRefVolts"].iloc[0]
|
correctionfactors[10] = (df.loc[df['SetVolts'] == -2]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -0.1]["DutToRefVolts"].iloc[0])/1.9
|
||||||
correctionfactors[13] = df.loc[df['SetVolts'] == -8]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -6]["DutToRefVolts"].iloc[0]
|
correctionfactors[11] = (df.loc[df['SetVolts'] == -4]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -2]["DutToRefVolts"].iloc[0])/2
|
||||||
correctionfactors[14] = df.loc[df['SetVolts'] == -10]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -8]["DutToRefVolts"].iloc[0]
|
correctionfactors[12] = (df.loc[df['SetVolts'] == -6]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -4]["DutToRefVolts"].iloc[0])/2
|
||||||
|
correctionfactors[13] = (df.loc[df['SetVolts'] == -8]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -6]["DutToRefVolts"].iloc[0])/2
|
||||||
|
correctionfactors[14] = (df.loc[df['SetVolts'] == -10]["DutToRefVolts"].iloc[0] - df.loc[df['SetVolts'] == -8]["DutToRefVolts"].iloc[0])/2
|
||||||
|
# negative 10v voltage reversal alpha error for faster measurements
|
||||||
|
correctionfactors[15] = 1+minusRangeScaling
|
||||||
# negative 10v voltage reversal alpha error for faster measurements
|
# negative 10v voltage reversal alpha error for faster measurements
|
||||||
df = pd.read_csv(basePath+"/data.csv")
|
|
||||||
correctionfactors[15] = df.loc[df['SetVolts'] == -10]["DutVolts"].iloc[0]/df.loc[df['SetVolts'] == 10]["DutVolts"].iloc[0]
|
|
||||||
print(correctionfactors)
|
|
||||||
|
|
||||||
## Make plot and save
|
## Make plot and save
|
||||||
fig.write_image('inl_evaluation_plots.png',width=720, height=1280)
|
fig.write_image('inl_evaluation_plots.png',width=720, height=1280)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user