Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class DAQ_2DViewer_PiCamera(DAQ_Viewer_base):

params = comon_parameters + [
{'title': 'Resolution:', 'name': 'resolution', 'type': 'list', 'value': 'low', 'limits': ['low', 'high']},
{'title': 'Exposure Time:', 'name': 'exposure_time', 'type': 'int', 'value': 1000, 'suffix': 'µs'},

#{'title': 'Zoom:', 'name': 'zoom', 'type': 'slide', 'value': 1.0, 'min': 0., 'max': 1., 'subtype': 'linear'},
#{'title': 'Brightness:', 'name': 'brightness', 'type': 'slide', 'value': 50, 'min': 0, 'max': 100,
# 'subtype': 'linear', 'int': True},
Expand Down Expand Up @@ -66,6 +68,10 @@ def commit_settings(self, param: Parameter):
else:
self.controller.switch_mode(self.high_res_config)
#elif ...

if param.name() == "exposure_time":
self.controller.set_controls({"ExposureTime": param.value()}) #We test with exposure time 5000


def ini_detector(self, controller=None):
"""Detector communication initialization
Expand All @@ -87,6 +93,11 @@ def ini_detector(self, controller=None):
else:
self.controller = controller

min_exp, max_exp, default_exp = self.controller.camera_controls["ExposureTime"]
logger.debug(f'Exposure times: {(min_exp, max_exp, default_exp)}')
self.settings.child('exposure_time').setLimits((min_exp, max_exp))
self.settings.child('exposure_time').setValue(default_exp)

self.low_res_config = self.controller.create_preview_configuration()
self.high_res_config = self.controller.create_still_configuration()

Expand Down Expand Up @@ -158,3 +169,4 @@ def stop(self):

if __name__ == '__main__':
main(__file__, init=False)