diff --git a/examples/bias10-LSSTTD-1575.cfg b/examples/bias10-LSSTTD-1575.cfg new file mode 100644 index 0000000..c6ec9fb --- /dev/null +++ b/examples/bias10-LSSTTD-1575.cfg @@ -0,0 +1,20 @@ +# BOT EO configuration file + +# specify which acquisition sequences to run +# +[ACQUIRE] +bias1 +bias2 + +[CONFIG] +IDLE_FLUSH=True + +# Bias +# +[BIAS1] +acqtype=bias +COUNT=4 # number of bias frames, for BIAS image & noise analysis + +[BIAS2] +acqtype=bias +COUNT=6 # number of bias frames, for BIAS image & noise analysis diff --git a/lib/acquire.py b/lib/acquire.py index fa91c16..e90d299 100755 --- a/lib/acquire.py +++ b/lib/acquire.py @@ -554,3 +554,9 @@ def do_scan(options): print "scan called %s" % options tc = ScanTestCoordinator(options) tc.take_images() + +def do_one_time_config(options): + print "one_time_config called %s" % options + if "idle_flush" in options: + idle_flush = options.getBool("idle_flush") + fp.fp.sequencerConfig().change("idleFlushTimeout", 0 if idle_flush else -1) diff --git a/lib/config.py b/lib/config.py index 44f7790..3088335 100755 --- a/lib/config.py +++ b/lib/config.py @@ -36,6 +36,10 @@ def execute(config, command_line_options): time.sleep(30) # wait a bit for getting settled command_line_options["symlink"] = "/".join([symlink,alabel]) + one_time_config = config.items("CONFIG") + if one_time_config: + acquire.do_one_time_config(Config(dict(one_time_config))) + items = config.options("ACQUIRE") for item in items: options = Config(dict(config.items(item.upper()))) @@ -70,5 +74,15 @@ def getFloat(self, key, defaultValue=None): raise Exception('Missing config value %s' % key) return float(value) + def getBool(self, key, defaultValue=None): + value = self.get(key) + if not value: + if defaultValue != None: + return defaultValue + else: + raise Exception('Missing config value %s' % key) + return value.lower() in ['true', '1', 't', 'y', 'yes'] + + def getList(self, key): return self.get(key).replace('\n','').split(',')