Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions virtaccl/site/BTF/orbit_model/virtual_devices_BTF.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,15 @@ def update_readbacks(self):
class BTF_Quadrupole_Power_Supply(Device):
current_set_pv = 'I_Set' # [Amps]
current_readback_pv = 'I' # [Amps]
current_noise = 1e-6 # [Amps]

def __init__(self, name: str, init_current=None):
super().__init__(name)

field_noise = AbsNoise(noise=1e-6)
current_noise = AbsNoise(noise=BTF_Quadrupole_Power_Supply.current_noise)

self.register_setting(BTF_Quadrupole_Power_Supply.current_set_pv, default=init_current)
self.register_readback(BTF_Quadrupole_Power_Supply.current_readback_pv, BTF_Quadrupole_Power_Supply.current_set_pv)
self.register_readback(BTF_Quadrupole_Power_Supply.current_readback_pv, BTF_Quadrupole_Power_Supply.current_set_pv,noise=current_noise)

class BTF_Corrector(Device):
# EPICS PV names
Expand Down Expand Up @@ -370,12 +371,13 @@ def update_readbacks(self):
class BTF_Corrector_Power_Supply(Device):
current_set_pv = 'I_Set' # [Amps]
current_readback_pv = 'I' # [Amps]
current_noise = 1e-6 # [A]

def __init__(self, name: str, init_current=None):
super().__init__(name)

field_noise = AbsNoise(noise=1e-6)
current_noise = AbsNoise(noise=BTF_Corrector_Power_Supply.current_noise)

self.register_setting(BTF_Corrector_Power_Supply.current_set_pv, default=init_current)
self.register_readback(BTF_Corrector_Power_Supply.current_readback_pv, BTF_Corrector_Power_Supply.current_set_pv)
self.register_readback(BTF_Corrector_Power_Supply.current_readback_pv, BTF_Corrector_Power_Supply.current_set_pv, noise=current_noise)