use get_rate/get_rm
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user