forked from optics/eib700
update EIB.adl
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
../iocBoot/ioceib/Mittwoch2_1.png
|
||||
../configure/O.linux-x86_64/
|
||||
../db/*
|
||||
src/O.Common/
|
||||
src/O.linux-x86_64/
|
||||
Db/O.linux-x86_64/
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *db*))
|
||||
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Db*))
|
||||
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *adl*))
|
||||
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *lib64*))
|
||||
#DIRS := $(DIRS) ../iocBoot/ioceib/
|
||||
|
||||
include $(TOP)/configure/RULES_DIRS
|
||||
|
||||
|
||||
+524
-472
File diff suppressed because it is too large
Load Diff
+1401
-2310
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,8 @@
|
||||
TOP=../..
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
#include $(TOP)/iocBoot/ioceib/Makefile
|
||||
|
||||
all: install
|
||||
|
||||
install: EIB.adl EIB_ext.adl STATUS.adl RON.adl start
|
||||
|
||||
@@ -79,10 +79,7 @@ class ReadData:
|
||||
self.adc90 = []
|
||||
self.status = []
|
||||
self.phi = []
|
||||
# for x in range(0, 33):
|
||||
# line = f.readline()
|
||||
# line = line.strip()
|
||||
# print(repr(line))
|
||||
|
||||
line = f.readline()
|
||||
line = line.strip()
|
||||
|
||||
@@ -146,8 +143,6 @@ class ReadData:
|
||||
# Arkustangens fuer skalare Werte x,y
|
||||
# Wenn ich das fuer ganze Arrays haben will, muss ich Atan nehmen, s.u.
|
||||
def atan( x, y):
|
||||
|
||||
|
||||
|
||||
if (y == 0):
|
||||
if (x > 0):
|
||||
@@ -160,8 +155,7 @@ def atan( x, y):
|
||||
return (0.5 * np.pi)
|
||||
else:
|
||||
return 1.5 * np.pi
|
||||
|
||||
|
||||
|
||||
h = np.arctan(y / x);
|
||||
# print("arctan = ",h)
|
||||
|
||||
@@ -201,6 +195,7 @@ def Atan (x ,y):
|
||||
|
||||
#------------- How does EIB calculate the fractional part ?--------------------------
|
||||
# calculate the fractional part from Analog signals to get the same values as EIB.
|
||||
# result is in the range [0 ... 1]
|
||||
# die adc90 / adc00 - Werte sind immer positiv , Seite 15:
|
||||
# 0x000 = Negatives Maximum
|
||||
# 0x800 = 0
|
||||
@@ -243,8 +238,9 @@ else:
|
||||
#F=ReadData('X07MA2.dat')
|
||||
#F=ReadData('X07MA3.dat')
|
||||
#F=ReadData('X07MA4.dat')
|
||||
F=ReadData('Freitag1.dat')
|
||||
F=ReadData('Mittwoch3.dat')
|
||||
# F=ReadData('Freitag1.dat')
|
||||
# F=ReadData('Mittwoch3.dat')
|
||||
F=ReadData('Mittwoch_3a.dat')
|
||||
|
||||
# v=np.where( (F.adc00!=0) | (F.adc90!=0) )
|
||||
|
||||
@@ -313,7 +309,7 @@ ylim4=[-0.05,+0.05] # correction
|
||||
|
||||
|
||||
|
||||
#----------------------------- f i g u r e 1 ---------- Analog00 vs. Analog90 ---------------
|
||||
#----------------------------- P l o t 1 ---------- Analog00 vs. Analog90 ---------------
|
||||
|
||||
fig1=plt.figure(1, figsize=[16, 12], tight_layout=True) #
|
||||
|
||||
@@ -322,8 +318,6 @@ ax2 = plt.subplot2grid(( 9, 8), (1, 0), rowspan=4, colspan=4) # rechts oben
|
||||
ax3 = plt.subplot2grid(( 9, 8), (5, 0), rowspan=4, colspan=4) # links unten
|
||||
ax4 = plt.subplot2grid(( 9, 8), (5, 4), rowspan=4, colspan=4) # links unten
|
||||
|
||||
#ax1 = myAxis(fig1)
|
||||
|
||||
ax1.scatter(F.adc00[start:stop], F.adc90[start:stop] , color='blue', label='measured')
|
||||
|
||||
ax1.set_xlabel("analog90" )
|
||||
@@ -371,13 +365,11 @@ diff[i]=diff[i]+1
|
||||
#------------ plot the fractional part determined by EIB700, my caluclation and the korrected value -----------
|
||||
|
||||
pts = np.arange(0,F.adc00.size,1)
|
||||
|
||||
#----------------------------- f i g u r e 2 ---------- Fractional part ---------------
|
||||
|
||||
#-------- top left ----------- P l o t 2 ---------- Fractional part ---------------
|
||||
|
||||
figure2=True
|
||||
if figure2 :
|
||||
# fig2 = myfigure()
|
||||
# ax2 = myAxis(fig2)
|
||||
|
||||
ax2.scatter (pts[start:stop], F.interpol[start:stop] / 4095, color = 'green', label='EIB700' ) # from EIB
|
||||
ax2.plot (pts[start:stop], frac[start:stop] , color = 'blue', lw=1, label='My Calc' ) # my calcualation
|
||||
@@ -389,16 +381,13 @@ if figure2 :
|
||||
ax2.grid()
|
||||
|
||||
|
||||
#----------------------------- f i g u r e 3 -------------- Correction 1 -----------
|
||||
#-----bottom left ----------------- P l o t 3 -------------- Correction 1 -----------
|
||||
|
||||
#------------ plot difference, i.e. the necessary correction for each data point
|
||||
|
||||
figure3=True
|
||||
if figure3 :
|
||||
|
||||
# fig3 = myfigure()
|
||||
# ax3 = myAxis(fig3)
|
||||
|
||||
ax3.scatter(pts[start:stop],diff[start:stop], color='green', label="diff",)
|
||||
ax3.legend()
|
||||
ax3.set_xlabel("Data point #")
|
||||
@@ -425,11 +414,9 @@ C[j]=C[j]+1
|
||||
|
||||
figure4=True
|
||||
if figure4 :
|
||||
#----------------------------- f i g u r e 4 -----------------------------------
|
||||
#--------bottom right ---------- P l o t 4 -----------------------------------
|
||||
|
||||
PowerPoint_style
|
||||
# fig4 = myfigure()
|
||||
# ax4 = myAxis(fig4)
|
||||
|
||||
ax4.scatter(frack[start:stop],diff[start:stop], color='green', label="correction")
|
||||
|
||||
@@ -442,13 +429,16 @@ if figure4 :
|
||||
ax4.set_xlim(0,1)
|
||||
ax4.set_ylim(ylim4)
|
||||
|
||||
#----------------------------- f i g u r e 5 -----------------------------------
|
||||
figure5=False
|
||||
#----------------------------- f i g u r e 2 -----------------------------------
|
||||
figure5=True
|
||||
if figure5 :
|
||||
|
||||
fig5 = myfigure()
|
||||
ax5 = myAxis(fig5)
|
||||
ax5.grid()
|
||||
ax5.plot(index/index.size,C)
|
||||
ax5.set_xlabel("measured frac. part")
|
||||
ax5.set_ylabel("correction")
|
||||
|
||||
#ax6.set_xlim(0,1)
|
||||
|
||||
|
||||
@@ -3,3 +3,12 @@ include $(TOP)/configure/CONFIG
|
||||
ARCH = linux-x86_64
|
||||
TARGETS = envPaths
|
||||
include $(TOP)/configure/RULES.ioc
|
||||
|
||||
|
||||
all: install
|
||||
|
||||
install: st.cmd
|
||||
cp EIB.CFG $(INSTALL_LOCATION)/iocBoot/ioceib/
|
||||
cp st.cmd $(INSTALL_LOCATION)/iocBoot/ioceib/
|
||||
cp do_Hey $(INSTALL_LOCATION)/iocBoot/ioceib/
|
||||
cp Heydemann.py $(INSTALL_LOCATION)/iocBoot/ioceib/
|
||||
|
||||
Reference in New Issue
Block a user