def do_set_autoupdate_interval(self, val): self._autoupdate_interval = val from qtflow import get_flowcontrol get_flowcontrol().remove_callback(self._autoupdater_handle, warn_if_nonexistent=False) if self._autoupdate_interval != None and self._autoupdate_interval > 0: if self._logger == None: logging.warn('You have enabled auto-updating, but not log file writing, which is a bit odd.') get_flowcontrol().register_callback(int(np.ceil(1e3 * self._autoupdate_interval)), self.__query_auto_updated_quantities, handle=self._autoupdater_handle)
def __init__(self, function, timeout=1, idle_mintime=1, timeout_mode=True, idle_mode=False, start=True): self._function = function self._flow = get_flowcontrol() self._timeout_mode = timeout_mode self._idle_mode = idle_mode ## IDLE SPECIFIC INIT self._idle_hid = None self._idle_mintime = idle_mintime self._idle_lasttime = 0 ## TIMEOUT SPECIFIC INIT self._timer_hid = None self._mstart_hid = None self._mend_hid = None self._timeout = timeout if start is True: self.start()
import sys from qtflow import get_flowcontrol from instruments import get_instruments from lib import config as _config from data import Data from scripts import Scripts, Script config = _config.get_config() data = Data.get_named_list() instruments = get_instruments() frontpanels = {} sliders = {} scripts = Scripts() flow = get_flowcontrol() msleep = flow.measurement_idle mstart = flow.measurement_start mend = flow.measurement_end def version(): version_file = os.path.join(config['execdir'], 'VERSION') try: f = file(version_file,'r') str = f.readline() str = str.rstrip('\n\r') f.close() except: str = 'NO VERSION FILE' return str
from qtflow import get_flowcontrol from qtlab.source.instruments import get_instruments from lib import config as _config from data import Data # from plot import Plot, plot, plot3, replot_all from scripts import Scripts, Script config = _config.get_config() data = Data.get_named_list() instruments = get_instruments() frontpanels = {} sliders = {} scripts = Scripts() flow = get_flowcontrol() msleep = flow.measurement_idle mstart = flow.measurement_start mend = flow.measurement_end # from plot import Plot2D, Plot3D # try: # from plot import plot_file # except: # pass # plots = Plot.get_named_list() def version(): version_file = os.path.join(config['execdir'], 'VERSION')