Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ess-public-screens
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ics-software
ess-public-screens
Commits
8aec3a52
Commit
8aec3a52
authored
5 years ago
by
Emanuele Laface
Browse files
Options
Downloads
Patches
Plain Diff
Working to add the Doppler
parent
eeef807e
No related branches found
No related tags found
No related merge requests found
Pipeline
#17511
passed
5 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
PythonServer/pos-python-server.py
+29
-1
29 additions, 1 deletion
PythonServer/pos-python-server.py
with
29 additions
and
1 deletion
PythonServer/pos-python-server.py
+
29
−
1
View file @
8aec3a52
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment