Skip to content

Commit 2f66d7b

Browse files
Merge pull request #10 from thompsonte-4o2/main
PV name and readback adjustments
2 parents 21226d2 + 4c62461 commit 2f66d7b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tests/btf_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def va_process():
2525
def test_pv_connection(va_process):
2626

2727
assert va_process.poll() is None
28-
x = caget('ITSF_Diag:BPM04:xAvg', connection_timeout=0.1)
28+
x = caget('ITSF_Diag:BPM04_4:xAvg', connection_timeout=0.1)
2929
assert x is not None
3030

3131

@@ -39,7 +39,7 @@ def test_bad_pv(va_process):
3939
def test_corrector(va_process):
4040
corrector = "BTF_MEBT_Mag:DCH00:B"
4141
corrector_set = "BTF_MEBT_Mag:PS_DCH00:I_Set"
42-
bpm_device = "ITSF_Diag:BPM04:xAvg"
42+
bpm_device = "ITSF_Diag:BPM04_4:xAvg"
4343

4444
original_val = caget(corrector_set)
4545
settings = [(0.0, -0.03, 0.0),

virtaccl/site/BTF/btf_config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
}
282282
},
283283
"BPM": {
284-
"ITSF_Diag:BPM04": {
284+
"ITSF_Diag:BPM04_4": {
285285
"PyORBIT_Name": "MEBT:BPM04",
286286
"Frequency": 805000000.0
287287
}
@@ -382,7 +382,7 @@
382382
}
383383
},
384384
"BS": {
385-
"ITSF_Diag:BS36": {
385+
"ITSF_Diag:BS36_LP": {
386386
"PyORBIT_Name": "MEBT:BS36",
387387
"State": 1
388388
},

virtaccl/site/BTF/orbit_model/virtual_devices_BTF.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class BTF_FC(Device):
182182
current_pv = 'CurrentAvrGt' # [mA]
183183
state_set_pv = 'State_Set'
184184
state_readback_pv = 'State'
185-
current_noise = 7e-2
185+
current_noise = -7e-2
186186

187187
#PyORBIT parameter keys
188188
current_key = 'current'
@@ -224,7 +224,7 @@ def update_measurements(self, new_params: Dict[str, Dict[str, Any]] = None):
224224

225225
if current_state == 1:
226226
fc_params = new_params[self.model_name]
227-
current = fc_params[BTF_FC.current_key]
227+
current = -1.0*fc_params[BTF_FC.current_key]
228228
else:
229229
current = 0
230230
self.update_measurement(BTF_FC.current_pv, current)
@@ -233,7 +233,7 @@ def update_measurements(self, new_params: Dict[str, Dict[str, Any]] = None):
233233
class BTF_BCM(Device):
234234
#EPICS PV names
235235
current_pv = 'CurrentAvrGt' # [mA]
236-
current_noise = 7e-2
236+
current_noise = -7e-2
237237

238238
#PyORBIT parameter keys
239239
current_key = 'current'
@@ -257,7 +257,7 @@ def __init__(self, name: str, model_name: str = None):
257257
# This is where the measurement PV name is associated with it's model key.
258258
def update_measurements(self, new_params: Dict[str, Dict[str, Any]] = None):
259259
bcm_params = new_params[self.model_name]
260-
current = bcm_params[BTF_BCM.current_key]
260+
current = -1.0*bcm_params[BTF_BCM.current_key]
261261
self.update_measurement(BTF_BCM.current_pv, current)
262262

263263
class BTF_Quadrupole(Device):

0 commit comments

Comments
 (0)