Skip to content
Snippets Groups Projects
Commit 8aec3a52 authored by Emanuele Laface's avatar Emanuele Laface
Browse files

Working to add the Doppler

parent eeef807e
No related branches found
No related tags found
No related merge requests found
Pipeline #17511 passed
......@@ -7,7 +7,7 @@ import matplotlib.pyplot as plt
from git import Repo
from shutil import rmtree
from glob import glob
from numpy import linspace, array, zeros, flip, rot90
from numpy import linspace, array, zeros, flip, rot90, tile
from http.server import BaseHTTPRequestHandler,HTTPServer
from epicsarchiver import ArchiverAppliance
from threading import Thread, Event
......@@ -150,6 +150,15 @@ class epicsQuery(Thread):
instruments['LNS-ISRC-010:PBI-EMH:BUFF-CURRENT']=epics.PV('LNS-ISRC-010:PBI-EMH:BUFF-CURRENT', auto_monitor=True)
instruments['LNS-ISRC-010:PBI-EMH:MTR.NPTS']=epics.PV('LNS-ISRC-010:PBI-EMH:MTR.NPTS', auto_monitor=True)
instruments['LNS-ISRC-010:PBI-EMH:PS.NPTS']=epics.PV('LNS-ISRC-010:PBI-EMH:PS.NPTS', auto_monitor=True)
instruments['LEBT-010:PBI-Dpl-001:IMG1-ArrayData']=epics.PV('LEBT-010:PBI-Dpl-001:IMG1-ArrayData', auto_monitor=True)
instruments['LEBT-010:PBI-Dpl-001:FIT1-Y_RBV']=epics.PV('LEBT-010:PBI-Dpl-001:FIT1-Y_RBV', auto_monitor=True)
instruments['LEBT-010:PBI-Dpl-001:SPECT-MinWavelength']=epics.PV('LEBT-010:PBI-Dpl-001:SPECT-MinWavelength', auto_monitor=True)
instruments['LEBT-010:PBI-Dpl-001:SPECT-Wavelength_RBV']=epics.PV('LEBT-010:PBI-Dpl-001:SPECT-Wavelength_RBV', auto_monitor=True)
instruments['LEBT-010:PBI-Dpl-001:SPECT-MaxWavelength']=epics.PV('LEBT-010:PBI-Dpl-001:SPECT-MaxWavelength', auto_monitor=True)
instruments['LEBT-010:PBI-Dpl-001:FIT1-FracProton']=epics.PV('LEBT-010:PBI-Dpl-001:FIT1-FracProton', auto_monitor=True)
instruments['LEBT-010:PBI-Dpl-001:FIT1-FracH2']=epics.PV('LEBT-010:PBI-Dpl-001:FIT1-FracH2', auto_monitor=True)
instruments['LEBT-010:PBI-Dpl-001:FIT1-FracH3']=epics.PV('LEBT-010:PBI-Dpl-001:FIT1-FracH3', auto_monitor=True)
print('Done')
while(not self.stop_signal.isSet()):
publicpvs_return_dict={}
......@@ -349,6 +358,25 @@ class epicsQuery(Thread):
instruments_return_dict[pv]['units']='n.c.'
instruments_return_dict[pv]['value']=''
continue
try:
if instruments['LEBT-010:PBI-Dpl-001:IMG1-ArrayData'].connected:
imarray = tile(instruments['LEBT-010:PBI-Dpl-001:IMG1-ArrayData'].value, (256,1))
else:
imarray = zeros((256,1024))
except:
imarray = zeros((256,1024))
plt.imsave('/var/www/data/tmp-dpl.png', imarray, cmap='hot')
os.rename('/var/www/data/tmp-dpl.png', '/var/www/data/dpl.png')
# instruments['LEBT-010:PBI-Dpl-001:FIT1-Y_RBV']=epics.PV('LEBT-010:PBI-Dpl-001:FIT1-Y_RBV', auto_monitor=True)
# instruments['LEBT-010:PBI-Dpl-001:SPECT-MinWavelength']=epics.PV('LEBT-010:PBI-Dpl-001:SPECT-MinWavelength', auto_monitor=True)
# instruments['LEBT-010:PBI-Dpl-001:SPECT-Wavelength_RBV']=epics.PV('LEBT-010:PBI-Dpl-001:SPECT-Wavelength_RBV', auto_monitor=True)
# instruments['LEBT-010:PBI-Dpl-001:SPECT-MaxWavelength']=epics.PV('LEBT-010:PBI-Dpl-001:SPECT-MaxWavelength', auto_monitor=True)
# instruments['LEBT-010:PBI-Dpl-001:FIT1-FracProton']=epics.PV('LEBT-010:PBI-Dpl-001:FIT1-FracProton', auto_monitor=True)
# instruments['LEBT-010:PBI-Dpl-001:FIT1-FracH2']=epics.PV('LEBT-010:PBI-Dpl-001:FIT1-FracH2', auto_monitor=True)
# instruments['LEBT-010:PBI-Dpl-001:FIT1-FracH3']=epics.PV('LEBT-010:PBI-Dpl-001:FIT1-FracH3', auto_monitor=True)
if instruments[pv].count>1 or instruments[pv].count==0:
continue
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment