Skip to content

Commit

Permalink
Merge pull request #1024 from lnls-sirius/update-injctrl
Browse files Browse the repository at this point in the history
Improve InjCtrl IOC
  • Loading branch information
anacso17 authored Sep 15, 2023
2 parents fe6ef6a + 616d693 commit c7468bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions siriuspy/siriuspy/devices/injsys.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,12 @@ def cmd_switch_to_accum(self):
if not self._do_delta_posang(-self.delta_posang):
return False

# configure DpK trigger
if not self.is_trigdpk_onaxis:
delay = self.trigdpk.delay_raw + self.dpkckr_dlyref
if not self._config_dpk_trigger(delayraw=delay):
return False

# set pulsed magnet pwrstate and pulse
proced = (
(self.pudpk.cmd_turn_off_pulse, 'turn DpK pulse off.'),
Expand Down
9 changes: 6 additions & 3 deletions siriuspy/siriuspy/injctrl/bias_feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,23 +250,26 @@ def set_gp_noise_std_fit(self, value):
self.gpmodel.likelihood.variance.unfix()
else:
self.gpmodel.likelihood.variance.fix()
self.run_callbacks('GPModNoiseStdFit-Sts')
self.run_callbacks('GPModNoiseStdFit-Sts', value)
return True

def set_gp_kern_std_fit(self, value):
"""."""
if bool(value):
self.gpmodel.kern.variance.unfix()
else:
self.gpmodel.kern.variance.fix()
self.run_callbacks('GPModKernStdFit-Sts')
self.run_callbacks('GPModKernStdFit-Sts', value)
return True

def set_gp_kern_leng_fit(self, value):
"""."""
if bool(value):
self.gpmodel.kern.lengthscale.unfix()
else:
self.gpmodel.kern.lengthscale.fix()
self.run_callbacks('GPModKernLenSclFit-Sts')
self.run_callbacks('GPModKernLenSclFit-Sts', value)
return True

# ############ Auxiliary Methods ############
def _callback_to_thread(self, **kwgs):
Expand Down

0 comments on commit c7468bc

Please sign in to comment.