Skip to content

Commit

Permalink
Read camera mode from config
Browse files Browse the repository at this point in the history
  • Loading branch information
ivalaginja committed Apr 18, 2024
1 parent 86cf018 commit 6502047
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions catkit2/services/hamamatsu_camera/hamamatsu_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,15 @@ def open(self):
binning = self.config.get('binning', 1)
self.cam.prop_setvalue(dcam.DCAM_IDPROP.BINNING, binning)

# Set camera mode to "ultraquiet" (1.0) rather than "standard" (2.0)
self.cam.prop_setvalue(dcam.DCAM_IDPROP.READOUTSPEED, 1.0)
# Set camera mode
camera_mode = self.config.get('camera_mode', "standard")
if camera_mode == "ultraquiet":
self.camera_mode = 1.0
elif camera_mode == "standard":
self.camera_mode = 2.0
else:
raise ValueError(f'Invalid camera mode: {camera_mode}, must be one of ["ultraquiet", "standard"]')
self.cam.prop_setvalue(dcam.DCAM_IDPROP.READOUTSPEED, self.camera_mode)

self.current_pixel_format = self.config.get('pixel_format', 'Mono16')
if self.current_pixel_format not in self.pixel_formats:
Expand Down

0 comments on commit 6502047

Please sign in to comment.