Skip to content

Commit

Permalink
Merge pull request #35 from lsst-camera-dh/LSSTTD-1575
Browse files Browse the repository at this point in the history
Lssttd 1575
  • Loading branch information
youtsumi authored Nov 5, 2021
2 parents 262c083 + c7afce5 commit 89613b4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/bias10-LSSTTD-1575.cfg
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions lib/acquire.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
14 changes: 14 additions & 0 deletions lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())))
Expand Down Expand Up @@ -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(',')

0 comments on commit 89613b4

Please sign in to comment.