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

Removed the BCM correction 15/8

parent 2e148ff6
No related branches found
No related tags found
No related merge requests found
Pipeline #30066 passed
...@@ -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)
......
...@@ -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)
......
{ {
"version": 1, "version": 1,
"header_image": "", "header_image": "",
"allow_edit": false, "allow_edit": true,
"plugins": [], "plugins": [],
"panes": [ "panes": [
{ {
......
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