Skip to content

Commit

Permalink
Merge pull request #39 from lsst-camera-dh/LSSTTD-1292
Browse files Browse the repository at this point in the history
Added dark frame acquisitions to xy_stage_acq
  • Loading branch information
jchiang87 authored Aug 2, 2018
2 parents f505bf7 + c5fff4b commit 6ce4ee8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions harnessed_jobs/xy_stage_acq/v0/ccs_xy_stage_acq.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def run(self):
for i in range(self.imcount):
self.take_image(seqno, exptime, openShutter, actuateXed,
image_type, file_template=file_template)
# Take dark frame(s)
for i in range(self.dcount):
self.dark_image(seqno, exptime)
# Take bias frame(s).
for i in range(self.bcount):
self.bias_image(seqno)
Expand Down
10 changes: 10 additions & 0 deletions python/eo_acquisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,16 @@ def bias_image(self, seqno, max_tries=3):
self.take_image(seqno, exptime, openShutter, actuateXed, "BIAS",
timeout=150, max_tries=max_tries)

def dark_image(self, seqno, exptime, max_tries=3):
"""
Take dark image
"""
openShutter = False
actuateXed = False
timeout = int(max(150, exptime + 20))
self.take_image(seqno, exptime, openShutter, actuateXed, "DARK",
timeout=timeout, max_tries=max_tries)

def measured_flux(self, wl, seqno=0, fluxcal_time=2.):
"""
Compute the measured flux by taking an exposure at the
Expand Down
2 changes: 2 additions & 0 deletions python/xy_stage_acquisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def __init__(self, seqfile, acq_config_file, acqname, metadata,

self.bcount = int(self.eo_config.get('%s_BCOUNT' % acqname.upper(),
default=1))
self.dcount = int(self.eo_config.get('%s_DCOUNT' % acqname.upper(),
default=0))
self.imcount = int(self.eo_config.get('%s_IMCOUNT' % acqname.upper(),
default=1))
self.xoffset = float(self.eo_config.get('%s_XOFFSET' % acqname.upper(),
Expand Down

0 comments on commit 6ce4ee8

Please sign in to comment.