diff --git a/slic/gui/daqpanels/run.py b/slic/gui/daqpanels/run.py index f61939e8..229efe0c 100644 --- a/slic/gui/daqpanels/run.py +++ b/slic/gui/daqpanels/run.py @@ -4,7 +4,7 @@ from slic.utils import printed_exception from slic.utils.reprate import get_pvname_reprate from ..widgets import STRETCH, TwoButtons, LabeledMathEntry, LabeledFilenameEntry, make_filled_vbox, post_event -from .tools import ETADisplay, correct_n_pulses, NOMINAL_REPRATE, run +from .tools import ETADisplay, correct_n_pulses, run class RunPanel(wx.Panel): @@ -69,8 +69,8 @@ class RunPanel(wx.Panel): n_pulses = self.le_npulses.GetValue() n_pulses = int(n_pulses) - rate = self.eta.value if self.config.is_checked_correct_by_rate() else NOMINAL_REPRATE - rm = self.acquisition.client.config.rate_multiplicator if self.config.is_checked_correct_by_rm() else 1 + rate = self.config.get_rate() + rm = self.config.get_rm() n_pulses = correct_n_pulses(n_pulses, rate, rm) continuous = self.cb_contin.IsChecked() diff --git a/slic/gui/daqpanels/scan.py b/slic/gui/daqpanels/scan.py index 3144fcb1..76435dae 100644 --- a/slic/gui/daqpanels/scan.py +++ b/slic/gui/daqpanels/scan.py @@ -4,7 +4,7 @@ from slic.utils import nice_arange, printed_exception from slic.utils.reprate import get_pvname_reprate from ..widgets import STRETCH, TwoButtons, StepsRangeEntry, LabeledMathEntry, LabeledFilenameEntry, make_filled_vbox, post_event -from .tools import AdjustableSelection, ETADisplay, correct_n_pulses, NOMINAL_REPRATE, run +from .tools import AdjustableSelection, ETADisplay, correct_n_pulses, run class ScanPanel(wx.Panel): @@ -76,8 +76,8 @@ class ScanPanel(wx.Panel): n_repeat = self.le_nrepeat.GetValue() n_repeat = int(n_repeat) - rate = self.eta.value if self.config.is_checked_correct_by_rate() else NOMINAL_REPRATE - rm = self.acquisition.client.config.rate_multiplicator if self.config.is_checked_correct_by_rm() else 1 + rate = self.config.get_rate() + rm = self.config.get_rm() n_pulses = correct_n_pulses(n_pulses, rate, rm) relative = self.cb_relative.GetValue() diff --git a/slic/gui/daqpanels/scan2d.py b/slic/gui/daqpanels/scan2d.py index e1f0e0ba..2a951c1d 100644 --- a/slic/gui/daqpanels/scan2d.py +++ b/slic/gui/daqpanels/scan2d.py @@ -4,7 +4,7 @@ from slic.utils import nice_arange, printed_exception from slic.utils.reprate import get_pvname_reprate from ..widgets import EXPANDING, MINIMIZED, STRETCH, TwoButtons, StepsRangeEntry, LabeledMathEntry, LabeledFilenameEntry, make_filled_vbox, post_event -from .tools import AdjustableSelection, ETADisplay, correct_n_pulses, NOMINAL_REPRATE, run +from .tools import AdjustableSelection, ETADisplay, correct_n_pulses, run class Scan2DPanel(wx.Panel): @@ -65,8 +65,8 @@ class Scan2DPanel(wx.Panel): n_repeat = self.le_nrepeat.GetValue() n_repeat = int(n_repeat) - rate = self.eta.value if self.config.is_checked_correct_by_rate() else NOMINAL_REPRATE - rm = self.acquisition.client.config.rate_multiplicator if self.config.is_checked_correct_by_rm() else 1 + rate = self.config.get_rate() + rm = self.config.get_rm() n_pulses = correct_n_pulses(n_pulses, rate, rm) relative1 = self.adjbox1.cb_relative.GetValue() diff --git a/slic/gui/daqpanels/sfx.py b/slic/gui/daqpanels/sfx.py index af4a8796..5f2981ab 100644 --- a/slic/gui/daqpanels/sfx.py +++ b/slic/gui/daqpanels/sfx.py @@ -5,7 +5,7 @@ from slic.utils import printed_exception from slic.utils.reprate import get_pvname_reprate from ..widgets import STRETCH, TwoButtons, LabeledMathEntry, LabeledFilenameEntry, make_filled_vbox, post_event -from .tools import ETADisplay, correct_n_pulses, NOMINAL_REPRATE, run +from .tools import ETADisplay, correct_n_pulses, run from ..widgets.labeled import make_labeled from ..persist import PersistableWidget @@ -97,8 +97,8 @@ class SFXPanel(wx.Panel): n_pulses = self.le_npulses.GetValue() n_pulses = int(n_pulses) - rate = self.eta.value if self.config.is_checked_correct_by_rate() else NOMINAL_REPRATE - rm = self.acquisition.client.config.rate_multiplicator if self.config.is_checked_correct_by_rm() else 1 + rate = self.config.get_rate() + rm = self.config.get_rm() n_pulses = correct_n_pulses(n_pulses, rate, rm) continuous = self.cb_contin.IsChecked() diff --git a/slic/gui/daqpanels/special.py b/slic/gui/daqpanels/special.py index e6bc9320..154feb21 100644 --- a/slic/gui/daqpanels/special.py +++ b/slic/gui/daqpanels/special.py @@ -5,7 +5,7 @@ from slic.utils.reprate import get_pvname_reprate from ..widgets import LabeledMathEntry, LabeledEntry, LabeledFilenameEntry, LabeledValuesEntry, TwoButtons, make_filled_hbox, make_filled_vbox, STRETCH, EXPANDING from ..persist import PersistableWidget -from .tools import AdjustableSelection, ETADisplay, correct_n_pulses, NOMINAL_REPRATE, run, post_event +from .tools import AdjustableSelection, ETADisplay, correct_n_pulses, run, post_event class SpecialScanPanel(wx.Panel): @@ -95,8 +95,8 @@ class SpecialScanPanel(wx.Panel): n_repeat = self.le_nrepeat.GetValue() n_repeat = int(n_repeat) - rate = self.eta.value if self.config.is_checked_correct_by_rate() else NOMINAL_REPRATE - rm = self.acquisition.client.config.rate_multiplicator if self.config.is_checked_correct_by_rm() else 1 + rate = self.config.get_rate() + rm = self.config.get_rm() n_pulses = correct_n_pulses(n_pulses, rate, rm) relative = self.cb_relative.GetValue() diff --git a/slic/gui/daqpanels/static.py b/slic/gui/daqpanels/static.py index 7b186a79..56d53c57 100644 --- a/slic/gui/daqpanels/static.py +++ b/slic/gui/daqpanels/static.py @@ -4,7 +4,7 @@ from slic.utils import printed_exception from slic.utils.reprate import get_pvname_reprate from ..widgets import STRETCH, TwoButtons, LabeledMathEntry, LabeledFilenameEntry, make_filled_vbox, post_event -from .tools import ETADisplay, correct_n_pulses, NOMINAL_REPRATE, run +from .tools import ETADisplay, correct_n_pulses, run class StaticPanel(wx.Panel): @@ -53,8 +53,8 @@ class StaticPanel(wx.Panel): n_repeat = self.le_nrepeat.GetValue() n_repeat = int(n_repeat) - rate = self.eta.value if self.config.is_checked_correct_by_rate() else NOMINAL_REPRATE - rm = self.acquisition.client.config.rate_multiplicator if self.config.is_checked_correct_by_rm() else 1 + rate = self.config.get_rate() + rm = self.config.get_rm() n_pulses = correct_n_pulses(n_pulses, rate, rm) self.task = self.acquisition.acquire(filename, n_pulses=n_pulses, n_repeat=n_repeat, wait=False)