Skip to content

Commit

Permalink
Clean out acquisition_loop()
Browse files Browse the repository at this point in the history
  • Loading branch information
ivalaginja committed Oct 23, 2023
1 parent 4790e29 commit dbe3dd6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions catkit2/services/andor_camera/andor_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,23 @@ def main(self):

def acquisition_loop(self):
# Make sure the data stream has the right size and datatype.
#TODO
has_correct_parameters = np.allclose(self.images.shape, [self.height, self.width])

error = lib.AT_Command(self.cam, "AcquisitionStart")
if not error == AT_ERR.SUCCESS:
raise AndorError(error)
if not has_correct_parameters:
self.images.update_parameters('float32', [self.height, self.width], self.NUM_FRAMES_IN_BUFFER)

self.cam.start()
self.is_acquiring.submit_data(np.array([1], dtype='int8'))

try:
while self.should_be_acquiring.is_set() and not self.should_shut_down:
#TODO
# TODO
img = None

self.images.submit_data(img.astype('float32'))
finally:
# Stop acquisition.
lib.AT_Command(self.came, "AcquisitionStop")
self.cam.stop()
self.is_acquiring.submit_data(np.array([0], dtype='int8'))
self.cam.flush()

Expand Down

0 comments on commit dbe3dd6

Please sign in to comment.