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
bb258321
Commit
bb258321
authored
5 years ago
by
Emanuele Laface
Browse files
Options
Downloads
Patches
Plain Diff
Removed the BCM correction 15/8
parent
2e148ff6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#30066
passed
5 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
PythonServer/pos-python-server.py
+2
-4
2 additions, 4 deletions
PythonServer/pos-python-server.py
PythonServer/screens/pos.py
+1
-3
1 addition, 3 deletions
PythonServer/screens/pos.py
WebSites/pvs/dashboard.json
+1
-1
1 addition, 1 deletion
WebSites/pvs/dashboard.json
with
4 additions
and
8 deletions
PythonServer/pos-python-server.py
+
2
−
4
View file @
bb258321
...
@@ -24,8 +24,6 @@ pv_repo = os.environ.get('PV_REPO', 'https://bitbucket.org/europeanspallationsou
...
@@ -24,8 +24,6 @@ pv_repo = os.environ.get('PV_REPO', 'https://bitbucket.org/europeanspallationsou
stop_signal
=
Event
()
stop_signal
=
Event
()
stop_signal
.
clear
()
stop_signal
.
clear
()
bcm_correction
=
15
/
8
try
:
try
:
Repo
.
clone_from
(
pv_repo
,
'
./repo
'
)
Repo
.
clone_from
(
pv_repo
,
'
./repo
'
)
pvfiles
=
glob
(
'
./repo/*.txt
'
)
pvfiles
=
glob
(
'
./repo/*.txt
'
)
...
@@ -128,7 +126,7 @@ class myHandler(BaseHTTPRequestHandler):
...
@@ -128,7 +126,7 @@ class myHandler(BaseHTTPRequestHandler):
try
:
try
:
if
path
[
1
]
==
'
ISrc-010:PBI-BCM-001:AI4-Compressed-Mean
'
:
if
path
[
1
]
==
'
ISrc-010:PBI-BCM-001:AI4-Compressed-Mean
'
:
myPV
=
epics
.
PV
(
'
ISrc-010:PBI-BCM-001:AI4-Compressed
'
,
auto_monitor
=
True
)
myPV
=
epics
.
PV
(
'
ISrc-010:PBI-BCM-001:AI4-Compressed
'
,
auto_monitor
=
True
)
mean_value
=
myPV
.
value
.
mean
()
*
bcm_correction
mean_value
=
myPV
.
value
.
mean
()
tmp_info
=
myPV
.
info
.
split
(
'
\n
'
)
tmp_info
=
myPV
.
info
.
split
(
'
\n
'
)
tmp_info
[
0
]
=
'
== ISrc-010:PBI-BCM-001:AI4-Compressed-Mean (time_double) ==
'
tmp_info
[
0
]
=
'
== ISrc-010:PBI-BCM-001:AI4-Compressed-Mean (time_double) ==
'
tmp_info
[
1
]
=
'
value =
'
+
str
(
mean_value
)
tmp_info
[
1
]
=
'
value =
'
+
str
(
mean_value
)
...
@@ -149,7 +147,7 @@ class myHandler(BaseHTTPRequestHandler):
...
@@ -149,7 +147,7 @@ class myHandler(BaseHTTPRequestHandler):
return
return
if
path
[
1
]
==
'
ISrc-010:PBI-BCM-001:AI4-Compressed-Max
'
:
if
path
[
1
]
==
'
ISrc-010:PBI-BCM-001:AI4-Compressed-Max
'
:
myPV
=
epics
.
PV
(
'
ISrc-010:PBI-BCM-001:AI4-Compressed
'
,
auto_monitor
=
True
)
myPV
=
epics
.
PV
(
'
ISrc-010:PBI-BCM-001:AI4-Compressed
'
,
auto_monitor
=
True
)
max_value
=
myPV
.
value
.
max
()
*
bcm_correction
max_value
=
myPV
.
value
.
max
()
tmp_info
=
myPV
.
info
.
split
(
'
\n
'
)
tmp_info
=
myPV
.
info
.
split
(
'
\n
'
)
tmp_info
[
0
]
=
'
== ISrc-010:PBI-BCM-001:AI4-Compressed-Max (time_double) ==
'
tmp_info
[
0
]
=
'
== ISrc-010:PBI-BCM-001:AI4-Compressed-Max (time_double) ==
'
tmp_info
[
1
]
=
'
value =
'
+
str
(
max_value
)
tmp_info
[
1
]
=
'
value =
'
+
str
(
max_value
)
...
...
This diff is collapsed.
Click to expand it.
PythonServer/screens/pos.py
+
1
−
3
View file @
bb258321
...
@@ -16,8 +16,6 @@ class posScreen(Thread):
...
@@ -16,8 +16,6 @@ class posScreen(Thread):
for
pv
in
pvs
:
for
pv
in
pvs
:
epics_dict
[
pv
]
=
epics
.
PV
(
pv
,
auto_monitor
=
True
)
epics_dict
[
pv
]
=
epics
.
PV
(
pv
,
auto_monitor
=
True
)
bcm_correction
=
15
/
8
while
(
not
self
.
stop_signal
.
isSet
()):
while
(
not
self
.
stop_signal
.
isSet
()):
json_dict
=
{}
json_dict
=
{}
for
pv
in
epics_dict
:
for
pv
in
epics_dict
:
...
@@ -25,7 +23,7 @@ class posScreen(Thread):
...
@@ -25,7 +23,7 @@ class posScreen(Thread):
if
epics_dict
[
pv
].
connected
:
if
epics_dict
[
pv
].
connected
:
json_dict
[
pv
][
'
units
'
]
=
epics_dict
[
pv
].
units
json_dict
[
pv
][
'
units
'
]
=
epics_dict
[
pv
].
units
if
pv
==
'
ISrc-010:PBI-BCM-001:AI4-Compressed
'
:
if
pv
==
'
ISrc-010:PBI-BCM-001:AI4-Compressed
'
:
y_data_array
=
epics_dict
[
pv
].
value
*
bcm_correction
y_data_array
=
epics_dict
[
pv
].
value
y_data
=
list
(
y_data_array
)
y_data
=
list
(
y_data_array
)
x_data_array
=
linspace
(
0
,
12.8
,
len
(
y_data
))
x_data_array
=
linspace
(
0
,
12.8
,
len
(
y_data
))
x_data
=
list
(
x_data_array
)
x_data
=
list
(
x_data_array
)
...
...
This diff is collapsed.
Click to expand it.
WebSites/pvs/dashboard.json
+
1
−
1
View file @
bb258321
{
{
"version"
:
1
,
"version"
:
1
,
"header_image"
:
""
,
"header_image"
:
""
,
"allow_edit"
:
fals
e
,
"allow_edit"
:
tru
e
,
"plugins"
:
[],
"plugins"
:
[],
"panes"
:
[
"panes"
:
[
{
{
...
...
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